summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndy Maloney <asmaloney@gmail.com>2017-04-10 15:07:27 -0400
committerSean Harmer <sean.harmer@kdab.com>2017-04-12 19:34:12 +0000
commitc7eea417418b0d502b8a4acf9ddfc6d01ff29226 (patch)
treee001dfc90525dc9e0d4ca1717b2bbc28e21bfb44 /tests
parente0541bb009c976cd83ad13e34468cb957d8ff507 (diff)
QRenderCapture: add saveImage() to replace saveToFile()
QRenderCapture::saveToFile() does not return success/failure. Returning this properly means we don't have to verify success somehow. So add a new method called saveImage() to return the information, and deprecate saveToFile(). Change-Id: I7cf6639d90baa8bce8b90ee795d953a021de7978 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/rendercapture-cpp/mycapture.h2
-rw-r--r--tests/manual/rendercapture-qml/main.qml2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/rendercapture-cpp/mycapture.h b/tests/manual/rendercapture-cpp/mycapture.h
index cfd4afd6c..e142a5453 100644
--- a/tests/manual/rendercapture-cpp/mycapture.h
+++ b/tests/manual/rendercapture-cpp/mycapture.h
@@ -73,7 +73,7 @@ public slots:
m_imageLabel->setPixmap(QPixmap::fromImage(m_reply->image()));
- m_reply->saveToFile("capture.bmp");
+ m_reply->saveImage("capture.bmp");
delete m_reply;
m_reply = nullptr;
diff --git a/tests/manual/rendercapture-qml/main.qml b/tests/manual/rendercapture-qml/main.qml
index fdb2e3519..9aff1fefe 100644
--- a/tests/manual/rendercapture-qml/main.qml
+++ b/tests/manual/rendercapture-qml/main.qml
@@ -104,7 +104,7 @@ Item {
{
_renderCaptureProvider.updateImage(reply)
image.source = "image://rendercapture/" + cid
- reply.saveToFile("capture" + cid + ".png")
+ reply.saveImage("capture" + cid + ".png")
cid++
if (continuous === true)
doRenderCapture()