aboutsummaryrefslogtreecommitdiff
path: root/singleapplication.h
diff options
context:
space:
mode:
authorItay Grudev <itay+github.com@grudev.com>2020-12-17 11:47:01 +0200
committerGitHub <noreply@github.com>2020-12-17 11:47:01 +0200
commitdc8042b5db58f36e06ba54f16f38b16c5eea9053 (patch)
tree1025557f8196116bf4c262c5ec4eecaf5707094e /singleapplication.h
parentUpdate CHANGELOG.md (diff)
parentAllow adding unique userdata to instances (diff)
downloadsingleapplication-dc8042b5db58f36e06ba54f16f38b16c5eea9053.tar.xz
Merge pull request #122 from LorenDB/master
Allow adding unique userdata to instances
Diffstat (limited to 'singleapplication.h')
-rw-r--r--singleapplication.h8
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 );