summaryrefslogtreecommitdiffstats
path: root/framework/src/startupcheck.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-22 11:58:47 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-22 11:58:47 +0200
commitf25a8fb49abf8a9b7ba5d6f8fbd4c05bd647c1c0 (patch)
treec1066b0c9bd9d4a0e1be952dcad7b65af39baa79 /framework/src/startupcheck.cpp
parent2a60a0723257cfd6855233b9af27dc9735915435 (diff)
downloadkube-f25a8fb49abf8a9b7ba5d6f8fbd4c05bd647c1c0.tar.gz
kube-f25a8fb49abf8a9b7ba5d6f8fbd4c05bd647c1c0.zip
Fixed showing a loginview after the account setup
The view managment is starting to become a mess. I guess we'll need something like a state machine in the long run managing the view transitions.
Diffstat (limited to 'framework/src/startupcheck.cpp')
-rw-r--r--framework/src/startupcheck.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/framework/src/startupcheck.cpp b/framework/src/startupcheck.cpp
index 850be7bb..fa750173 100644
--- a/framework/src/startupcheck.cpp
+++ b/framework/src/startupcheck.cpp
@@ -23,13 +23,10 @@
23StartupCheck::StartupCheck(QObject *parent) 23StartupCheck::StartupCheck(QObject *parent)
24 : QObject(parent) 24 : QObject(parent)
25{ 25{
26 QMetaObject::invokeMethod(this, "check", Qt::QueuedConnection);
27} 26}
28 27
29void StartupCheck::check() 28bool StartupCheck::noAccount() const
30{ 29{
31 auto accounts = Sink::Store::read<Sink::ApplicationDomain::SinkAccount>({}); 30 auto accounts = Sink::Store::read<Sink::ApplicationDomain::SinkAccount>({});
32 if (accounts.isEmpty()) { 31 return accounts.isEmpty();
33 emit noAccount();
34 }
35} 32}