diff options
-rw-r--r-- | Login.qml | 1 | ||||
-rw-r--r-- | controller.cxx | 1 | ||||
-rw-r--r-- | pages/CreateProfile.qml | 5 |
3 files changed, 6 insertions, 1 deletions
@@ -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*>(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 } |