Fixup PR13870: Make the feature work in Master
Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -1760,11 +1760,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1759 unmodified lines | |||
| 1760 | QTimer* settingsTimer = new QTimer(); | 1760 | QTimer* settingsTimer = new QTimer(); |
| 1761 | moveToNewNamedThread(settingsTimer, "Settings Thread", [this, settingsTimer]{ | 1761 | moveToNewNamedThread(settingsTimer, "Settings Thread", [this, settingsTimer]{ |
| 1762 | connect(qApp, &Application::beforeAboutToQuit, [this, settingsTimer]{ | 1762 | connect(qApp, &Application::beforeAboutToQuit, [this, settingsTimer]{ |
| 1763 | bool autoLogout = Setting::Handle<bool>(AUTO_LOGOUT_SETTING_NAME, false).get(); | ||
| 1764 | if (autoLogout) { | ||
| 1765 | auto accountManager = DependencyManager::get<AccountManager>(); | ||
| 1766 | accountManager->logout(); | ||
| 1767 | } | ||
| 1768 | // Disconnect the signal from the save settings | 1763 | // Disconnect the signal from the save settings |
| 1769 | QObject::disconnect(settingsTimer, &QTimer::timeout, this, &Application::saveSettings); | 1764 | QObject::disconnect(settingsTimer, &QTimer::timeout, this, &Application::saveSettings); |
| 1770 | // Stop the settings timer | 1765 | // Stop the settings timer |
| @@ -2516,6 +2511,11 @@ void Application::cleanupBeforeQuit() { · 745 unmodified lines | |||
| 2516 | } | 2511 | } |
| 2517 | DependencyManager::destroy<ScriptEngines>(); | 2512 | DependencyManager::destroy<ScriptEngines>(); |
| 2518 | 2513 | ||
| 2514 | bool autoLogout = Setting::Handle<bool>(AUTO_LOGOUT_SETTING_NAME, false).get(); | ||
| 2515 | if (autoLogout) { | ||
| 2516 | DependencyManager::get<AccountManager>()->removeAccountFromFile(); | ||
| 2517 | } | ||
| 2518 | |||
| 2519 | _displayPlugin.reset(); | 2519 | _displayPlugin.reset(); |
| 2520 | PluginManager::getInstance()->shutdown(); | 2520 | PluginManager::getInstance()->shutdown(); |
| 2521 | 2521 | ||