aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-02-21 10:41:54 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-02-26 07:13:18 +0000
commit499ec43937e926e4f2fa57a9baa455fcb3862262 (patch)
tree206c90d47387f8322b68f5e3db613189397e1af3 /src/qmltest/quicktest.cpp
parent53d1e9ed21d25e65a2f13606af479838f5f21fe7 (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 'src/qmltest/quicktest.cpp')
-rw-r--r--src/qmltest/quicktest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index 817f9a5389..a02a0a806d 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -79,7 +79,7 @@ class QTestRootObject : public QObject
Q_PROPERTY(bool hasTestCase READ hasTestCase WRITE setHasTestCase NOTIFY hasTestCaseChanged)
Q_PROPERTY(QObject *defined READ defined)
public:
- QTestRootObject(QObject *parent = 0)
+ QTestRootObject(QObject *parent = nullptr)
: QObject(parent), hasQuit(false), m_windowShown(false), m_hasTestCase(false) {
m_defined = new QQmlPropertyMap(this);
#if defined(QT_OPENGL_ES_2_ANGLE)
@@ -191,7 +191,7 @@ bool qWaitForSignal(QObject *obj, const char* signal, int timeout = 5000)
if (remaining <= 0)
break;
QCoreApplication::processEvents(QEventLoop::AllEvents, remaining);
- QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
QTest::qSleep(10);
}
@@ -343,7 +343,7 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch
}
#endif
- QCoreApplication *app = 0;
+ QCoreApplication *app = nullptr;
if (!QCoreApplication::instance()) {
#ifdef QT_QMLTEST_WITH_WIDGETS
if (withWidgets)
@@ -577,7 +577,7 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch
}
// Flush the current logging stream.
- QuickTestResult::setProgramName(0);
+ QuickTestResult::setProgramName(nullptr);
delete app;
// Return the number of failures as the exit code.