summaryrefslogtreecommitdiffstats
path: root/src/android/java/src
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2022-08-10 00:02:59 +0300
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2022-08-11 13:21:44 +0000
commitedc024e826d41a98cb7779e9834e83d7ea5da171 (patch)
treee9754903df078ce182f8d41b25365241d30dff20 /src/android/java/src
parent55af91f822027f079e435eb13d9bf379496fe1bb (diff)
Android: handle quoted args passed to an app
Currently, arguments passed to the app through applicationArguments extra bundle treat every space as an argument separator. This then doesn't handle the case where an argument is a space separated quoted multi-word. This is more apparent when androidtestrunner is passing test arguments to the app where an argument can be a test case with a data tag that contains a space, which then is treated as two separate tag names. This change makes sure that androidtestrunner quotes each argument, and the app doesn't split the arguments list by spaces, but rather passed the argument string directly to c++ where QProcess::splitCommand() is used to get the correct set of arguments that will be passed to main(). Pick-to: 6.4 6.3 6.2 Task-number: QTBUG-104730 Change-Id: I45d8ca979d90f2a383c84623f0eb2eec29bba727 Reviewed-by: Dimitrios Apostolou <jimis@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/android/java/src')
-rw-r--r--src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java b/src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java
index 66ba029ace..71595fb9fd 100644
--- a/src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java
+++ b/src/android/java/src/org/qtproject/qt/android/bindings/QtLoader.java
@@ -399,7 +399,7 @@ public abstract class QtLoader {
}
if (appParams != null)
- loaderParams.putString(APPLICATION_PARAMETERS_KEY, appParams.replace(' ', '\t').trim());
+ loaderParams.putString(APPLICATION_PARAMETERS_KEY, appParams);
loadApplication(loaderParams);
return;