From 7cbf3685565d7f62c9a01b090a4c1600b4abe220 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 13 Sep 2017 11:32:27 +0200 Subject: Imagine: fix QRC paths Using ApplicationWindow as an example, its NinePatchImage url is assigned like so: source: Imagine.path + "applicationwindow-background" If Imagine.path is set to ":/images" by the user, then the final URL would be: QUrl("file:///home/user/qt/qtbase/qml/QtQuick/Controls.2/Imagine/:/images/applicationwindow-background") We could use a QUrl for QQuickImagineStyle::path, but we don't want to support anything other than local paths. Instead, we add a private "url" property that returns a URL that we construct correctly in C++ ourselves, and then the Imagine QML controls files use that property. Change-Id: Ic4d1910bbc7f7b6f80f257496ae6131777a19401 Reviewed-by: J-P Nurmi --- src/imports/controls/imagine/Dial.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/imports/controls/imagine/Dial.qml') diff --git a/src/imports/controls/imagine/Dial.qml b/src/imports/controls/imagine/Dial.qml index 22dd44b6..04f8e1b8 100644 --- a/src/imports/controls/imagine/Dial.qml +++ b/src/imports/controls/imagine/Dial.qml @@ -56,7 +56,7 @@ T.Dial { x: background.x + background.width / 2 - handle.width / 2 y: background.y + background.height / 2 - handle.height / 2 - source: Imagine.path + "dial-handle" + source: Imagine.url + "dial-handle" ImageSelector on source { states: [ {"disabled": !control.enabled}, @@ -85,7 +85,7 @@ T.Dial { width: Math.max(64, Math.min(control.width, control.height)) height: width - source: Imagine.path + "dial-background" + source: Imagine.url + "dial-background" NinePatchImageSelector on source { states: [ {"disabled": !control.enabled}, -- cgit v1.2.3