Android: use a canonical data dir for Qt environment variables
ApplicationInfo.dataDir holds "/data/user/0" (Blackberry PRIV running Android 6.0.1), which is in fact a soft link to "/data/data". This directory is used as a prefix for various Qt environment variables, including QML2_IMPORT_PATH, which in turn is used for resolving QML type URIs, looking up Qt Quick Controls 2 styles, and so on. The QML engine is not happy with "/data/data" and "/data/user/0" being wildly mixed for QML types in the same module. Use the canonical path instead to avoid such conflicts. Change-Id: I1fd45736728ee662942d7ef48c3fbc553981c59b Task-number: QTBUG-64868 Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
984ad61249
commit
50117d738a
|
|
@ -569,7 +569,8 @@ public abstract class QtLoader {
|
|||
boolean bundlingQtLibs = false;
|
||||
if (m_contextInfo.metaData.containsKey("android.app.bundle_local_qt_libs")
|
||||
&& m_contextInfo.metaData.getInt("android.app.bundle_local_qt_libs") == 1) {
|
||||
localPrefix = m_context.getApplicationInfo().dataDir + "/";
|
||||
File dataDir = new File(m_context.getApplicationInfo().dataDir);
|
||||
localPrefix = dataDir.getCanonicalPath() + "/";
|
||||
pluginsPrefix = localPrefix + "qt-reserved-files/";
|
||||
|
||||
if (libsDir == null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue