From f94f1928980c7d3100b83e5d8394561cb986ccd5 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: Thu, 12 Sep 2019 22:58:32 +0800 Subject: Connect the skip button to search tickets/tasks --- Login.qml | 1 + controller.cxx | 1 + pages/CreateProfile.qml | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Login.qml b/Login.qml index 0220a23..59b0dd5 100644 --- a/Login.qml +++ b/Login.qml @@ -2,6 +2,7 @@ import QtQuick 2.12 LoginForm { signal logIn(string name, string password) + signal search(string name) function pushProfile() { stackView.push("qrc:/pages/CreateProfile.qml") } diff --git a/controller.cxx b/controller.cxx index b1ba81b..b9bdf5e 100644 --- a/controller.cxx +++ b/controller.cxx @@ -17,6 +17,7 @@ Controller::Controller(QObject* parent) : QObject{parent} connect(loginView, SIGNAL(logIn(QString, QString)), worker, SLOT(logIn(QString, QString))); connect(worker, SIGNAL(logged(rt_user*)), loginView, SLOT(pushProfile())); + connect(loginView, SIGNAL(search(QString)), worker, SLOT(search(QString))); auto user = engine->singletonInstance(User::typeId); connect(worker, SIGNAL(logged(rt_user*)), user, SLOT(update(rt_user*))); diff --git a/pages/CreateProfile.qml b/pages/CreateProfile.qml index e03442d..483814f 100644 --- a/pages/CreateProfile.qml +++ b/pages/CreateProfile.qml @@ -5,7 +5,10 @@ CreateProfileForm { width: stackView.width height: stackView.height backButton.onClicked: stackView.pop() - skipButton.onClicked: stackView.push("qrc:/pages/Home.qml") + skipButton.onClicked: { + login.search(User.name) + stackView.push("qrc:/pages/Home.qml") + } emailAddressLabel.text: User.emailAddress enterFullName.text: User.realName } -- cgit v1.2.3