on xenial help sign in
Merge default-wallpaper
afff23fMichael Terry
qml/Shell.qml+1−1
@@ -156,7 +156,7 @@ StyledItem {
156 // our default wallpaper). We use a name=wallpaper argument here to
156 // our default wallpaper). We use a name=wallpaper argument here to
157 // make sure we don't litter our cache with lots of scaled images. We
157 // make sure we don't litter our cache with lots of scaled images. We
158 // only need to bother caching one at a time.
158 // only need to bother caching one at a time.
159− readonly property url cachedBackground: "image://unity8imagecache/" + background + "?name=wallpaper"
159+ readonly property url cachedBackground: background ? "image://unity8imagecache/" + background + "?name=wallpaper" : ""
160
160
161 GSettings {
161 GSettings {
162 id: backgroundSettings
162 id: backgroundSettings
tests/plugins/ImageCache/CMakeLists.txt+1−1
@@ -16,5 +16,5 @@ add_executable(ImageCacheTestExec
16qt5_use_modules(ImageCacheTestExec Core Quick Test)
16qt5_use_modules(ImageCacheTestExec Core Quick Test)
17add_unity8_uitest(ImageCache ImageCacheTestExec
17add_unity8_uitest(ImageCache ImageCacheTestExec
18 DEPENDS ImageCache-qml
18 DEPENDS ImageCache-qml
19− IMPORT_PATHS ${UNITY_MOCKPATH}
19+ IMPORT_PATHS ${UNITY_PLUGINPATH}
20 )
20 )
tests/qmltests/tst_Shell.qml+5−4
@@ -1344,21 +1344,22 @@ Rectangle {
1344 var wallpaperResolver = findInvisibleChild(shell, "wallpaperResolver");
1344 var wallpaperResolver = findInvisibleChild(shell, "wallpaperResolver");
1345 var greeter = findChild(shell, "greeter");
1345 var greeter = findChild(shell, "greeter");
1346 verify(!greeter.hasCustomBackground);
1346 verify(!greeter.hasCustomBackground);
1347− compare(greeter.background, wallpaperResolver.defaultBackground);
1347+ compare(wallpaperResolver.background, wallpaperResolver.defaultBackground);
1348
1348
1349 AccountsService.backgroundFile = Qt.resolvedUrl("../graphics/applicationIcons/dash.png");
1349 AccountsService.backgroundFile = Qt.resolvedUrl("../graphics/applicationIcons/dash.png");
1350 tryCompare(greeter, "hasCustomBackground", true);
1350 tryCompare(greeter, "hasCustomBackground", true);
1351− compare(greeter.background, AccountsService.backgroundFile);
1351+ compare(wallpaperResolver.background, AccountsService.backgroundFile);
1352 }
1352 }
1353
1353
1354− function test_cachedDefaultBackground() {
1354+ function test_cachedBackground() {
1355 loadShell("desktop");
1355 loadShell("desktop");
1356 shell.usageScenario = "desktop";
1356 shell.usageScenario = "desktop";
1357 waitForRendering(shell);
1357 waitForRendering(shell);
1358
1358
1359 var greeter = findChild(shell, "greeter");
1359 var greeter = findChild(shell, "greeter");
1360 verify(!greeter.hasCustomBackground);
1360 verify(!greeter.hasCustomBackground);
1361− compare(greeter.background.toString().indexOf("image://thumbnailer/file:///"), 0);
1361+ compare(greeter.background.toString().indexOf("image://unity8imagecache/file:///"), 0);
1362+ verify(greeter.background.toString().indexOf("?name=wallpaper") > 0);
1362 }
1363 }
1363
1364
1364 function test_tapOnRightEdgeReachesApplicationSurface() {
1365 function test_tapOnRightEdgeReachesApplicationSurface() {