aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/qtquickmaterialstyleplugin.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-04-19 11:44:12 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-04-19 20:08:23 +0000
commitc2fdb4ecf3644015fa16e417c0939dd30f8b5a27 (patch)
tree13d691d97816b12fc49f2e5289f9855728c41719 /src/imports/controls/material/qtquickmaterialstyleplugin.cpp
parente91e832f4a0a3ad820c07efd13e761881eeee790 (diff)
Merge QQuickPluginUtils to QQuickStylePlugin
Now that we have a common base class for the plugins, we don't need a separate utils namespace. QQuickStylePlugin::typeUrl() is based on the former QQuickPluginUtils::pluginBasePath(). It returns a URL to the internal composite types that must be explicitly registered for static builds. Change-Id: Icf28c27c84f6b58b1e7b34203dad39c852f0d362 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/material/qtquickmaterialstyleplugin.cpp')
-rw-r--r--src/imports/controls/material/qtquickmaterialstyleplugin.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/imports/controls/material/qtquickmaterialstyleplugin.cpp b/src/imports/controls/material/qtquickmaterialstyleplugin.cpp
index 28a880cb..96ffbb56 100644
--- a/src/imports/controls/material/qtquickmaterialstyleplugin.cpp
+++ b/src/imports/controls/material/qtquickmaterialstyleplugin.cpp
@@ -42,7 +42,6 @@
#include "qquickmaterialprogressstrip_p.h"
#include <QtQuickControls2/private/qquickstyleselector_p.h>
-#include <QtQuickControls2/private/qquickpluginutils_p.h>
static inline void initResources()
{
@@ -83,17 +82,15 @@ void QtQuickMaterialStylePlugin::initializeEngine(QQmlEngine *engine, const char
{
QQuickStylePlugin::initializeEngine(engine, uri);
- const QString pluginBasePath = QQuickPluginUtils::pluginBasePath(*this);
-
QByteArray import = QByteArray(uri) + ".impl";
qmlRegisterType<QQuickMaterialProgressRing>(import, 1, 0, "ProgressRing");
qmlRegisterType<QQuickMaterialProgressStrip>(import, 1, 0, "ProgressStrip");
qmlRegisterType<QQuickMaterialRingAnimator>(import, 1, 0, "RingAnimator");
qmlRegisterType<QQuickMaterialStripAnimator>(import, 1, 0, "StripAnimator");
- qmlRegisterType(QUrl(pluginBasePath + QStringLiteral("/CheckIndicator.qml")), import, 1, 0, "CheckIndicator");
- qmlRegisterType(QUrl(pluginBasePath + QStringLiteral("/Ripple.qml")), import, 1, 0, "Ripple");
- qmlRegisterType(QUrl(pluginBasePath + QStringLiteral("/SliderHandle.qml")), import, 1, 0, "SliderHandle");
- qmlRegisterType(QUrl(pluginBasePath + QStringLiteral("/SwitchIndicator.qml")), import, 1, 0, "SwitchIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("CheckIndicator.qml")), import, 1, 0, "CheckIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("Ripple.qml")), import, 1, 0, "Ripple");
+ qmlRegisterType(typeUrl(QStringLiteral("SliderHandle.qml")), import, 1, 0, "SliderHandle");
+ qmlRegisterType(typeUrl(QStringLiteral("SwitchIndicator.qml")), import, 1, 0, "SwitchIndicator");
}
QString QtQuickMaterialStylePlugin::name() const