qmltest::item-grabber - fix image paths

When running qmltest::itemgrabber we save grabbed image into the qmltest dir
but using this name later as 'source' (relative) url we fail to load image.

Task-number: QTBUG-53782
Change-Id: Ibd1f32d8bc13ff155b23491401075638cef16987
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Timur Pocheptsov 2016-06-21 12:24:38 +02:00
parent 99e181a543
commit ec77984db9
1 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ Item {
property int callCount: 0;
property bool ready: false;
function handleGrab(result) {
if (!result.saveToFile("image.png"))
if (!result.saveToFile("itemgrabber/image.png"))
print("Error: Failed to save image to disk...");
source = "image.png";
ready = true;
@ -121,7 +121,7 @@ Item {
y: 0
property bool ready: false;
function handleGrab(result) {
if (!result.saveToFile("image_small.png"))
if (!result.saveToFile("itemgrabber/image_small.png"))
print("Error: Failed to save image to disk...");
source = "image_small.png";
ready = true;