aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmltooling/qmldbg_server
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_server
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_server')
-rw-r--r--src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp12
1 files changed, 6 insertions, 6 deletions
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