summaryrefslogtreecommitdiffstats
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
-rw-r--r--libraries/LocalPeer/include/LocalPeer.h5
-rw-r--r--libraries/LocalPeer/src/LocalPeer.cpp5
2 files changed, 9 insertions, 1 deletions
diff --git a/libraries/LocalPeer/include/LocalPeer.h b/libraries/LocalPeer/include/LocalPeer.h
index 940bfcbd..7558f18e 100644
--- a/libraries/LocalPeer/include/LocalPeer.h
+++ b/libraries/LocalPeer/include/LocalPeer.h
@@ -54,8 +54,11 @@ public: /* methods */
static ApplicationId fromTraditionalApp();
// ID based on a path with all the application data (no two instances with the same data path should run)
static ApplicationId fromPathAndVersion(const QString & dataPath, const QString & version);
- // fully custom ID
+ // custom ID
static ApplicationId fromCustomId(const QString & id);
+ // custom ID, based on a raw string previously acquired from 'toString'
+ static ApplicationId fromRawString(const QString & id);
+
QString toString()
{
diff --git a/libraries/LocalPeer/src/LocalPeer.cpp b/libraries/LocalPeer/src/LocalPeer.cpp
index db0c73e5..f71c62d8 100644
--- a/libraries/LocalPeer/src/LocalPeer.cpp
+++ b/libraries/LocalPeer/src/LocalPeer.cpp
@@ -108,6 +108,11 @@ ApplicationId ApplicationId::fromCustomId(const QString& id)
return ApplicationId(QLatin1String("qtsingleapp-") + id);
}
+ApplicationId ApplicationId::fromRawString(const QString& id)
+{
+ return ApplicationId(id);
+}
+
LocalPeer::LocalPeer(QObject * parent, const ApplicationId &appId)
: QObject(parent), id(appId)
{