From 6ff76cf996ff4c1c2fd1f4a63ebe6b6177f898d6 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: Sun, 6 Oct 2019 22:04:03 +0800 Subject: Revert "Move pushHome function to Login Password" This reverts commit d6c16f40490aef972df55ea101f9eef4eeb31f7b. # Conflicts: # controller.cxx --- LoginPassword.qml | 5 ----- controller.cxx | 8 ++------ main.qml | 3 +++ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/LoginPassword.qml b/LoginPassword.qml index ad5f56c..d306914 100644 --- a/LoginPassword.qml +++ b/LoginPassword.qml @@ -3,11 +3,6 @@ import KelakonUser 0.1 import "larva/features" LoginPasswordForm { - objectName: "login" - function pushHome() { - pageView.push("Home.qml") - } - emailTextLabel.text: User.name passwordTextField.onTextChanged: if (!passwordTextField.text || !continueButton.enabled) diff --git a/controller.cxx b/controller.cxx index 1d5bb4b..040d163 100644 --- a/controller.cxx +++ b/controller.cxx @@ -67,12 +67,8 @@ Controller::Controller(QObject* parent) connect(client, &Client::searchedTicket, ticketList, &TicketList::update); - connect(client, &Client::loggedIn, [appWindow,this]() { - auto loginView = appWindow->findChild("login"); - connect(ticketList, &TicketList::updated, [loginView]() { - QMetaObject::invokeMethod(loginView - , "pushHome"); - }); + connect(ticketList, &TicketList::updated, [appWindow]() { + QMetaObject::invokeMethod(appWindow, "pushHome"); }); connect(appWindow, SIGNAL(ticketHistory(int, bool)) diff --git a/main.qml b/main.qml index bf4961f..ac51482 100644 --- a/main.qml +++ b/main.qml @@ -6,6 +6,9 @@ ApplicationWindow { signal logIn(string name, string password) signal ticketHistory(int id, bool longFormat) signal ticketNew(string queue, string requestor) + function pushHome() { + pageView.push("Home.qml") + } id: window visible: true -- cgit v1.2.3