diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-09-30 15:16:55 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-11-30 07:24:47 +0000 |
commit | 2fd3d8ea9e3e1829653942431070a83569bab6eb (patch) | |
tree | 7803eed14bf3064b4d2c1420c0f0c94482463b6d /tests/auto/widgets/graphicsview/qgraphicsview | |
parent | 97b8fdab7d3604294476bf566b024ecbd5b412b0 (diff) |
tests/auto/widgets: use QCOMPARE(., nullptr)
.. instead of manually casted 0s.
QCOMPARE(., nullptr) was added for Qt 5.8. Make use of the new API.
In tst_qwidget.cpp, as a drive-by, change
qApp->focusWidget() -> QApplication::focusWidget()
Change-Id: I1331b8916b026d48e01534d1ed0b3d72f3f3d50c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsview')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 2e76ea3bb3..c8bdcbde09 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -489,7 +489,7 @@ void tst_QGraphicsView::scene() QCOMPARE(view.scene(), &scene); } - QCOMPARE(view.scene(), (QGraphicsScene *)0); + QCOMPARE(view.scene(), nullptr); } void tst_QGraphicsView::setScene() @@ -529,9 +529,9 @@ void tst_QGraphicsView::deleteScene() QGraphicsView view3(scene); view3.show(); delete scene; - QCOMPARE(view1.scene(), (QGraphicsScene *)0); - QCOMPARE(view2.scene(), (QGraphicsScene *)0); - QCOMPARE(view3.scene(), (QGraphicsScene *)0); + QCOMPARE(view1.scene(), nullptr); + QCOMPARE(view2.scene(), nullptr); + QCOMPARE(view3.scene(), nullptr); } void tst_QGraphicsView::sceneRect() |