aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/qtquickcontrolsplugin.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2016-04-06 07:54:14 +0200
committerMitch Curtis <mitch.curtis@theqtcompany.com>2016-04-08 15:54:23 +0000
commite3c52b20080dfad7b5c2eced9ddb8e5389f2c52f (patch)
treeeae595a77c3f56cc9ff03b98ebe3470252b46763 /src/imports/controls/qtquickcontrolsplugin.cpp
parent4d947c15ca527f0548b6ff7229cd8000b8f2b91c (diff)
Make each style's 'base' directory available to initializeEngine()
This is needed to register private QML files that are necessary for the implementation of some controls. Previously, this information was only available in registerTypes(). Change-Id: I9d0c293d6fad2afbf240771044165b048b77136c Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/qtquickcontrolsplugin.cpp')
-rw-r--r--src/imports/controls/qtquickcontrolsplugin.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/imports/controls/qtquickcontrolsplugin.cpp b/src/imports/controls/qtquickcontrolsplugin.cpp
index 83ceab73..076ba57b 100644
--- a/src/imports/controls/qtquickcontrolsplugin.cpp
+++ b/src/imports/controls/qtquickcontrolsplugin.cpp
@@ -46,6 +46,7 @@
#include <QtQuickTemplates/private/qquickcontainer_p.h>
#include <QtQuickTemplates/private/qquickcontrol_p.h>
#include <QtQuickTemplates/private/qquickpopup_p.h>
+#include <QtQuickControls/private/qquickpluginutils_p.h>
#include <QtQuickControls/private/qquickstyleselector_p.h>
#include "qquickbusyindicatorring_p.h"
@@ -86,10 +87,7 @@ void QtQuickControlsPlugin::registerTypes(const char *uri)
qmlRegisterType<QQuickControl>(uri, 1, 0, "Control");
QQuickStyleSelector selector;
- if (QFile::exists(QLatin1String(":/qt-project.org/imports/Qt/labs/controls/ApplicationWindow.qml")))
- selector.setBaseUrl(QUrl(QLatin1String("qrc:/qt-project.org/imports/Qt/labs/controls")));
- else
- selector.setBaseUrl(baseUrl());
+ selector.setBaseUrl(QQuickPluginUtils::pluginBaseUrl(*this));
const QString style = QQuickStyle::name();
if (!style.isEmpty())