diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-22 10:23:44 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-22 10:27:56 +0200 |
commit | 2a60a0723257cfd6855233b9af27dc9735915435 (patch) | |
tree | 9dcabe95cff050ad77f7bca03c4b85e51c4ffa10 /framework/src/keyring.h | |
parent | 1f1ffbceb15dbc9e8a7ff567666a026ef221039e (diff) | |
download | kube-2a60a0723257cfd6855233b9af27dc9735915435.tar.gz kube-2a60a0723257cfd6855233b9af27dc9735915435.zip |
Keyring fixes
* Avoid double free
* track unlocked state
* Ensure we bring up the login screen on startup and after saving the
configuration.
Diffstat (limited to 'framework/src/keyring.h')
-rw-r--r-- | framework/src/keyring.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/src/keyring.h b/framework/src/keyring.h index ce4e137d..df25dbff 100644 --- a/framework/src/keyring.h +++ b/framework/src/keyring.h | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <QObject> | 20 | #include <QObject> |
21 | #include <QSet> | ||
21 | 22 | ||
22 | namespace Kube { | 23 | namespace Kube { |
23 | 24 | ||
@@ -25,10 +26,13 @@ class Keyring : public QObject { | |||
25 | Q_OBJECT | 26 | Q_OBJECT |
26 | public: | 27 | public: |
27 | Keyring(); | 28 | Keyring(); |
29 | static Keyring *instance(); | ||
28 | Q_INVOKABLE bool isUnlocked(const QByteArray &accountId); | 30 | Q_INVOKABLE bool isUnlocked(const QByteArray &accountId); |
31 | void unlock(const QByteArray &accountId); | ||
29 | 32 | ||
30 | private: | 33 | private: |
31 | Q_DISABLE_COPY(Keyring); | 34 | Q_DISABLE_COPY(Keyring); |
35 | QSet<QByteArray> mUnlocked; | ||
32 | }; | 36 | }; |
33 | 37 | ||
34 | class AccountKeyring : public QObject { | 38 | class AccountKeyring : public QObject { |