From 282aa70db37df48c8c8bf1782ae7ce628a8a9dcc Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 19 Sep 2019 13:45:34 -0700 Subject: [PATCH] Sync settings on logout/shutdown --- libraries/networking/src/AccountManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/networking/src/AccountManager.cpp b/libraries/networking/src/AccountManager.cpp index ab8dfd5ed9..4e6fd3afb7 100644 --- a/libraries/networking/src/AccountManager.cpp +++ b/libraries/networking/src/AccountManager.cpp @@ -95,12 +95,14 @@ AccountManager::AccountManager(UserAgentGetter userAgentGetter) : connect(this, SIGNAL(loginComplete(QUrl)), _postSettingsTimer, SLOT(start())); connect(this, &AccountManager::logoutComplete, _postSettingsTimer, &QTimer::stop); connect(_postSettingsTimer, &QTimer::timeout, this, &AccountManager::postAccountSettings); + connect(qApp, &QCoreApplication::aboutToQuit, this, &AccountManager::postAccountSettings); } const QString DOUBLE_SLASH_SUBSTITUTE = "slashslash"; const QString ACCOUNT_MANAGER_REQUESTED_SCOPE = "owner"; void AccountManager::logout() { + postAccountSettings(); // a logout means we want to delete the DataServerAccountInfo we currently have for this URL, in-memory and in file _accountInfo = DataServerAccountInfo();