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)
This commit is contained in:
Olivier Goffart 2013-12-10 12:46:00 +01:00
parent ebfe2c793e
commit b6e4575dea
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -95,6 +95,10 @@ Application::Application(int &argc, char **argv) :
//no need to waste time;
if ( _helpOnly ) return;
initialize();
if (isRunning())
return;
setupLogging();
setupTranslations();