summaryrefslogtreecommitdiffstats
path: root/src/controls/plugin.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-12 03:02:35 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-12 03:02:35 +0200
commitecaf7132fe47f3965cdf3e48a1c2d859f3911cd0 (patch)
tree5d4045c65c51bd953dd6118bc6cc24f8c2c817bc /src/controls/plugin.cpp
parent1bc05eceb7823b38ddec1d8e874f371fb8b2045f (diff)
parent59264fc24e3806a7e43379a2b8c610148f89cccb (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src/controls/plugin.cpp')
-rw-r--r--src/controls/plugin.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp
index 82eef8001..6d34f2858 100644
--- a/src/controls/plugin.cpp
+++ b/src/controls/plugin.cpp
@@ -239,30 +239,38 @@ void QtQuickControls1Plugin::initializeEngine(QQmlEngine *engine, const char *ur
QString QtQuickControls1Plugin::fileLocation() const
{
-#ifndef QT_STATIC
+#ifdef Q_OS_ANDROID
+ return "qrc:/android_rcc_bundle/qml/QtQuick/Controls";
+#else
+# ifndef QT_STATIC
if (isLoadedFromResource())
return "qrc:/QtQuick/Controls";
return baseUrl().toString();
-#else
+# else
return "qrc:/qt-project.org/imports/QtQuick/Controls";
+# endif
#endif
}
bool QtQuickControls1Plugin::isLoadedFromResource() const
{
-#ifdef QT_STATIC
+#ifdef Q_OS_ANDROID
+ return true;
+#else
+# ifdef QT_STATIC
// When static it is included automatically
// for us.
return false;
-#endif
-#if defined(ALWAYS_LOAD_FROM_RESOURCES)
+# endif
+# if defined(ALWAYS_LOAD_FROM_RESOURCES)
return true;
-#else
+# else
// If one file is missing, it will load all the files from the resource
QFile file(baseUrl().toLocalFile() + "/ApplicationWindow.qml");
if (!file.exists())
return true;
return false;
+# endif
#endif
}