Allow QtCreator to pass additional args and env vars to the application.
We need them to allow developers to easily pass args and env. vars like QSG_RENDER_TIMINGS, QSG_VISUALIZE to theirs apps. The env vars and params must be base64 encoded! Change-Id: I1d781873ffdc6efd40b30543a9fd2514bbdede43 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
parent
3056b825bd
commit
f81e76da1e
@ -55,6 +55,7 @@ import android.os.Bundle;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.ResultReceiver;
|
import android.os.ResultReceiver;
|
||||||
import android.text.method.MetaKeyKeyListener;
|
import android.text.method.MetaKeyKeyListener;
|
||||||
|
import android.util.Base64;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
@ -660,6 +661,22 @@ public class QtActivityDelegate
|
|||||||
m_applicationParameters += "\t-qmljsdebugger=" + qmljsdebugger;
|
m_applicationParameters += "\t-qmljsdebugger=" + qmljsdebugger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (extras.containsKey("extraenvvars")) {
|
||||||
|
try {
|
||||||
|
m_environmentVariables += "\t" + new String(Base64.decode(extras.getString("extraenvvars"), Base64.DEFAULT), "UTF-8");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (extras.containsKey("extraappparams")) {
|
||||||
|
try {
|
||||||
|
m_applicationParameters += "\t" + new String(Base64.decode(extras.getString("extraappparams"), Base64.DEFAULT), "UTF-8");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (null == m_surfaces)
|
if (null == m_surfaces)
|
||||||
onCreate(null);
|
onCreate(null);
|
||||||
String nativeLibraryDir = QtNativeLibrariesDir.nativeLibrariesDir(m_activity);
|
String nativeLibraryDir = QtNativeLibrariesDir.nativeLibrariesDir(m_activity);
|
||||||
|
Loading…
Reference in New Issue
Block a user