summaryrefslogtreecommitdiffstats
path: root/src/controls/plugin.cpp
diff options
context:
space:
mode:
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
}