summaryrefslogtreecommitdiff
path: root/src/plugins/qmltooling
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmltooling')
-rw-r--r--src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp2
-rw-r--r--src/plugins/qmltooling/packetprotocol/qpacketprotocol_p.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp4
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp20
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp14
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.cpp4
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/highlight.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/inspecttool.cpp4
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp8
-rw-r--r--src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.cpp18
-rw-r--r--src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp17
-rw-r--r--src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_messages/qdebugmessageservicefactory.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp4
-rw-r--r--src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp6
-rw-r--r--src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp4
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapterfactory.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp12
-rw-r--r--src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp26
25 files changed, 79 insertions, 92 deletions
diff --git a/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp b/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp
index e541810330..5460d617dd 100644
--- a/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp
+++ b/src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp
@@ -247,7 +247,7 @@ void QPacketProtocol::readyToRead()
disconnect(d->dev, &QIODevice::readyRead, this, &QPacketProtocol::readyToRead);
disconnect(d->dev, &QIODevice::aboutToClose, this, &QPacketProtocol::aboutToClose);
disconnect(d->dev, &QIODevice::bytesWritten, this, &QPacketProtocol::bytesWritten);
- d->dev = 0;
+ d->dev = nullptr;
emit invalidPacket();
return;
}
diff --git a/src/plugins/qmltooling/packetprotocol/qpacketprotocol_p.h b/src/plugins/qmltooling/packetprotocol/qpacketprotocol_p.h
index 7fd722f17f..35edb568aa 100644
--- a/src/plugins/qmltooling/packetprotocol/qpacketprotocol_p.h
+++ b/src/plugins/qmltooling/packetprotocol/qpacketprotocol_p.h
@@ -63,7 +63,7 @@ class QPacketProtocol : public QObject
Q_OBJECT
Q_DECLARE_PRIVATE(QPacketProtocol)
public:
- explicit QPacketProtocol(QIODevice *dev, QObject *parent = 0);
+ explicit QPacketProtocol(QIODevice *dev, QObject *parent = nullptr);
void send(const QByteArray &data);
qint64 packetsAvailable() const;
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp
index 9315adf4ce..3851cdc71f 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qqmldebuggerservicefactory.cpp
@@ -52,7 +52,7 @@ QQmlDebugService *QQmlDebuggerServiceFactory::create(const QString &key)
if (key == QV4DebugServiceImpl::s_key)
return new QV4DebugServiceImpl(this);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
index 80da09d718..288ad243ce 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
@@ -61,7 +61,7 @@
QT_BEGIN_NAMESPACE
QQmlEngineDebugServiceImpl::QQmlEngineDebugServiceImpl(QObject *parent) :
- QQmlEngineDebugService(2, parent), m_watch(new QQmlWatcher(this)), m_statesDelegate(0)
+ QQmlEngineDebugService(2, parent), m_watch(new QQmlWatcher(this)), m_statesDelegate(nullptr)
{
connect(m_watch, &QQmlWatcher::propertyChanged,
this, &QQmlEngineDebugServiceImpl::propertyChanged);
@@ -726,7 +726,7 @@ bool QQmlEngineDebugServiceImpl::resetBinding(int objectId, const QString &prope
if (hasValidSignal(object, propertyName)) {
QQmlProperty property(object, propertyName, context);
- QQmlPropertyPrivate::setSignalExpression(property, 0);
+ QQmlPropertyPrivate::setSignalExpression(property, nullptr);
return true;
}
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)
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
index a538956e8e..c86f3d1803 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
@@ -69,19 +69,19 @@ QV4::Heap::ExecutionContext *QV4DataCollector::findContext(int frame)
{
QV4::CppStackFrame *f = findFrame(frame);
- return f ? f->context()->d() : 0;
+ return f ? f->context()->d() : nullptr;
}
QV4::Heap::CallContext *QV4DataCollector::findScope(QV4::Heap::ExecutionContext *ctx, int scope)
{
if (!ctx)
- return 0;
+ return nullptr;
for (; scope > 0 && ctx; --scope)
ctx = ctx->outer;
return (ctx && ctx->type == QV4::Heap::ExecutionContext::Type_CallContext) ?
- static_cast<QV4::Heap::CallContext *>(ctx) : 0;
+ static_cast<QV4::Heap::CallContext *>(ctx) : nullptr;
}
QVector<QV4::Heap::ExecutionContext::ContextType> QV4DataCollector::getScopeTypes(int frame)
@@ -139,16 +139,16 @@ const QV4::Object *collectProperty(const QV4::ScopedValue &value, QV4::Execution
switch (value->type()) {
case QV4::Value::Empty_Type:
Q_ASSERT(!"empty Value encountered");
- return 0;
+ return nullptr;
case QV4::Value::Undefined_Type:
dict.insert(valueKey, QJsonValue::Undefined);
- return 0;
+ return nullptr;
case QV4::Value::Null_Type:
dict.insert(valueKey, QJsonValue::Null);
- return 0;
+ return nullptr;
case QV4::Value::Boolean_Type:
dict.insert(valueKey, value->booleanValue());
- return 0;
+ return nullptr;
case QV4::Value::Managed_Type:
if (const QV4::String *s = value->as<QV4::String>()) {
dict.insert(valueKey, s->toQString());
@@ -176,10 +176,10 @@ const QV4::Object *collectProperty(const QV4::ScopedValue &value, QV4::Execution
} else {
Q_UNREACHABLE();
}
- return 0;
+ return nullptr;
case QV4::Value::Integer_Type:
dict.insert(valueKey, value->integerValue());
- return 0;
+ return nullptr;
default: {// double
const double val = value->doubleValue();
if (qIsFinite(val))
@@ -190,7 +190,7 @@ const QV4::Object *collectProperty(const QV4::ScopedValue &value, QV4::Execution
dict.insert(valueKey, QStringLiteral("-Infinity"));
else
dict.insert(valueKey, QStringLiteral("Infinity"));
- return 0;
+ return nullptr;
}
}
}
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp
index 45817ea38e..a1ed211a55 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp
@@ -71,8 +71,8 @@ QV4Debugger::QV4Debugger(QV4::ExecutionEngine *engine)
, m_haveBreakPoints(false)
, m_breakOnThrow(false)
, m_returnedValue(engine, QV4::Primitive::undefinedValue())
- , m_gatherSources(0)
- , m_runningJob(0)
+ , m_gatherSources(nullptr)
+ , m_runningJob(nullptr)
, m_collector(engine)
{
static int debuggerId = qRegisterMetaType<QV4Debugger*>();
@@ -182,7 +182,7 @@ void QV4Debugger::maybeBreakAtInstruction()
if (m_gatherSources) {
m_gatherSources->run();
delete m_gatherSources;
- m_gatherSources = 0;
+ m_gatherSources = nullptr;
}
switch (m_stepping) {
@@ -295,11 +295,11 @@ bool QV4Debugger::reallyHitTheBreakPoint(const QString &filename, int linenr)
if (condition.isEmpty())
return true;
- Q_ASSERT(m_runningJob == 0);
+ Q_ASSERT(m_runningJob == nullptr);
EvalJob evilJob(m_engine, condition);
m_runningJob = &evilJob;
m_runningJob->run();
- m_runningJob = 0;
+ m_runningJob = nullptr;
return evilJob.resultAsBoolean();
}
@@ -313,7 +313,7 @@ void QV4Debugger::runInEngine(QV4DebugJob *job)
void QV4Debugger::runInEngine_havingLock(QV4DebugJob *job)
{
Q_ASSERT(job);
- Q_ASSERT(m_runningJob == 0);
+ Q_ASSERT(m_runningJob == nullptr);
m_runningJob = job;
if (state() == Paused)
@@ -321,7 +321,7 @@ void QV4Debugger::runInEngine_havingLock(QV4DebugJob *job)
else
emit scheduleJob();
m_jobIsRunning.wait(&m_lock);
- m_runningJob = 0;
+ m_runningJob = nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.cpp
index 87e75c49b5..71645579c5 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.cpp
@@ -56,13 +56,13 @@ QV4Debugger *QV4DebuggerAgent::pausedDebugger() const
if (debugger->state() == QV4Debugger::Paused)
return debugger;
}
- return 0;
+ return nullptr;
}
bool QV4DebuggerAgent::isRunning() const
{
// "running" means none of the engines are paused.
- return pausedDebugger() == 0;
+ return pausedDebugger() == nullptr;
}
void QV4DebuggerAgent::debuggerPaused(QV4Debugger *debugger, QV4Debugger::PauseReason reason)
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
index 6f254c9e28..5b049ab521 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
@@ -208,7 +208,7 @@ void ValueLookupJob::run()
QScopedPointer<QObject> scopeObject;
QV4::ExecutionEngine *engine = collector->engine();
QV4::Scope scope(engine);
- QV4::Heap::ExecutionContext *qmlContext = 0;
+ QV4::Heap::ExecutionContext *qmlContext = nullptr;
if (engine->qmlEngine() && !engine->qmlContext()) {
scopeObject.reset(new QObject);
qmlContext = QV4::QmlContext::create(engine->currentContext(),
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
index 99a57be5d6..61209e08cb 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
@@ -98,7 +98,7 @@ public:
debugService->send(response);
}
- debugService = 0;
+ debugService = nullptr;
seq = QJsonValue();
req = QJsonObject();
response = QJsonObject();
diff --git a/src/plugins/qmltooling/qmldbg_inspector/highlight.cpp b/src/plugins/qmltooling/qmldbg_inspector/highlight.cpp
index c7307db240..0d6cd45354 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/highlight.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/highlight.cpp
@@ -100,7 +100,7 @@ void Highlight::adjust()
return;
bool success = false;
- m_transform = m_item->itemTransform(0, &success);
+ m_transform = m_item->itemTransform(nullptr, &success);
if (!success)
m_transform = QTransform();
diff --git a/src/plugins/qmltooling/qmldbg_inspector/inspecttool.cpp b/src/plugins/qmltooling/qmldbg_inspector/inspecttool.cpp
index bc146b176c..1781670cf3 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/inspecttool.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/inspecttool.cpp
@@ -62,8 +62,8 @@ InspectTool::InspectTool(QQuickWindowInspector *inspector, QQuickWindow *view) :
m_contentItem(view->contentItem()),
m_touchTimestamp(0),
m_hoverHighlight(new HoverHighlight(inspector->overlay())),
- m_lastItem(0),
- m_lastClickedItem(0)
+ m_lastItem(nullptr),
+ m_lastClickedItem(nullptr)
{
//Timer to display selected item's name
m_nameDisplayTimer.setSingleShot(true);
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp b/src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp
index d0d8d62615..fa27adedfd 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/qqmlinspectorservice.cpp
@@ -49,7 +49,7 @@ class QQmlInspectorServiceImpl : public QQmlInspectorService
{
Q_OBJECT
public:
- QQmlInspectorServiceImpl(QObject *parent = 0);
+ QQmlInspectorServiceImpl(QObject *parent = nullptr);
void addWindow(QQuickWindow *window) override;
void setParentWindow(QQuickWindow *window, QWindow *parent) override;
@@ -72,7 +72,7 @@ private:
};
QQmlInspectorServiceImpl::QQmlInspectorServiceImpl(QObject *parent):
- QQmlInspectorService(1, parent), m_globalInspector(0)
+ QQmlInspectorService(1, parent), m_globalInspector(nullptr)
{
connect(this, &QQmlInspectorServiceImpl::scheduleMessage,
this, &QQmlInspectorServiceImpl::messageFromClient, Qt::QueuedConnection);
@@ -95,7 +95,7 @@ QmlJSDebugger::GlobalInspector *QQmlInspectorServiceImpl::checkInspector()
}
} else if (m_globalInspector) {
delete m_globalInspector;
- m_globalInspector = 0;
+ m_globalInspector = nullptr;
}
return m_globalInspector;
}
@@ -138,7 +138,7 @@ void QQmlInspectorServiceImpl::messageFromClient(const QByteArray &message)
QQmlDebugService *QQmlInspectorServiceFactory::create(const QString &key)
{
- return key == QQmlInspectorServiceImpl::s_key ? new QQmlInspectorServiceImpl(this) : 0;
+ return key == QQmlInspectorServiceImpl::s_key ? new QQmlInspectorServiceImpl(this) : nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.cpp b/src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.cpp
index d3bd1ac956..09eb6bfc28 100644
--- a/src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_inspector/qquickwindowinspector.cpp
@@ -54,14 +54,14 @@ static QQuickItem *itemAt(QQuickItem *item, const QPointF &pos,
QQuickItem *overlay)
{
if (item == overlay)
- return 0;
+ return nullptr;
if (!item->isVisible() || item->opacity() == 0.0)
- return 0;
+ return nullptr;
if (item->flags() & QQuickItem::ItemClipsChildrenToShape) {
if (!QRectF(0, 0, item->width(), item->height()).contains(pos))
- return 0;
+ return nullptr;
}
QList<QQuickItem *> children = QQuickItemPrivate::get(item)->paintOrderChildItems();
@@ -73,10 +73,10 @@ static QQuickItem *itemAt(QQuickItem *item, const QPointF &pos,
}
if (!(item->flags() & QQuickItem::ItemHasContents))
- return 0;
+ return nullptr;
if (!QRectF(0, 0, item->width(), item->height()).contains(pos))
- return 0;
+ return nullptr;
return item;
}
@@ -111,8 +111,8 @@ QQuickWindowInspector::QQuickWindowInspector(QQuickWindow *quickWindow, QObject
QObject(parent),
m_overlay(new QQuickItem),
m_window(quickWindow),
- m_parentWindow(0),
- m_tool(0)
+ m_parentWindow(nullptr),
+ m_tool(nullptr)
{
setParentWindow(quickWindow);
@@ -199,7 +199,7 @@ void QQuickWindowInspector::setShowAppOnTop(bool appOnTop)
bool QQuickWindowInspector::isEnabled() const
{
- return m_tool != 0;
+ return m_tool != nullptr;
}
void QQuickWindowInspector::setEnabled(bool enabled)
@@ -208,7 +208,7 @@ void QQuickWindowInspector::setEnabled(bool enabled)
m_tool = new InspectTool(this, m_window);
} else {
delete m_tool;
- m_tool = 0;
+ m_tool = nullptr;
}
}
diff --git a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp
index e60644518f..dd0e4c6a04 100644
--- a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp
+++ b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp
@@ -71,18 +71,13 @@ private:
void connectionEstablished();
bool connectToServer();
- bool m_block;
+ bool m_block = false;
QString m_filename;
- QLocalSocket *m_socket;
- QQmlDebugServer *m_debugServer;
+ QLocalSocket *m_socket = nullptr;
+ QQmlDebugServer *m_debugServer = nullptr;
};
-QLocalClientConnection::QLocalClientConnection() :
- m_block(false),
- m_socket(0),
- m_debugServer(0)
-{
-}
+QLocalClientConnection::QLocalClientConnection() { }
QLocalClientConnection::~QLocalClientConnection()
{
@@ -106,7 +101,7 @@ void QLocalClientConnection::disconnect()
m_socket->waitForBytesWritten();
m_socket->deleteLater();
- m_socket = 0;
+ m_socket = nullptr;
}
bool QLocalClientConnection::setPortRange(int portFrom, int portTo, bool block,
@@ -161,7 +156,7 @@ void QLocalClientConnection::connectionEstablished()
QQmlDebugServerConnection *QLocalClientConnectionFactory::create(const QString &key)
{
- return (key == QLatin1String("QLocalClientConnection") ? new QLocalClientConnection : 0);
+ return (key == QLatin1String("QLocalClientConnection") ? new QLocalClientConnection : nullptr);
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp b/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp
index bdfed03a40..2bf9210b37 100644
--- a/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp
@@ -51,7 +51,7 @@ void DebugMessageHandler(QtMsgType type, const QMessageLogContext &ctxt,
}
QDebugMessageServiceImpl::QDebugMessageServiceImpl(QObject *parent) :
- QDebugMessageService(2, parent), oldMsgHandler(0),
+ QDebugMessageService(2, parent), oldMsgHandler(nullptr),
prevState(QQmlDebugService::NotConnected)
{
// don't execute stateChanged() in parallel
diff --git a/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservicefactory.cpp b/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservicefactory.cpp
index 860d654128..177ca1fe80 100644
--- a/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservicefactory.cpp
+++ b/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservicefactory.cpp
@@ -48,7 +48,7 @@ QQmlDebugService *QDebugMessageServiceFactory::create(const QString &key)
if (key == QDebugMessageServiceImpl::s_key)
return new QDebugMessageServiceImpl(this);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
index a4b3455eff..93ac875e2d 100644
--- a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
+++ b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
@@ -224,7 +224,7 @@ QQmlDebugService *QQmlNativeDebugConnector::service(const QString &name) const
if ((*i)->name() == name)
return *i;
}
- return 0;
+ return nullptr;
}
void QQmlNativeDebugConnector::addEngine(QJSEngine *engine)
@@ -360,7 +360,7 @@ void QQmlNativeDebugConnector::sendMessages(const QString &name, const QList<QBy
QQmlDebugConnector *QQmlNativeDebugConnectorFactory::create(const QString &key)
{
- return key == QLatin1String("QQmlNativeDebugConnector") ? new QQmlNativeDebugConnector : 0;
+ return key == QLatin1String("QQmlNativeDebugConnector") ? new QQmlNativeDebugConnector : nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
index ba33de9714..718975275a 100644
--- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
@@ -229,7 +229,7 @@ private:
QV4::ExecutionEngine *m_engine;
QQmlNativeDebugServiceImpl *m_service;
- QV4::CppStackFrame *m_currentFrame = 0;
+ QV4::CppStackFrame *m_currentFrame = nullptr;
Speed m_stepping;
bool m_pauseRequested;
bool m_runningJob;
@@ -457,7 +457,7 @@ void Collector::collect(QJsonArray *out, const QString &parentIName, const QStri
void NativeDebugger::handleVariables(QJsonObject *response, const QJsonObject &arguments)
{
TRACE_PROTOCOL("Build variables");
- QV4::CppStackFrame *frame = 0;
+ QV4::CppStackFrame *frame = nullptr;
decodeFrame(arguments.value(QLatin1String("context")).toString(), &frame);
if (!frame) {
setError(response, QStringLiteral("No stack frame passed"));
@@ -500,7 +500,7 @@ void NativeDebugger::handleVariables(QJsonObject *response, const QJsonObject &a
void NativeDebugger::handleExpressions(QJsonObject *response, const QJsonObject &arguments)
{
TRACE_PROTOCOL("Evaluate expressions");
- QV4::CppStackFrame *frame = 0;
+ QV4::CppStackFrame *frame = nullptr;
decodeFrame(arguments.value(QLatin1String("context")).toString(), &frame);
if (!frame) {
setError(response, QStringLiteral("No stack frame passed"));
diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.cpp
index 1841c82d5d..c0b74c74ff 100644
--- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.cpp
+++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservicefactory.cpp
@@ -48,7 +48,7 @@ QQmlDebugService *QQmlNativeDebugServiceFactory::create(const QString &key)
if (key == QQmlNativeDebugServiceImpl::s_key)
return new QQmlNativeDebugServiceImpl(this);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
index 4c798e0131..92e93a053a 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
@@ -242,7 +242,7 @@ void QQmlProfilerServiceImpl::startProfiling(QJSEngine *engine, quint64 features
d << m_timer.nsecsElapsed() << static_cast<qint32>(Event) << static_cast<qint32>(StartTrace);
bool startedAny = false;
- if (engine != 0) {
+ if (engine != nullptr) {
const auto range = qAsConst(m_engineProfilers).equal_range(engine);
for (auto it = range.first; it != range.second; ++it) {
QQmlAbstractProfilerAdapter *profiler = *it;
@@ -297,7 +297,7 @@ void QQmlProfilerServiceImpl::stopProfiling(QJSEngine *engine)
i != m_engineProfilers.end(); ++i) {
if (i.value()->isRunning()) {
m_startTimes.insert(-1, i.value());
- if (engine == 0 || i.key() == engine) {
+ if (engine == nullptr || i.key() == engine) {
stopping << i.value();
} else {
reporting << i.value();
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp
index 0cd3e0b4ab..81a1a35d18 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp
@@ -51,7 +51,7 @@ QQmlDebugService *QQmlProfilerServiceFactory::create(const QString &key)
if (key == QQmlEngineControlServiceImpl::s_key)
return new QQmlEngineControlServiceImpl(this);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapterfactory.cpp b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapterfactory.cpp
index f38307b1f7..66addee2e8 100644
--- a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapterfactory.cpp
+++ b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapterfactory.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
QQmlAbstractProfilerAdapter *QQuickProfilerAdapterFactory::create(const QString &key)
{
if (key != QLatin1String("QQuickProfilerAdapter"))
- return 0;
+ return nullptr;
return new QQuickProfilerAdapter(this);
}
diff --git a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp
index f87ade568b..1814e28b83 100644
--- a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp
+++ b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp
@@ -88,7 +88,7 @@ class QQmlDebugServerImpl;
class QQmlDebugServerThread : public QThread
{
public:
- QQmlDebugServerThread() : m_server(0), m_portFrom(-1), m_portTo(-1) {}
+ QQmlDebugServerThread() : m_server(nullptr), m_portFrom(-1), m_portTo(-1) {}
void setServer(QQmlDebugServerImpl *server)
{
@@ -228,7 +228,7 @@ void QQmlDebugServerImpl::cleanup()
void QQmlDebugServerThread::run()
{
- Q_ASSERT_X(m_server != 0, Q_FUNC_INFO, "There should always be a debug server available here.");
+ Q_ASSERT_X(m_server != nullptr, Q_FUNC_INFO, "There should always be a debug server available here.");
QQmlDebugServerConnection *connection = loadQQmlDebugServerConnection(m_pluginName);
if (connection) {
{
@@ -274,7 +274,7 @@ static void cleanupOnShutdown()
}
QQmlDebugServerImpl::QQmlDebugServerImpl() :
- m_connection(0),
+ m_connection(nullptr),
m_gotHello(false),
m_blockingMode(false),
m_clientSupportsMultiPackets(false)
@@ -570,7 +570,7 @@ void QQmlDebugServerImpl::removeThread()
QThread *parentThread = m_thread.thread();
delete m_connection;
- m_connection = 0;
+ m_connection = nullptr;
// Move it back to the parent thread so that we can potentially restart it on a new thread.
moveToThread(parentThread);
@@ -755,13 +755,13 @@ void QQmlDebugServerImpl::invalidPacket()
m_connection->disconnect();
// protocol might still be processing packages at this point
m_protocol->deleteLater();
- m_protocol = 0;
+ m_protocol = nullptr;
}
QQmlDebugConnector *QQmlDebugServerFactory::create(const QString &key)
{
// Cannot parent it to this because it gets moved to another thread
- return (key == QLatin1String("QQmlDebugServer") ? new QQmlDebugServerImpl : 0);
+ return (key == QLatin1String("QQmlDebugServer") ? new QQmlDebugServerImpl : nullptr);
}
QT_END_NAMESPACE
diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
index c2aafda863..32ce820ea8 100644
--- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
+++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
@@ -70,24 +70,16 @@ private:
void newConnection();
bool listen();
- int m_portFrom;
- int m_portTo;
- bool m_block;
+ int m_portFrom = 0;
+ int m_portTo = 0;
+ bool m_block = false;
QString m_hostaddress;
- QTcpSocket *m_socket;
- QTcpServer *m_tcpServer;
- QQmlDebugServer *m_debugServer;
+ QTcpSocket *m_socket = nullptr;
+ QTcpServer *m_tcpServer = nullptr;
+ QQmlDebugServer *m_debugServer = nullptr;
};
-QTcpServerConnection::QTcpServerConnection() :
- m_portFrom(0),
- m_portTo(0),
- m_block(false),
- m_socket(0),
- m_tcpServer(0),
- m_debugServer(0)
-{
-}
+QTcpServerConnection::QTcpServerConnection() {}
QTcpServerConnection::~QTcpServerConnection()
{
@@ -116,7 +108,7 @@ void QTcpServerConnection::disconnect()
}
m_socket->deleteLater();
- m_socket = 0;
+ m_socket = nullptr;
}
bool QTcpServerConnection::setPortRange(int portFrom, int portTo, bool block,
@@ -199,7 +191,7 @@ void QTcpServerConnection::newConnection()
QQmlDebugServerConnection *QTcpServerConnectionFactory::create(const QString &key)
{
- return (key == QLatin1String("QTcpServerConnection") ? new QTcpServerConnection : 0);
+ return (key == QLatin1String("QTcpServerConnection") ? new QTcpServerConnection : nullptr);
}
QT_END_NAMESPACE