Commit fe324888 authored by Zoltan Gyarmati's avatar Zoltan Gyarmati

ktimetracker: using KUniqueApplication so only one

 instance is allowed at a time
REVIEW: 121339
BUG: 304778
BUG: 324259
parent 3329cf7d
......@@ -29,6 +29,7 @@
#include <KLocale>
#include <KStandardDirs>
#include <kontactinterface/pimuniqueapplication.h>
#include <kuniqueapplication.h>
#include "kdepim-version.h"
#include "mainwindow.h"
......@@ -123,7 +124,11 @@ int main( int argc, char *argv[] )
if ( !konsolemode )
{ // no konsole mode
KApplication myApp;
if (!KUniqueApplication::start()) {
kDebug(5970) << "Other instance is already running, exiting!";
return 0;
}
KUniqueApplication myApp;
MainWindow *mainWindow;
mainWindow = new MainWindow( icsfile( args ) );
if (kapp->isSessionRestored() && KMainWindow::canBeRestored( 1 ))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment