diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-11-04 02:53:05 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-11-04 02:53:05 +0100 |
commit | bb7e8985f6d189de0acac6a1c3033cb16378c1fb (patch) | |
tree | 7c2e88c7184a7f5acf5e7a03be5c5f0bf6904113 /depends/settings/src/stubkeyring.cpp | |
parent | d6e4fb29713d6ce55b092c0e22412f6121e7f516 (diff) | |
download | MultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.tar MultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.tar.gz MultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.tar.lz MultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.tar.xz MultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.zip |
Reformat and (slightly) decruft all the things.
Diffstat (limited to 'depends/settings/src/stubkeyring.cpp')
-rw-r--r-- | depends/settings/src/stubkeyring.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/depends/settings/src/stubkeyring.cpp b/depends/settings/src/stubkeyring.cpp index cf814d2f..53fca025 100644 --- a/depends/settings/src/stubkeyring.cpp +++ b/depends/settings/src/stubkeyring.cpp @@ -27,7 +27,7 @@ QString scramble(QString in_) { QByteArray in = in_.toUtf8(); QByteArray out; - for (int i = 0; i<in.length(); i++) + for (int i = 0; i < in.length(); i++) out.append(in.at(i) ^ scrambler); return QString::fromUtf8(out); } @@ -81,7 +81,7 @@ QStringList StubKeyring::getStoredAccounts(QString service) QStringList out; QStringList in(m_settings.allKeys()); QStringListIterator it(in); - while(it.hasNext()) + while (it.hasNext()) { QString c = it.next(); if (c.startsWith(service)) @@ -90,15 +90,16 @@ QStringList StubKeyring::getStoredAccounts(QString service) return out; } -void StubKeyring::removeStoredAccount ( QString service, QString username ) +void StubKeyring::removeStoredAccount(QString service, QString username) { QString key = generateKey(service, username); m_settings.remove(key); } -//FIXME: this needs tweaking/changes for user account level storage -StubKeyring::StubKeyring() : -// m_settings(QSettings::UserScope, "Orochimarufan", "Keyring") - m_settings("keyring.cfg", QSettings::IniFormat) +// FIXME: this needs tweaking/changes for user account level storage +StubKeyring::StubKeyring() + : + // m_settings(QSettings::UserScope, "Orochimarufan", "Keyring") + m_settings("keyring.cfg", QSettings::IniFormat) { } |