Use non blocking passord reading

This also remove the do while loop that might cause problem and expose
the error message to the user.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
Carl Schwan
2021-12-12 18:18:34 +01:00
parent 6e1c07047e
commit d1bbb5e3f7
2 changed files with 88 additions and 60 deletions

View File

@@ -23,6 +23,11 @@ class NeoChatRoom;
class NeoChatUser;
class QQuickWindow;
namespace QKeychain
{
class ReadPasswordJob;
}
using namespace Quotient;
class Controller : public QObject
@@ -99,7 +104,7 @@ private:
bool m_busy = false;
static QByteArray loadAccessTokenFromFile(const AccountSettings &account);
QByteArray loadAccessTokenFromKeyChain(const AccountSettings &account);
QKeychain::ReadPasswordJob *loadAccessTokenFromKeyChain(const AccountSettings &account);
void loadSettings();
void saveSettings() const;