Android: split arguments passed to the main app

Keep the same behavior as desktop platforms with
QApplication::arguments() should return a string list of args
not a string of args together.

Task-number: QTCREATORBUG-23712
Change-Id: I1874655427f5c902ca81a3fcf6183d0eeccbfef7
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This commit is contained in:
Assam Boudjelthia 2020-08-13 14:55:50 +03:00
parent 561e38f799
commit 24af3ebef3

View File

@ -456,7 +456,8 @@ static jboolean startQtAndroidPlugin(JNIEnv *env, jobject /*object*/, jstring pa
QByteArray string = nativeString;
env->ReleaseStringUTFChars(paramsString, nativeString);
m_applicationParams=string.split('\t');
for (auto str : string.split('\t'))
m_applicationParams.append(str.split(' '));
// Go home
QDir::setCurrent(QDir::homePath());