aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 1d6547c5be..639027d668 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -375,6 +375,8 @@ private slots:
void testDragEventPropertyPropagation();
+ void createTextureFromImage();
+
private:
QTouchDevice *touchDevice;
QTouchDevice *touchDeviceWithVelocity;
@@ -2831,6 +2833,15 @@ void tst_qquickwindow::testDragEventPropertyPropagation()
}
}
+void tst_qquickwindow::createTextureFromImage()
+{
+ // An invalid image should return a null pointer.
+ QQuickWindow window;
+ window.show();
+ QTest::qWaitForWindowExposed(&window);
+ QVERIFY(!window.createTextureFromImage(QImage()));
+}
+
QTEST_MAIN(tst_qquickwindow)
#include "tst_qquickwindow.moc"