From 04e3532f6be72e803451abb6b71c0880b920d2af Mon Sep 17 00:00:00 2001 From: niansa Date: Tue, 27 Oct 2020 10:40:53 +0100 Subject: [PATCH] Minor optimisations --- info.ui | 16 +--------------- main.cpp | 14 +++++--------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/info.ui b/info.ui index bade6a2..61dc3b9 100644 --- a/info.ui +++ b/info.ui @@ -59,21 +59,7 @@ - QCommsy - 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/>. + <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> true diff --git a/main.cpp b/main.cpp index b3217b7..d23cf24 100644 --- a/main.cpp +++ b/main.cpp @@ -49,7 +49,7 @@ #include #define QCommsy_NAME "QCommsy" -#define QCommsy_VERSION "1.1-dev" +#define QCommsy_VERSION "1.2-stable" static QSettings *settings; static QApplication *a; @@ -113,7 +113,6 @@ public: destFile.close(); // Open file in some application - //QDesktopServices::openUrl(destPath); QDesktopServices::openUrl(QUrl::fromLocalFile(destPath)); } @@ -153,18 +152,15 @@ void _UILoader::infoWindow() { void _UILoader::failureWindow() { Ui::failureWindow *thisui = new Ui::failureWindow; - QString reason; // Show initial UI thisui->setupUi(w); w->show(); - // Get error message - reason = "Ein interner Fehler ist aufgetreten
" - "Dies ist sehr wahrscheinlich ein Programmfehler. Sollte das zu häufig passieren, kontaktiere bitte den Entwickler"; - // Show error message - thisui->descriptionText->setText("Verbindung fehlgeschlagen
" + reason); + thisui->descriptionText->setText("Verbindung fehlgeschlagen
" + "Ein interner Fehler ist aufgetreten
" + "Dies ist sehr wahrscheinlich ein Programmfehler. Sollte das zu häufig passieren, kontaktiere bitte den Entwickler"); // Add button handlers w->connect(thisui->retryButton, &QPushButton::pressed, [this] () { loginWindow(); }); @@ -396,7 +392,7 @@ int main(int argc, char *argv[]) { _UILoader UILoader; // Set theme - a->setStyle(QStyleFactory::create("android")); + //a->setStyle(QStyleFactory::create("android")); // Load initial window UILoader.loginWindow();