From f01bf10dc511268ead551a191a6a3211c006ba44 Mon Sep 17 00:00:00 2001 From: Orochimarufan Date: Sun, 24 Feb 2013 18:22:35 +0100 Subject: Implement Keyring system base --- libsettings/src/stubkeyring.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 libsettings/src/stubkeyring.h (limited to 'libsettings/src/stubkeyring.h') diff --git a/libsettings/src/stubkeyring.h b/libsettings/src/stubkeyring.h new file mode 100644 index 00000000..f8e0eaaa --- /dev/null +++ b/libsettings/src/stubkeyring.h @@ -0,0 +1,42 @@ +/* Copyright 2013 MultiMC Contributors + * + * Authors: Orochimarufan + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef STUBKEYRING_H +#define STUBKEYRING_H + +#include "include/keyring.h" + +#include + +class StubKeyring : public Keyring +{ + Q_OBJECT +public: + virtual bool storePassword(QString service, QString username, QString password); + virtual QString getPassword(QString service, QString username); + virtual bool hasPassword(QString service, QString username); + virtual QStringList getStoredAccounts(QString service); + +private: + friend class Keyring; + explicit StubKeyring(); + virtual bool isValid() { return true; } + + QSettings m_settings; +}; + +#endif // STUBKEYRING_H -- cgit v1.2.3 From f4c9cb8c1d395422b7e4f1c27ac92b6df08a39bb Mon Sep 17 00:00:00 2001 From: Orochimarufan Date: Mon, 25 Feb 2013 22:47:03 +0100 Subject: refactor indendation, fix a bug in MinecraftProcess & fix a bug in InstanceLauncher --- libsettings/src/stubkeyring.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'libsettings/src/stubkeyring.h') diff --git a/libsettings/src/stubkeyring.h b/libsettings/src/stubkeyring.h index f8e0eaaa..0566d5ab 100644 --- a/libsettings/src/stubkeyring.h +++ b/libsettings/src/stubkeyring.h @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,19 +24,19 @@ class StubKeyring : public Keyring { - Q_OBJECT + Q_OBJECT public: - virtual bool storePassword(QString service, QString username, QString password); - virtual QString getPassword(QString service, QString username); - virtual bool hasPassword(QString service, QString username); - virtual QStringList getStoredAccounts(QString service); + virtual bool storePassword(QString service, QString username, QString password); + virtual QString getPassword(QString service, QString username); + virtual bool hasPassword(QString service, QString username); + virtual QStringList getStoredAccounts(QString service); private: - friend class Keyring; - explicit StubKeyring(); - virtual bool isValid() { return true; } + friend class Keyring; + explicit StubKeyring(); + virtual bool isValid() { return true; } - QSettings m_settings; + QSettings m_settings; }; #endif // STUBKEYRING_H -- cgit v1.2.3 From e4f86893a899ee86cfa6d238f891bec04977c966 Mon Sep 17 00:00:00 2001 From: Orochimarufan Date: Fri, 22 Mar 2013 14:40:55 +0100 Subject: fix merge issues, make console window work again --- libsettings/src/stubkeyring.h | 1 - 1 file changed, 1 deletion(-) (limited to 'libsettings/src/stubkeyring.h') diff --git a/libsettings/src/stubkeyring.h b/libsettings/src/stubkeyring.h index 0566d5ab..b5f04e4c 100644 --- a/libsettings/src/stubkeyring.h +++ b/libsettings/src/stubkeyring.h @@ -24,7 +24,6 @@ class StubKeyring : public Keyring { - Q_OBJECT public: virtual bool storePassword(QString service, QString username, QString password); virtual QString getPassword(QString service, QString username); -- cgit v1.2.3 From 737273348faa598af906bef2d96e6520a85cbc88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 26 Mar 2013 17:43:49 +0100 Subject: Use Keyring in the login dialog --- libsettings/src/stubkeyring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsettings/src/stubkeyring.h') 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(); -- cgit v1.2.3