mirror of
https://gitlab.com/niansa/qcommsy.git
synced 2025-03-06 20:53:33 +01:00
Minor optimisations
This commit is contained in:
parent
da4990a7bc
commit
04e3532f6b
2 changed files with 6 additions and 24 deletions
16
info.ui
16
info.ui
|
@ -59,21 +59,7 @@
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string> QCommsy
|
<string><html><head/><body><p>QCommsy<br/>Copyright (C) 2020 niansa<br/><br/><br/>This program is free software: you can redistribute it and/or modify<br/>it under the terms of the GNU General Public License as published by<br/>the Free Software Foundation, either version 3 of the License, or<br/>(at your option) any later version.<br/><br/><br/>This program is distributed in the hope that it will be useful,<br/>but WITHOUT ANY WARRANTY; without even the implied warranty of<br/>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br/>GNU General Public License for more details.<br/><br/><br/>You should have received a copy of the GNU General Public License<br/>along with this program. If not, see &lt;<a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#007af4;">http://www.gnu.org/licenses/</span></a>&gt;.</p></body></html></string>
|
||||||
Copyright (C) 2020 niansa
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
14
main.cpp
14
main.cpp
|
@ -49,7 +49,7 @@
|
||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
|
|
||||||
#define QCommsy_NAME "QCommsy"
|
#define QCommsy_NAME "QCommsy"
|
||||||
#define QCommsy_VERSION "1.1-dev"
|
#define QCommsy_VERSION "1.2-stable"
|
||||||
|
|
||||||
static QSettings *settings;
|
static QSettings *settings;
|
||||||
static QApplication *a;
|
static QApplication *a;
|
||||||
|
@ -113,7 +113,6 @@ public:
|
||||||
destFile.close();
|
destFile.close();
|
||||||
|
|
||||||
// Open file in some application
|
// Open file in some application
|
||||||
//QDesktopServices::openUrl(destPath);
|
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(destPath));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(destPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,18 +152,15 @@ void _UILoader::infoWindow() {
|
||||||
|
|
||||||
void _UILoader::failureWindow() {
|
void _UILoader::failureWindow() {
|
||||||
Ui::failureWindow *thisui = new Ui::failureWindow;
|
Ui::failureWindow *thisui = new Ui::failureWindow;
|
||||||
QString reason;
|
|
||||||
|
|
||||||
// Show initial UI
|
// Show initial UI
|
||||||
thisui->setupUi(w);
|
thisui->setupUi(w);
|
||||||
w->show();
|
w->show();
|
||||||
|
|
||||||
// Get error message
|
|
||||||
reason = "Ein interner Fehler ist aufgetreten<br />"
|
|
||||||
"<i>Dies ist sehr wahrscheinlich ein Programmfehler. Sollte das zu häufig passieren, kontaktiere bitte den Entwickler</i>";
|
|
||||||
|
|
||||||
// Show error message
|
// Show error message
|
||||||
thisui->descriptionText->setText("<b>Verbindung fehlgeschlagen</b><br />" + reason);
|
thisui->descriptionText->setText("<b>Verbindung fehlgeschlagen</b><br />"
|
||||||
|
"Ein interner Fehler ist aufgetreten<br />"
|
||||||
|
"<i>Dies ist sehr wahrscheinlich ein Programmfehler. Sollte das zu häufig passieren, kontaktiere bitte den Entwickler</i>");
|
||||||
|
|
||||||
// Add button handlers
|
// Add button handlers
|
||||||
w->connect(thisui->retryButton, &QPushButton::pressed, [this] () { loginWindow(); });
|
w->connect(thisui->retryButton, &QPushButton::pressed, [this] () { loginWindow(); });
|
||||||
|
@ -396,7 +392,7 @@ int main(int argc, char *argv[]) {
|
||||||
_UILoader UILoader;
|
_UILoader UILoader;
|
||||||
|
|
||||||
// Set theme
|
// Set theme
|
||||||
a->setStyle(QStyleFactory::create("android"));
|
//a->setStyle(QStyleFactory::create("android"));
|
||||||
|
|
||||||
// Load initial window
|
// Load initial window
|
||||||
UILoader.loginWindow();
|
UILoader.loginWindow();
|
||||||
|
|
Loading…
Add table
Reference in a new issue