diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-04-08 12:32:03 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-04-11 11:03:13 +0000 |
commit | 199962af4d107c5681c1601298195069dc437ecc (patch) | |
tree | 39c1c6582600e98b859940b597e331040c6b53fe /src/imports/controls/material/qtquickmaterialstyleplugin.cpp | |
parent | 92718d8abaac8584a7315b0836619c4b06335de5 (diff) |
Use the pluginBasePath() to get the right base path for the configuration
Using pluginBasePath() ensures that it finds the qml files in the expected
place so it needs to use this to work correctly when statically built.
Change-Id: I685a98efc284a7c7d2b6a182f269a09e381a3472
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
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.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/imports/controls/material/qtquickmaterialstyleplugin.cpp b/src/imports/controls/material/qtquickmaterialstyleplugin.cpp index a0336226..821a9a65 100644 --- a/src/imports/controls/material/qtquickmaterialstyleplugin.cpp +++ b/src/imports/controls/material/qtquickmaterialstyleplugin.cpp @@ -42,6 +42,7 @@ #include "qquickmaterialprogressstrip_p.h" #include <QtQuickControls/private/qquickstyleselector_p.h> +#include <QtQuickControls/private/qquickpluginutils_p.h> static inline void initResources() { @@ -82,13 +83,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(baseUrl().toString() + QStringLiteral("/Ripple.qml")), import, 1, 0, "Ripple"); - qmlRegisterType(QUrl(baseUrl().toString() + QStringLiteral("/SliderHandle.qml")), import, 1, 0, "SliderHandle"); + qmlRegisterType(QUrl(pluginBasePath + QStringLiteral("/Ripple.qml")), import, 1, 0, "Ripple"); + qmlRegisterType(QUrl(pluginBasePath + QStringLiteral("/SliderHandle.qml")), import, 1, 0, "SliderHandle"); } QString QtQuickMaterialStylePlugin::name() const |