diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-20 10:00:34 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-20 10:00:34 +0800 |
commit | df4c591dacfbbc21ad3fce280dad6ab78e56f4cd (patch) | |
tree | 96a05edcf0f1cd8ba483494188ece549f18b9b49 | |
parent | e3cf9197843998ec919e1dd043eaccf04d122876 (diff) |
Successful login leads to Home instead of Profile
Ticket search is done right after login
so home can show the tickets.
-rw-r--r-- | LoginPassword.qml | 5 | ||||
-rw-r--r-- | Onboarding.qml | 4 | ||||
-rw-r--r-- | Profile.qml | 1 | ||||
-rw-r--r-- | controller.cxx | 3 | ||||
m--------- | qrtclient | 0 |
5 files changed, 7 insertions, 6 deletions
diff --git a/LoginPassword.qml b/LoginPassword.qml index 5e510d2..8b65a11 100644 --- a/LoginPassword.qml +++ b/LoginPassword.qml @@ -14,7 +14,10 @@ LoginPasswordForm { icon.source: "assets/arrow-forward-24px.svg" onClicked: { User.password = passwordTextField.text - onClicked: onboarding.logIn(User.name, User.password) + onClicked: { + onboarding.logIn(User.name, User.password) + onboarding.ticketSearch(User.name) + } } } } diff --git a/Onboarding.qml b/Onboarding.qml index 291f3c9..f66f491 100644 --- a/Onboarding.qml +++ b/Onboarding.qml @@ -5,8 +5,8 @@ OnboardingForm { signal logIn(string name, string password) signal ticketNew(string queue, string requestor) signal ticketSearch(string name) - function pushProfile() { - pageView.push("Profile.qml") + function pushHome() { + pageView.push("Home.qml") } objectName: "onboarding" diff --git a/Profile.qml b/Profile.qml index d0d258c..8e416bd 100644 --- a/Profile.qml +++ b/Profile.qml @@ -9,7 +9,6 @@ CreateProfileForm { } titleLabel.text: qsTr("Edit Profile") skipButton.onClicked: { - onboarding.ticketSearch(User.name) pageView.push("Home.qml") } emailImage.source: "larva/components/icons/email-24px.svg" diff --git a/controller.cxx b/controller.cxx index 143e313..8e832b7 100644 --- a/controller.cxx +++ b/controller.cxx @@ -19,8 +19,6 @@ Controller::Controller(QObject* parent) : QObject{parent} , client, SLOT(logIn(QString, QString))); connect(client, SIGNAL(loggedIn(QString)) , client, SLOT(userShow(QString))); - connect(client, SIGNAL(userShown(rtclient_user*)) - , onboardingView, SLOT(pushProfile())); connect(onboardingView, SIGNAL(ticketNew(QString, QString)) , client, SLOT(ticketNew(QString, QString))); connect(onboardingView, SIGNAL(ticketSearch(QString)) @@ -42,6 +40,7 @@ Controller::Controller(QObject* parent) : QObject{parent} engine->rootContext()->setContextProperty("taskList", taskList); connect(client, SIGNAL(ticketSearched(rtclient_ticketlist*)) , taskList, SLOT(update(rtclient_ticketlist*))); + connect(taskList, SIGNAL(updated()), onboardingView, SLOT(pushHome())); thread.start(); } diff --git a/qrtclient b/qrtclient -Subproject 10c50e5280e00caf7d6e75fb699e40b16735e22 +Subproject 6a5a3ba58a94b1eb4ce53ea89a54e21c53c6556 |