QAbstractSocket: fix printing a debug message on successful connect

To have a consistent debug listing, we should print this message just
before emitting the signals.

Change-Id: Ibffcf1134d8b16c114fb54cad9afae86b5153f95
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Alex Trotsenko 2017-09-25 16:35:22 +03:00
parent 2b1ab81eda
commit bec9afba6e

View File

@ -1362,13 +1362,12 @@ void QAbstractSocketPrivate::fetchConnectionParameters()
}
state = QAbstractSocket::ConnectedState;
emit q->stateChanged(state);
emit q->connected();
#if defined(QABSTRACTSOCKET_DEBUG)
qDebug("QAbstractSocketPrivate::fetchConnectionParameters() connection to %s:%i established",
host.toString().toLatin1().constData(), port);
#endif
emit q->stateChanged(state);
emit q->connected();
}
/*! \internal