diff options
Diffstat (limited to 'singleapplication.cpp')
-rw-r--r-- | singleapplication.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/singleapplication.cpp b/singleapplication.cpp index a4f842e..276ceee 100644 --- a/singleapplication.cpp +++ b/singleapplication.cpp @@ -36,7 +36,7 @@ * @param options Optional flags to toggle specific behaviour * @param timeout Maximum time blocking functions are allowed during app load */ -SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSecondary, Options options, int timeout ) +SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSecondary, Options options, int timeout, QString userData ) : app_t( argc, argv ), d_ptr( new SingleApplicationPrivate( this ) ) { Q_D( SingleApplication ); @@ -51,6 +51,10 @@ SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSeconda // Store the current mode of the program d->options = options; + // Add any unique user data + if ( ! userData.isEmpty() ) + d->addAppData( userData ); + // Generating an application ID used for identifying the shared memory // block and QLocalServer d->genBlockServerName(); @@ -262,3 +266,9 @@ void SingleApplication::abortSafely() delete d; ::exit( EXIT_FAILURE ); } + +QStringList SingleApplication::userData() +{ + Q_D( SingleApplication ); + return d->appData(); +} |