aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/scenegraph
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-07-03 12:46:57 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2016-07-04 14:34:21 +0000
commita669a2cd49a832baefb945384fa26b3715a94e3e (patch)
treeddd203cdf1a776a17b10d804343016dbdfedebb1 /tests/auto/quick/scenegraph
parent123481f94e98f340aa1a19cbf0760dc22620889f (diff)
Stabilize tst_SceneGraph::createTextureFromImage
The test would crash half the time on my laptop due to the scene graph not being initialized and then returning a nullptr for the texture. At that point texture->hasAlphaChannel() crashes. Change-Id: I9220d9bd6abe6381752c26335f2b60fa8d2adccf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/quick/scenegraph')
-rw-r--r--tests/auto/quick/scenegraph/tst_scenegraph.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/quick/scenegraph/tst_scenegraph.cpp b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
index c0d1b53e92..791bcb215a 100644
--- a/tests/auto/quick/scenegraph/tst_scenegraph.cpp
+++ b/tests/auto/quick/scenegraph/tst_scenegraph.cpp
@@ -549,6 +549,7 @@ void tst_SceneGraph::createTextureFromImage()
QQuickView view;
view.show();
QTest::qWaitForWindowExposed(&view);
+ QTRY_VERIFY(view.isSceneGraphInitialized());
QScopedPointer<QSGTexture> texture(view.createTextureFromImage(image, (QQuickWindow::CreateTextureOptions) flags));
QCOMPARE(texture->hasAlphaChannel(), expectedAlpha);