diff --git a/libcommsy.hpp b/libcommsy.hpp index ce6622e..85a929e 100644 --- a/libcommsy.hpp +++ b/libcommsy.hpp @@ -10,8 +10,6 @@ #include #include #include -#include -#include #include #include diff --git a/main.cpp b/main.cpp index 48673d8..ebeab59 100644 --- a/main.cpp +++ b/main.cpp @@ -134,23 +134,24 @@ void _UILoader::loginWindow(QMainWindow *w, const QString& failure) { thisui->failureText->setText(failure); // Connect connection handlers - w->connect(auther, &libCommsyAuth::authDone, [this, thisui, w] (QNetworkReply *netReply) { + w->connect(auther, &libCommsyAuth::authDone, [this, thisui, w] (QNetworkReply *netReply) { // Finished authentication // Login try { settings->setValue("server_sid", auther->getSID(netReply)); auther->deleteLater(); cacheInvalidate = true; - overviewWindow(w, false); + return overviewWindow(w, false); } catch (authFailureError&) { thisui->failureText->setText("Die eingegebenen Anmeldedaten sind ungültig"); } catch (invalidRoomError&) { thisui->failureText->setText("Der angegebene Raum existiert nicht"); } + }); - w->connect(auther, &libCommsyAuth::connectionDone, [this, thisui, w] (QNetworkReply *netReply) { + w->connect(auther, &libCommsyAuth::connectionDone, [this, thisui, w] (QNetworkReply *netReply) { // Finished test connection auther->sendAuth(auther->getAuthUrl(netReply), thisui->usernameLine->text(), thisui->passwordLine->text()); }); - w->connect(auther, &libCommsyAuth::connectionNotfound, [this, thisui, w] (QNetworkReply *) { + w->connect(auther, &libCommsyAuth::connectionNotfound, [this, thisui, w] (QNetworkReply *) { // "server not found" during test connection thisui->failureText->setText("Der angegebene Server existiert nicht"); }); @@ -237,7 +238,7 @@ int main(int argc, char *argv[]) { _UILoader UILoader; // Set theme - a.setStyle(QStyleFactory::create("windows")); + a.setStyle(QStyleFactory::create("android")); // Load initial window UILoader.loginWindow(&w);