move initialization to initializer list

This commit is contained in:
Nicolas Fella 2019-05-01 23:26:07 +02:00
parent d3b41924b5
commit ad0acbfae3

View file

@ -45,11 +45,12 @@
#define MIN_VERSION_WITH_SSL_SUPPORT 6
LanLinkProvider::LanLinkProvider(bool testMode)
: m_udpSocket(this)
: m_server(new Server(this))
, m_udpSocket(this)
, m_tcpPort(0)
, m_testMode(testMode)
, m_combineBroadcastsTimer(this)
{
m_tcpPort = 0;
m_combineBroadcastsTimer.setInterval(0); // increase this if waiting a single event-loop iteration is not enough
m_combineBroadcastsTimer.setSingleShot(true);
@ -57,7 +58,6 @@ LanLinkProvider::LanLinkProvider(bool testMode)
connect(&m_udpSocket, &QIODevice::readyRead, this, &LanLinkProvider::newUdpConnection);
m_server = new Server(this);
m_server->setProxy(QNetworkProxy::NoProxy);
connect(m_server,&QTcpServer::newConnection,this, &LanLinkProvider::newConnection);