[Pkg-owncloud-commits] [owncloud-client] 47/89: Do not initialize all the application if another instance is running

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Dec 14 01:02:35 UTC 2013


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit b6e4575dea7f59bf12ab934615cbaec7c52bbd54
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Dec 10 12:46:00 2013 +0100

    Do not initialize all the application if another instance is running
    
    This fixes a crash becasue we were constructing the systemtray and then
    destroying it too early before the systemtray could initilize itself.
    (This work around a bug in QSystemTray which crashes if it is destroyed
    before it is registered to the X11 server)
---
 src/main.cpp               | 1 -
 src/mirall/application.cpp | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 3389072..043f800 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -35,7 +35,6 @@ int main(int argc, char **argv)
     Q_INIT_RESOURCE(mirall);
 
     Mirall::Application app(argc, argv);
-    app.initialize();
 #ifndef Q_OS_WIN
     signal(SIGPIPE, SIG_IGN);
 #endif
diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp
index c7af724..d529a2d 100644
--- a/src/mirall/application.cpp
+++ b/src/mirall/application.cpp
@@ -95,6 +95,10 @@ Application::Application(int &argc, char **argv) :
     //no need to waste time;
     if ( _helpOnly ) return;
 
+    initialize();
+    if (isRunning())
+        return;
+
     setupLogging();
     setupTranslations();
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list