aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger
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/qml/debugger
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/qml/debugger')
-rw-r--r--src/qml/debugger/qqmlabstractprofileradapter_p.h4
-rw-r--r--src/qml/debugger/qqmlconfigurabledebugservice_p.h2
-rw-r--r--src/qml/debugger/qqmldebugconnector.cpp10
-rw-r--r--src/qml/debugger/qqmldebugconnector_p.h2
-rw-r--r--src/qml/debugger/qqmldebugserverconnection_p.h2
-rw-r--r--src/qml/debugger/qqmldebugservice_p.h2
-rw-r--r--src/qml/debugger/qqmlprofiler_p.h2
7 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/debugger/qqmlabstractprofileradapter_p.h b/src/qml/debugger/qqmlabstractprofileradapter_p.h
index 5d1b339324..f86855e964 100644
--- a/src/qml/debugger/qqmlabstractprofileradapter_p.h
+++ b/src/qml/debugger/qqmlabstractprofileradapter_p.h
@@ -68,8 +68,8 @@ class Q_QML_PRIVATE_EXPORT QQmlAbstractProfilerAdapter : public QObject, public
public:
static const int s_numMessagesPerBatch = 1000;
- QQmlAbstractProfilerAdapter(QObject *parent = 0) :
- QObject(parent), service(0), waiting(true), featuresEnabled(0) {}
+ QQmlAbstractProfilerAdapter(QObject *parent = nullptr) :
+ QObject(parent), service(nullptr), waiting(true), featuresEnabled(0) {}
virtual ~QQmlAbstractProfilerAdapter() {}
void setService(QQmlProfilerService *new_service) { service = new_service; }
diff --git a/src/qml/debugger/qqmlconfigurabledebugservice_p.h b/src/qml/debugger/qqmlconfigurabledebugservice_p.h
index e09d5f779a..96ec46f475 100644
--- a/src/qml/debugger/qqmlconfigurabledebugservice_p.h
+++ b/src/qml/debugger/qqmlconfigurabledebugservice_p.h
@@ -63,7 +63,7 @@ template <class Base>
class QQmlConfigurableDebugService : public Base
{
protected:
- QQmlConfigurableDebugService(float version, QObject *parent = 0) :
+ QQmlConfigurableDebugService(float version, QObject *parent = nullptr) :
Base(version, parent), m_configMutex(QMutex::Recursive)
{
init();
diff --git a/src/qml/debugger/qqmldebugconnector.cpp b/src/qml/debugger/qqmldebugconnector.cpp
index 01f74f08be..d9f51ce09f 100644
--- a/src/qml/debugger/qqmldebugconnector.cpp
+++ b/src/qml/debugger/qqmldebugconnector.cpp
@@ -66,7 +66,7 @@ struct QQmlDebugConnectorParams {
QString arguments;
QQmlDebugConnector *instance;
- QQmlDebugConnectorParams() : instance(0)
+ QQmlDebugConnectorParams() : instance(nullptr)
{
if (qApp) {
QCoreApplicationPrivate *appD =
@@ -109,7 +109,7 @@ QQmlDebugConnector *QQmlDebugConnector::instance()
{
QQmlDebugConnectorParams *params = qmlDebugConnectorParams();
if (!params)
- return 0;
+ return nullptr;
if (!QQmlEnginePrivate::qml_debugging_enabled) {
if (!params->arguments.isEmpty()) {
@@ -118,14 +118,14 @@ QQmlDebugConnector *QQmlDebugConnector::instance()
"has not been enabled.").arg(params->arguments);
params->arguments.clear();
}
- return 0;
+ return nullptr;
}
if (!params->instance) {
if (!params->pluginKey.isEmpty()) {
params->instance = loadQQmlDebugConnector(params->pluginKey);
} else if (params->arguments.isEmpty()) {
- return 0; // no explicit class name given and no command line arguments
+ return nullptr; // no explicit class name given and no command line arguments
} else if (params->arguments.startsWith(QLatin1String("connector:"))) {
static const int connectorBegin = int(strlen("connector:"));
@@ -169,7 +169,7 @@ QQmlDebugConnectorFactory::~QQmlDebugConnectorFactory()
params->arguments.clear();
params->services.clear();
delete params->instance;
- params->instance = 0;
+ params->instance = nullptr;
}
}
diff --git a/src/qml/debugger/qqmldebugconnector_p.h b/src/qml/debugger/qqmldebugconnector_p.h
index a2a6f5047d..cead6af338 100644
--- a/src/qml/debugger/qqmldebugconnector_p.h
+++ b/src/qml/debugger/qqmldebugconnector_p.h
@@ -114,7 +114,7 @@ public:
static Service *service()
{
QQmlDebugConnector *inst = instance();
- return inst ? static_cast<Service *>(inst->service(Service::s_key)) : 0;
+ return inst ? static_cast<Service *>(inst->service(Service::s_key)) : nullptr;
}
protected:
diff --git a/src/qml/debugger/qqmldebugserverconnection_p.h b/src/qml/debugger/qqmldebugserverconnection_p.h
index 536ad830b4..9c4af4d225 100644
--- a/src/qml/debugger/qqmldebugserverconnection_p.h
+++ b/src/qml/debugger/qqmldebugserverconnection_p.h
@@ -61,7 +61,7 @@ class Q_QML_PRIVATE_EXPORT QQmlDebugServerConnection : public QObject
{
Q_OBJECT
public:
- QQmlDebugServerConnection(QObject *parent = 0) : QObject(parent) {}
+ QQmlDebugServerConnection(QObject *parent = nullptr) : QObject(parent) {}
virtual void setServer(QQmlDebugServer *server) = 0;
virtual bool setPortRange(int portFrom, int portTo, bool block, const QString &hostaddress) = 0;
diff --git a/src/qml/debugger/qqmldebugservice_p.h b/src/qml/debugger/qqmldebugservice_p.h
index 34bbd631ec..e9f7d2d396 100644
--- a/src/qml/debugger/qqmldebugservice_p.h
+++ b/src/qml/debugger/qqmldebugservice_p.h
@@ -93,7 +93,7 @@ public:
static QObject *objectForId(int id) { return objectsForIds().value(id); }
protected:
- explicit QQmlDebugService(const QString &, float version, QObject *parent = 0);
+ explicit QQmlDebugService(const QString &, float version, QObject *parent = nullptr);
signals:
void attachedToEngine(QJSEngine *);
diff --git a/src/qml/debugger/qqmlprofiler_p.h b/src/qml/debugger/qqmlprofiler_p.h
index 58db26f2ac..deb4d107d6 100644
--- a/src/qml/debugger/qqmlprofiler_p.h
+++ b/src/qml/debugger/qqmlprofiler_p.h
@@ -450,7 +450,7 @@ struct QQmlCompilingProfiler : public QQmlProfilerHelper {
struct QQmlVmeProfiler : public QQmlProfilerDefinitions {
public:
- QQmlVmeProfiler() : profiler(0) {}
+ QQmlVmeProfiler() : profiler(nullptr) {}
void init(QQmlProfiler *p, int maxDepth)
{