summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-06 22:09:46 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-06 22:09:46 +0800
commitf18614b8f4233342eb6a63fe573360d34b596a46 (patch)
tree5c8f0928041b0e4fad66d4eddc1e6e6d43223cf3
parent2b9825b9109ea2f3ca9b902620976f6612adae94 (diff)
A starting user has no ticket yet
but would still like to get to Home page
-rw-r--r--controller.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/controller.cxx b/controller.cxx
index 040d163..e50dc38 100644
--- a/controller.cxx
+++ b/controller.cxx
@@ -56,10 +56,12 @@ Controller::Controller(QObject* parent)
, client, static_cast<void (Client::*)(QString const&)>
(&Client::userShow));
- connect(client, &Client::userShown, [this,qUser](rtclient_user* user) {
+ connect(client, &Client::userShown
+ , [this,qUser,appWindow](rtclient_user* user) {
if (user) {
emit checked(QString{user->name});
qUser->update(user);
+ QMetaObject::invokeMethod(appWindow, "pushHome");
}
});
@@ -67,10 +69,6 @@ Controller::Controller(QObject* parent)
connect(client, &Client::searchedTicket, ticketList, &TicketList::update);
- connect(ticketList, &TicketList::updated, [appWindow]() {
- QMetaObject::invokeMethod(appWindow, "pushHome");
- });
-
connect(appWindow, SIGNAL(ticketHistory(int, bool))
, client, SLOT(ticketHistory(int, bool)));