diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-25 09:56:48 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-25 09:56:48 +0800 |
commit | 06f744d8f3d458bde5d213ac0b9981ff0891153f (patch) | |
tree | 207b65ac57325524a69cb3be1f116cb50a7004e6 /controller.cxx | |
parent | da303a3c4d82b758b0e9aba0bf49b8efc3e4843e (diff) |
Simplify the QML logics entrance
Diffstat (limited to 'controller.cxx')
-rw-r--r-- | controller.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/controller.cxx b/controller.cxx index 8447242..9908fb8 100644 --- a/controller.cxx +++ b/controller.cxx @@ -26,7 +26,6 @@ Controller::Controller(QObject* parent) : QObject{parent} auto engine = static_cast<QQmlApplicationEngine*>(parent); auto rootObjects = engine->rootObjects(); auto appWindow = rootObjects[0]; - auto onboardingView = appWindow->findChild<QObject*>("onboarding"); using RTClient::User; auto typeId = qmlRegisterSingletonType<User>("KelakonUser", 0, 1, "User" , [](QQmlEngine *engine @@ -39,7 +38,7 @@ Controller::Controller(QObject* parent) : QObject{parent} taskList = new RTClient::TicketList; engine->rootContext()->setContextProperty("taskList", taskList); - connect(onboardingView, SIGNAL(logIn(QString, QString)) + connect(appWindow, SIGNAL(logIn(QString, QString)) , client, SLOT(logIn(QString, QString))); connect(client, SIGNAL(loggedIn(QString)) @@ -56,9 +55,9 @@ Controller::Controller(QObject* parent) : QObject{parent} connect(client, SIGNAL(ticketSearched(rtclient_ticketlist*)) , taskList, SLOT(update(rtclient_ticketlist*))); - connect(taskList, SIGNAL(updated()), onboardingView, SLOT(pushHome())); + connect(taskList, SIGNAL(updated()), appWindow, SLOT(pushHome())); - connect(onboardingView, SIGNAL(ticketNew(QString, QString)) + connect(appWindow, SIGNAL(ticketNew(QString, QString)) , client, SLOT(ticketNew(QString, QString))); thread.start(); |