diff options
author | Robert Griebl <robert.griebl@pelagicore.com> | 2018-11-05 15:10:08 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2018-11-06 20:29:22 +0000 |
commit | 04daa3f14b890c54be9007e190f2feb3244dd30a (patch) | |
tree | b9dff95f51840787cb244a498ca031c5d36ac518 /src/launcher-lib/launchermain.cpp | |
parent | 7ca842fd28f9afa761f37c8ffbf0296af4c2b890 (diff) |
Expose the applicationId to the qml runtime launcher
This makes it easier for the C++ side of the launcher to get the current
applicationId.
Change-Id: Idb7a339c4ce8302e2085cea0262426eee4005021
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'src/launcher-lib/launchermain.cpp')
-rw-r--r-- | src/launcher-lib/launchermain.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/launcher-lib/launchermain.cpp b/src/launcher-lib/launchermain.cpp index b437d119..42809b7a 100644 --- a/src/launcher-lib/launchermain.cpp +++ b/src/launcher-lib/launchermain.cpp @@ -167,6 +167,16 @@ void LauncherMain::clearWindowPropertyCache(QWindow *window) #endif } +QString LauncherMain::applicationId() const +{ + return property("__am_applicationId").toString(); +} + +void LauncherMain::setApplicationId(const QString &applicationId) +{ + setProperty("__am_applicationId", applicationId); +} + void LauncherMain::loadConfiguration(const QByteArray &configYaml) Q_DECL_NOEXCEPT_EXPR(false) { auto docs = QtYaml::variantDocumentsFromYaml(configYaml.isEmpty() ? qgetenv("AM_CONFIG") |