Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Zolotarev <sryze@protonmail.com>2019-10-05 19:37:46 +0300
committerCamila San <hello@camila.codes>2019-11-05 00:40:18 +0300
commitc4a04bfd05b053726b06c83800f0c5a759b300b2 (patch)
treee70bc514658a4800d3d333fd1e6e09768cf20399
parent03711429f4077293c0b5e2cf2050582032a69360 (diff)
Don't run connection wizard when quitting the application
Signed-off-by: Sergey Zolotarev <sryze@protonmail.com>
-rw-r--r--src/gui/application.cpp5
-rw-r--r--src/gui/application.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/application.cpp b/src/gui/application.cpp
index 24a8a25b9..5ca9d25f7 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();
@@ -285,7 +286,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)));
@@ -308,6 +309,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;