diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-03-26 17:43:49 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-03-26 17:43:49 +0100 |
commit | 737273348faa598af906bef2d96e6520a85cbc88 (patch) | |
tree | bf418b4e877c1d78561752e6dcdc5575a269b784 /libsettings/src | |
parent | d24c4823ef8e144a3ffefc208c5a15e86b0b31b1 (diff) | |
download | MultiMC-737273348faa598af906bef2d96e6520a85cbc88.tar MultiMC-737273348faa598af906bef2d96e6520a85cbc88.tar.gz MultiMC-737273348faa598af906bef2d96e6520a85cbc88.tar.lz MultiMC-737273348faa598af906bef2d96e6520a85cbc88.tar.xz MultiMC-737273348faa598af906bef2d96e6520a85cbc88.zip |
Use Keyring in the login dialog
Diffstat (limited to 'libsettings/src')
-rw-r--r-- | libsettings/src/stubkeyring.cpp | 6 | ||||
-rw-r--r-- | libsettings/src/stubkeyring.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libsettings/src/stubkeyring.cpp b/libsettings/src/stubkeyring.cpp index 963f3dd9..cb03bf79 100644 --- a/libsettings/src/stubkeyring.cpp +++ b/libsettings/src/stubkeyring.cpp @@ -90,6 +90,12 @@ QStringList StubKeyring::getStoredAccounts(QString service) return out; } +void StubKeyring::removeStoredAccount ( QString service, QString username ) +{ + QString key = generateKey(service, username); + m_settings.remove(key); +} + StubKeyring::StubKeyring() : m_settings(QSettings::UserScope, "Orochimarufan", "Keyring") { diff --git a/libsettings/src/stubkeyring.h b/libsettings/src/stubkeyring.h index b5f04e4c..45791c85 100644 --- a/libsettings/src/stubkeyring.h +++ b/libsettings/src/stubkeyring.h @@ -29,7 +29,7 @@ public: virtual QString getPassword(QString service, QString username); virtual bool hasPassword(QString service, QString username); virtual QStringList getStoredAccounts(QString service); - + virtual void removeStoredAccount(QString service, QString username); private: friend class Keyring; explicit StubKeyring(); |