diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2020-12-10 19:18:00 -0500 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2020-12-16 22:17:24 -0500 |
commit | f236032cf988950c12ebd8ff5e3cd3f9778ea55a (patch) | |
tree | 1025557f8196116bf4c262c5ec4eecaf5707094e /singleapplication.h | |
parent | Update CHANGELOG.md (diff) | |
download | singleapplication-f236032cf988950c12ebd8ff5e3cd3f9778ea55a.tar.xz |
Allow adding unique userdata to instances
Diffstat (limited to 'singleapplication.h')
-rw-r--r-- | singleapplication.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/singleapplication.h b/singleapplication.h index cba6a91..d39a661 100644 --- a/singleapplication.h +++ b/singleapplication.h @@ -85,7 +85,7 @@ public: * Usually 4*timeout would be the worst case (fail) scenario. * @see See the corresponding QAPPLICATION_CLASS constructor for reference */ - explicit SingleApplication( int &argc, char *argv[], bool allowSecondary = false, Options options = Mode::User, int timeout = 1000 ); + explicit SingleApplication( int &argc, char *argv[], bool allowSecondary = false, Options options = Mode::User, int timeout = 1000, QString userData = QString() ); ~SingleApplication() override; /** @@ -133,6 +133,12 @@ public: */ bool sendMessage( const QByteArray &message, int timeout = 100 ); + /** + * @brief Get the set user data. + * @returns {QStringList} + */ + QStringList userData(); + Q_SIGNALS: void instanceStarted(); void receivedMessage( quint32 instanceId, QByteArray message ); |