Daemon is a KUniqueApplication now, to avoid having more than one instance

This commit is contained in:
Albert Vaca 2014-04-12 22:49:00 +02:00
parent de252af3a6
commit f1bd54a508

View file

@ -24,7 +24,7 @@
#include <unistd.h>
#include <QSocketNotifier>
#include <KApplication>
#include <KUniqueApplication>
#include <KAboutData>
#include <KCmdLineArgs>
@ -70,11 +70,10 @@ int main(int argc, char* argv[])
KCmdLineArgs::init(argc, argv, &aboutData);
KApplication app(true); // WARNING GUI required for QClipboard access
KUniqueApplication app(true); // WARNING GUI required for QClipboard access
app.disableSessionManagement();
app.setQuitOnLastWindowClosed(false);
//Force daemon to destroy when KApplications in alive
//belongs to bug KApplications resoure freeing
Daemon* daemon = new Daemon(0);