From d2897a6c85d46d41ea531ac66345cfdec230e7c9 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 7 May 2018 15:40:23 +0200 Subject: QQuickStylePlugin: prepare for Qt Quick Compiler Don't hardcode the URL (QRC in static vs. FS in dynamic), but make use of QQuickFileSelector so the appropriate URL gets chosen "for free". This way, we can later add Qt Quick Compiler support for the internal QML files, such as CheckIndicator.qml. Change-Id: Ie1c55f3d82fbf92d0116966b354298338ef5ace6 Reviewed-by: Mitch Curtis --- .../material/qtquickcontrols2materialstyleplugin.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/imports/controls/material') diff --git a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp index 603582b0..09dda329 100644 --- a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp +++ b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp @@ -77,14 +77,14 @@ void QtQuickControls2MaterialStylePlugin::registerTypes(const char *uri) qmlRegisterType(import, 2, 0, "BusyIndicatorImpl"); qmlRegisterType(import, 2, 0, "ProgressBarImpl"); qmlRegisterType(import, 2, 0, "Ripple"); - qmlRegisterType(typeUrl(QStringLiteral("BoxShadow.qml")), import, 2, 0, "BoxShadow"); - qmlRegisterType(typeUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 0, "CheckIndicator"); - qmlRegisterType(typeUrl(QStringLiteral("CursorDelegate.qml")), import, 2, 0, "CursorDelegate"); - qmlRegisterType(typeUrl(QStringLiteral("ElevationEffect.qml")), import, 2, 0, "ElevationEffect"); - qmlRegisterType(typeUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 0, "RadioIndicator"); - qmlRegisterType(typeUrl(QStringLiteral("RectangularGlow.qml")), import, 2, 0, "RectangularGlow"); - qmlRegisterType(typeUrl(QStringLiteral("SliderHandle.qml")), import, 2, 0, "SliderHandle"); - qmlRegisterType(typeUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 0, "SwitchIndicator"); + qmlRegisterType(resolvedUrl(QStringLiteral("BoxShadow.qml")), import, 2, 0, "BoxShadow"); + qmlRegisterType(resolvedUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 0, "CheckIndicator"); + qmlRegisterType(resolvedUrl(QStringLiteral("CursorDelegate.qml")), import, 2, 0, "CursorDelegate"); + qmlRegisterType(resolvedUrl(QStringLiteral("ElevationEffect.qml")), import, 2, 0, "ElevationEffect"); + qmlRegisterType(resolvedUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 0, "RadioIndicator"); + qmlRegisterType(resolvedUrl(QStringLiteral("RectangularGlow.qml")), import, 2, 0, "RectangularGlow"); + qmlRegisterType(resolvedUrl(QStringLiteral("SliderHandle.qml")), import, 2, 0, "SliderHandle"); + qmlRegisterType(resolvedUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 0, "SwitchIndicator"); } QString QtQuickControls2MaterialStylePlugin::name() const -- cgit v1.2.3