on xenial help sign in
Use Qt.resolvedUrl() for image paths.
commitf6f3e9388771afb27e6a7e40dfa3b481535e9574 authorMichał Sawicz <michal.sawicz@canonical.com> dateTue 17 Dec 2013, 20:15 (13 years ago) parent44f42fc
5 files changed+15−15
qml/Shell.qml+1−1 tests/qmltests/Dash/tst_Dash.qml+5−5 tests/qmltests/Dash/tst_DashContent.qml+5−5 tests/qmltests/Greeter/tst_Phone.qml+2−2 tests/qmltests/tst_Shell.qml+2−2
qml/Shell.qml+1−1
@@ -44,7 +44,7 @@ FocusScope {
4444 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
4545
4646 property real edgeSize: units.gu(2)
47− property url defaultBackground: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
47+ property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
4848 property url background
4949 readonly property real panelHeight: panel.panelHeight
5050
tests/qmltests/Dash/tst_Dash.qml+5−5
@@ -36,12 +36,12 @@ Item {
3636 ScopeDelegateMapper {
3737 id: scopeDelegateMapper
3838 scopeDelegateMapping: {
39− "MockScope1": "../tests/qmltests/Dash/qml/fake_scopeView1.qml",
40− "MockScope2": "../tests/qmltests/Dash/qml/fake_scopeView2.qml",
41− "home.scope": "../tests/qmltests/Dash/qml/fake_scopeView3.qml",
42− "applications.scope": "../tests/qmltests/Dash/qml/fake_scopeView4.qml"
39+ "MockScope1": Qt.resolvedUrl("qml/fake_scopeView1.qml"),
40+ "MockScope2": Qt.resolvedUrl("qml/fake_scopeView2.qml"),
41+ "home.scope": Qt.resolvedUrl("qml/fake_scopeView3.qml"),
42+ "applications.scope": Qt.resolvedUrl("qml/fake_scopeView4.qml")
4343 }
44− genericScope: "../tests/qmltests/Dash/qml/fake_generic_scopeView.qml"
44+ genericScope: Qt.resolvedUrl("qml/fake_generic_scopeView.qml")
4545 }
4646
4747 UT.UnityTestCase {
tests/qmltests/Dash/tst_DashContent.qml+5−5
@@ -64,12 +64,12 @@ Item {
6464 ScopeDelegateMapper {
6565 id: scopeDelegateMapper
6666 scopeDelegateMapping: {
67− "MockScope1": "../tests/qmltests/Dash/qml/fake_scopeView1.qml",
68− "MockScope2": "../tests/qmltests/Dash/qml/fake_scopeView2.qml",
69− "home.scope": "../tests/qmltests/Dash/qml/fake_scopeView3.qml",
70− "applications.scope": "../tests/qmltests/Dash/qml/fake_scopeView4.qml"
67+ "MockScope1": Qt.resolvedUrl("qml/fake_scopeView1.qml"),
68+ "MockScope2": Qt.resolvedUrl("qml/fake_scopeView2.qml"),
69+ "home.scope": Qt.resolvedUrl("qml/fake_scopeView3.qml"),
70+ "applications.scope": Qt.resolvedUrl("qml/fake_scopeView4.qml")
7171 }
72− genericScope: "../tests/qmltests/Dash/qml/fake_generic_scopeView.qml"
72+ genericScope: Qt.resolvedUrl("qml/fake_generic_scopeView.qml")
7373 }
7474
7575 function clear_scope_status() {
tests/qmltests/Greeter/tst_Phone.qml+2−2
@@ -33,7 +33,7 @@ Item {
3333 height: parent.height
3434 x: 0; y: 0
3535
36− defaultBackground: "../../../graphics/phone_background.jpg"
36+ defaultBackground: Qt.resolvedUrl("../../../qml/graphics/phone_background.jpg")
3737
3838 property int minX: 0
3939
@@ -135,7 +135,7 @@ Item {
135135
136136 function test_background_data() {
137137 return [
138− {tag: "set", accounts: "../tests/data/unity/backgrounds/blue.png", expected: "blue.png"},
138+ {tag: "set", accounts: Qt.resolvedUrl("../../data/unity/backgrounds/blue.png"), expected: "blue.png"},
139139 {tag: "unset", accounts: "", expected: "background.jpg"},
140140 {tag: "invalid", accounts: "invalid", expected: "background.jpg"},
141141 ]
tests/qmltests/tst_Shell.qml+2−2
@@ -469,8 +469,8 @@ Item {
469469
470470 function test_background_data() {
471471 return [
472− {tag: "red", url: "tests/data/unity/backgrounds/red.png", expectedUrl: "tests/data/unity/backgrounds/red.png"},
473− {tag: "blue", url: "tests/data/unity/backgrounds/blue.png", expectedUrl: "tests/data/unity/backgrounds/blue.png"},
472+ {tag: "red", url: Qt.resolvedUrl("../data/unity/backgrounds/red.png"), expectedUrl: "tests/data/unity/backgrounds/red.png"},
473+ {tag: "blue", url: Qt.resolvedUrl("../data/unity/backgrounds/blue.png"), expectedUrl: "tests/data/unity/backgrounds/blue.png"},
474474 {tag: "invalid", url: "invalid", expectedUrl: shell.defaultBackground},
475475 {tag: "empty", url: "", expectedUrl: shell.defaultBackground}
476476 ]