diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-07-12 13:17:02 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-07-12 16:00:51 +0200 |
commit | 83f8d886cee0a40ac1ad5e43e597f309f602ad76 (patch) | |
tree | 9f8bf09cd21346bec5c87fca8538c02278eff34a /tests/auto/quick/scenegraph/tst_scenegraph.cpp | |
parent | 392521048ce6ef43a127b3dba199eee58557b1f6 (diff) |
Fix some compiler warnings in tests
- Signedness of integer comparison
- Unused parameters and variables
- Ignored return values of QTest::qWaitForWindowExposed() (nodiscard)
- float to int conversions
Change-Id: Ibece620d3c980a5af3b7717486c841d8072ed8af
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/quick/scenegraph/tst_scenegraph.cpp')
-rw-r--r-- | tests/auto/quick/scenegraph/tst_scenegraph.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/quick/scenegraph/tst_scenegraph.cpp b/tests/auto/quick/scenegraph/tst_scenegraph.cpp index c15f1e941e..3f605348c3 100644 --- a/tests/auto/quick/scenegraph/tst_scenegraph.cpp +++ b/tests/auto/quick/scenegraph/tst_scenegraph.cpp @@ -75,8 +75,8 @@ public: delete node; node = new QSGNode; - const int w = width(); - const int h = height(); + const int w = int(width()); + const int h = int(height()); QQuickWindow *win = window(); for (int y = 0; y < h; ++y) { for (int x = 0; x < w; ++x) { @@ -569,8 +569,8 @@ bool tst_SceneGraph::isRunningOnOpenGLDirectly() decided = true; QQuickView dummy; dummy.show(); - QTest::qWaitForWindowExposed(&dummy); - retval = dummy.rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL; + if (QTest::qWaitForWindowExposed(&dummy)) + retval = dummy.rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL; dummy.hide(); } return retval; |