From ff79ff8fa7c67622b2e5d4217f81ca9352a05d7d Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 7 May 2021 04:23:19 +0200 Subject: [PATCH] Remove android specific code path for key storage it's now natively supported by QtKeychain. We don't have users so it's not a big deal to discard their password. Fix #247 --- src/controller.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index ec464983f..5bd53dd72 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -309,7 +309,6 @@ QByteArray Controller::loadAccessTokenFromFile(const AccountSettings &account) QByteArray Controller::loadAccessTokenFromKeyChain(const AccountSettings &account) { -#ifndef Q_OS_ANDROID qDebug() << "Read the access token from the keychain for " << account.userId(); QKeychain::ReadPasswordJob job(qAppName()); job.setAutoDelete(false); @@ -343,13 +342,6 @@ QByteArray Controller::loadAccessTokenFromKeyChain(const AccountSettings &accoun } return accessToken; -#else - qDebug() << "Saving access token to KConfig"; - KConfig config("neochat_tokens"); - KConfigGroup tokensGroup(&config, "Tokens"); - QString token = tokensGroup.readEntry(account.userId(), QString()); - return token.toLatin1(); -#endif } bool Controller::saveAccessTokenToFile(const AccountSettings &account, const QByteArray &accessToken)