summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2018-04-05 22:40:40 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2018-04-06 07:51:20 +0000
commit4236296929974acc4fefc9e83380668f6c1138bf (patch)
tree752ba56c5a16274fe407f9760cc3b294d50f3816
parentb0e1dad17cdd7782b74c96cd9c0bb4384ddd3c9c (diff)
downloadqtapplicationmanager-4236296929974acc4fefc9e83380668f6c1138bf.tar.gz
Add support for commandline arguments in native applications
Change-Id: Ie8954faf545d5a20ad1da73b47f5e02f794640dd Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
-rw-r--r--doc/manifest.qdoc14
-rw-r--r--src/manager-lib/nativeruntime.cpp2
2 files changed, 14 insertions, 2 deletions
diff --git a/doc/manifest.qdoc b/doc/manifest.qdoc
index 378cb3de..4e49230e 100644
--- a/doc/manifest.qdoc
+++ b/doc/manifest.qdoc
@@ -253,22 +253,32 @@ The meaning of the fields within the \c info.yaml actual manifest data (second Y
\endtable
-These \c runtimeParameters are currently defined by both the \c qml and \c qml-inprocess runtimes:
+The \c runtimeParameters are specific to the actual runtimes, so the table below has
+an additional column specifying which runtime a configuration option applies to:
+
\table
\header
- \li Field name
+ \li Name
+ \li Runtimes
\li Type
\li Description
\row
\li \c loadDummyData
+ \li qml, qml-in-process
\li bool
\li Automatically load dummy-data for the application, using the same algorithm as
Qt's \c qmlscene tool. By default no dummy-data is loaded.
\row
\li \c importPaths
+ \li qml, qml-in-process
\li array<string>
\li A list of paths that should be added to the QML-engine's import paths - this is the same
as setting \c QML2_IMPORT_PATH for a program started from the command line.
+\row
+ \li \c arguments
+ \li native
+ \li array<string>
+ \li A list of command line parameters that are used when starting the application's executable.
\endtable
\section1 Alias Manifests
diff --git a/src/manager-lib/nativeruntime.cpp b/src/manager-lib/nativeruntime.cpp
index cf5c1ed7..4c87d1d8 100644
--- a/src/manager-lib/nativeruntime.cpp
+++ b/src/manager-lib/nativeruntime.cpp
@@ -335,6 +335,8 @@ bool NativeRuntime::start()
if (m_needsLauncher) {
m_launchWhenReady = true;
} else {
+ args.append(variantToStringList(m_app->runtimeParameters().value(qSL("arguments"))));
+
if (!m_document.isNull())
args << qSL("--start-argument") << m_document;
}