From eaddc55267ec2257eea24ae4c0311488bdc74e11 Mon Sep 17 00:00:00 2001 From: Sergey Zolotarev Date: Sat, 5 Oct 2019 22:37:46 +0600 Subject: [PATCH] Don't run connection wizard when quitting the application Signed-off-by: Sergey Zolotarev --- src/gui/application.cpp | 5 ++++- src/gui/application.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index fdeba246a..9b38fb1b7 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -108,6 +108,7 @@ Application::Application(int &argc, char **argv) , _userTriggeredConnect(false) , _debugMode(false) , _backgroundMode(false) + , _isQuitting(false) { _startedAt.start(); @@ -283,7 +284,7 @@ void Application::slotAccountStateRemoved(AccountState *accountState) } // if there is no more account, show the wizard. - if (AccountManager::instance()->accounts().isEmpty()) { + if (!_isQuitting && AccountManager::instance()->accounts().isEmpty()) { // allow to add a new account if there is non any more. Always think // about single account theming! OwncloudSetupWizard::runWizard(this, SLOT(slotownCloudWizardDone(int))); @@ -306,6 +307,8 @@ void Application::slotAccountStateAdded(AccountState *accountState) void Application::slotCleanup() { + _isQuitting = true; + AccountManager::instance()->save(); FolderMan::instance()->unloadAndDeleteAllFolders(); diff --git a/src/gui/application.h b/src/gui/application.h index 77abd7a97..f0e24548e 100644 --- a/src/gui/application.h +++ b/src/gui/application.h @@ -114,6 +114,7 @@ private: bool _userTriggeredConnect; bool _debugMode; bool _backgroundMode; + bool _isQuitting; ClientProxy _proxy; -- 2.30.2