From f18614b8f4233342eb6a63fe573360d34b596a46 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:09:46 +0800 Subject: A starting user has no ticket yet but would still like to get to Home page --- controller.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'controller.cxx') 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 (&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))); -- cgit v1.2.3