]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Don't run connection wizard when quitting the application
authorSergey Zolotarev <sryze@protonmail.com>
Sat, 5 Oct 2019 16:37:46 +0000 (22:37 +0600)
committerSergey Zolotarev <sryze@protonmail.com>
Sat, 5 Oct 2019 16:38:47 +0000 (22:38 +0600)
Signed-off-by: Sergey Zolotarev <sryze@protonmail.com>
src/gui/application.cpp
src/gui/application.h

index fdeba246a9371b9fb8d43a171ebd9f341b8c3a0c..9b38fb1b7c6acb9e84e24df4d5e1eb85a22f7f85 100644 (file)
@@ -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();
 
index 77abd7a97e19827dcee5e9d57d7c2d301937dbd1..f0e24548e29e3b2bd725a6ecddaa65022efc25b0 100644 (file)
@@ -114,6 +114,7 @@ private:
     bool _userTriggeredConnect;
     bool _debugMode;
     bool _backgroundMode;
+    bool _isQuitting;
 
     ClientProxy _proxy;