aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.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/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.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/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.cpp')
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.cpp
index cbbbb2ceb7..86571e6cbe 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.cpp
@@ -61,12 +61,12 @@ public:
QObject *object,
int debugId,
const QMetaProperty &prop,
- QQmlWatcher *parent = 0);
+ QQmlWatcher *parent = nullptr);
QQmlWatchProxy(int id,
QQmlExpression *exp,
int debugId,
- QQmlWatcher *parent = 0);
+ QQmlWatcher *parent = nullptr);
public slots:
void notifyValueChanged(); // Needs to be a slot because of QQmlPropertyPrivate::connect()
@@ -86,7 +86,7 @@ QQmlWatchProxy::QQmlWatchProxy(int id,
QQmlExpression *exp,
int debugId,
QQmlWatcher *parent)
-: QObject(parent), m_id(id), m_watch(parent), m_object(0), m_debugId(debugId), m_expr(exp)
+: QObject(parent), m_id(id), m_watch(parent), m_object(nullptr), m_debugId(debugId), m_expr(exp)
{
QObject::connect(m_expr, &QQmlExpression::valueChanged,
this, &QQmlWatchProxy::notifyValueChanged);
@@ -97,7 +97,7 @@ QQmlWatchProxy::QQmlWatchProxy(int id,
int debugId,
const QMetaProperty &prop,
QQmlWatcher *parent)
-: QObject(parent), m_id(id), m_watch(parent), m_object(object), m_debugId(debugId), m_property(prop), m_expr(0)
+: QObject(parent), m_id(id), m_watch(parent), m_object(object), m_debugId(debugId), m_property(prop), m_expr(nullptr)
{
static int refreshIdx = -1;
if(refreshIdx == -1)