summaryrefslogtreecommitdiff
path: root/src/controls/plugin.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-06-24 10:00:28 +0200
committerCaroline Chao <caroline.chao@theqtcompany.com>2015-05-12 14:45:47 +0000
commitd63da9df3ca50c3c234b2622aa1d892d9ca27676 (patch)
tree72d0e644ed305cb25b8fe1a07bf94dc94fd36e04 /src/controls/plugin.cpp
parentf7b3f11b47768f47f625874c1bd45da4296c0f82 (diff)
downloadqtquickcontrols-d63da9df3ca50c3c234b2622aa1d892d9ca27676.tar.gz
Add support for compiling QML files ahead of time
All this patch really does it not try to load any .qml files off the disk but always load from qrc. Change-Id: Ie0e1252605486b627d8d42156736734f13bb5ff9 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/controls/plugin.cpp')
-rw-r--r--src/controls/plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp
index 7e98509d..e6868569 100644
--- a/src/controls/plugin.cpp
+++ b/src/controls/plugin.cpp
@@ -188,11 +188,15 @@ QString QtQuickControlsPlugin::fileLocation() const
bool QtQuickControlsPlugin::isLoadedFromResource() const
{
+#if defined(ALWAYS_LOAD_FROM_RESOURCES)
+ return true;
+#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
}
QT_END_NAMESPACE