From df4c591dacfbbc21ad3fce280dad6ab78e56f4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Fri, 20 Sep 2019 10:00:34 +0800 Subject: Successful login leads to Home instead of Profile Ticket search is done right after login so home can show the tickets. --- LoginPassword.qml | 5 ++++- Onboarding.qml | 4 ++-- Profile.qml | 1 - controller.cxx | 3 +-- qrtclient | 2 +- 5 files changed, 8 insertions(+), 7 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 index 10c50e5..6a5a3ba 160000 --- a/qrtclient +++ b/qrtclient @@ -1 +1 @@ -Subproject commit 10c50e5280e00caf7d6e75fb699e40b16735e224 +Subproject commit 6a5a3ba58a94b1eb4ce53ea89a54e21c53c65561 -- cgit v1.2.3