From 7671ae8df7d13ddec235287bda57a9eac90b6d87 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 8 Jan 2015 16:52:23 +0100 Subject: [PATCH] Application: Initialize the folderman after we checked for existance So we don't start the SocketAPI if we are going to quit. We also do not log any message anymore before we install the hooks Should solve #2666 --- src/gui/application.cpp | 2 ++ src/gui/application.h | 2 +- src/gui/folderman.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index a1bbc7368..4aa0c283a 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -106,6 +106,8 @@ Application::Application(int &argc, char **argv) : setupLogging(); setupTranslations(); + _folderManager.reset(new FolderMan); + connect( this, SIGNAL(messageReceived(QString, QObject*)), SLOT(slotParseOptions(QString, QObject*))); // Create the account info manager to ensure it's listening to the diff --git a/src/gui/application.h b/src/gui/application.h index cedc37dcd..bcceeb95f 100644 --- a/src/gui/application.h +++ b/src/gui/application.h @@ -107,7 +107,7 @@ private: QTimer _checkConnectionTimer; - FolderMan folderManager; + QScopedPointer _folderManager; friend class ownCloudGui; // for _startupNetworkError }; diff --git a/src/gui/folderman.h b/src/gui/folderman.h index d3e209ef6..1c212f1f1 100644 --- a/src/gui/folderman.h +++ b/src/gui/folderman.h @@ -37,6 +37,7 @@ class FolderMan : public QObject { Q_OBJECT public: + ~FolderMan(); static FolderMan* instance(); int setupFolders(); @@ -173,7 +174,6 @@ private: static FolderMan *_instance; explicit FolderMan(QObject *parent = 0); - ~FolderMan(); friend class OCC::Application; };