1
0
Fork 0
mirror of https://gitlab.com/niansa/qcommsy.git synced 2025-03-06 20:53:33 +01:00

Minor optimisations

This commit is contained in:
niansa 2020-10-27 10:40:53 +01:00
parent da4990a7bc
commit 04e3532f6b
2 changed files with 6 additions and 24 deletions

16
info.ui
View file

@ -59,21 +59,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string> QCommsy <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;QCommsy&lt;br/&gt;Copyright (C) 2020 niansa&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This program is free software: you can redistribute it and/or modify&lt;br/&gt;it under the terms of the GNU General Public License as published by&lt;br/&gt;the Free Software Foundation, either version 3 of the License, or&lt;br/&gt;(at your option) any later version.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This program is distributed in the hope that it will be useful,&lt;br/&gt;but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br/&gt;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&lt;br/&gt;GNU General Public License for more details.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;You should have received a copy of the GNU General Public License&lt;br/&gt;along with this program. If not, see &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;http://www.gnu.org/licenses/&lt;/span&gt;&lt;/a&gt;&amp;gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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 &lt;http://www.gnu.org/licenses/&gt;.</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>

View file

@ -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();