diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-21 10:41:54 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-26 07:13:18 +0000 |
commit | 499ec43937e926e4f2fa57a9baa455fcb3862262 (patch) | |
tree | 206c90d47387f8322b68f5e3db613189397e1af3 /tests/auto/qml/qqmlenginecleanup | |
parent | 53d1e9ed21d25e65a2f13606af479838f5f21fe7 (diff) |
use nullptr consistently (clang-tidy)
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.
Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).
Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlenginecleanup')
-rw-r--r-- | tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp b/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp index 7e9a1524b0..b9cede6d13 100644 --- a/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp +++ b/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp @@ -129,7 +129,7 @@ static void cleanState(QQmlEngine **e) delete *e; qmlClearTypeRegistrations(); *e = new QQmlEngine; - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); + QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete); QCoreApplication::processEvents(); } @@ -139,7 +139,7 @@ void tst_qqmlenginecleanup::test_valueTypeProviderModule() // provider can be reinitialized after multiple calls to // qmlClearTypeRegistrations() without causing cycles in the // value type provider list. - QQmlEngine *e = 0; + QQmlEngine *e = nullptr; QUrl testFile1 = testFileUrl("testFile1.qml"); QUrl testFile2 = testFileUrl("testFile2.qml"); bool noCycles = false; @@ -149,7 +149,7 @@ void tst_qqmlenginecleanup::test_valueTypeProviderModule() c.loadUrl(i % 2 == 0 ? testFile1 : testFile2); // this will hang if cycles exist. } delete e; - e = 0; + e = nullptr; noCycles = true; QVERIFY(noCycles); |