aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-02-21 11:52:59 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-02-26 13:08:30 +0000
commit06e962f263a86c4b66e1c6195b3d2615695fea1e (patch)
tree3669793f9983762538a9cb12a07ce49d461f066d /src/plugins
parent78e875e6dbd4991fe22c194d8608b3d66c96e036 (diff)
init variables where they are declared when possible (clang-tidy)
clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp13
-rw-r--r--src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp22
2 files changed, 11 insertions, 24 deletions
diff --git a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp
index 28cfabc44b..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(nullptr),
- m_debugServer(nullptr)
-{
-}
+QLocalClientConnection::QLocalClientConnection() { }
QLocalClientConnection::~QLocalClientConnection()
{
diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
index 4006bf17ff..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(nullptr),
- m_tcpServer(nullptr),
- m_debugServer(nullptr)
-{
-}
+QTcpServerConnection::QTcpServerConnection() {}
QTcpServerConnection::~QTcpServerConnection()
{