summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qabstractsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket/qabstractsocket.cpp')
-rw-r--r--src/network/socket/qabstractsocket.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 8b4f364..fda47bd 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -520,13 +520,13 @@ bool QAbstractSocketPrivate::initSocketLayer(QAbstractSocket::NetworkLayerProtoc
Q_Q(QAbstractSocket);
#if defined (QABSTRACTSOCKET_DEBUG)
QString typeStr;
- if (q->socketType() == QAbstractSocket::TcpSocket) typeStr = "TcpSocket";
- else if (q->socketType() == QAbstractSocket::UdpSocket) typeStr = "UdpSocket";
- else typeStr = "UnknownSocketType";
+ if (q->socketType() == QAbstractSocket::TcpSocket) typeStr = QLatin1String("TcpSocket");
+ else if (q->socketType() == QAbstractSocket::UdpSocket) typeStr = QLatin1String("UdpSocket");
+ else typeStr = QLatin1String("UnknownSocketType");
QString protocolStr;
- if (protocol == QAbstractSocket::IPv4Protocol) protocolStr = "IPv4Protocol";
- else if (protocol == QAbstractSocket::IPv6Protocol) protocolStr = "IPv6Protocol";
- else protocolStr = "UnknownNetworkLayerProtocol";
+ if (protocol == QAbstractSocket::IPv4Protocol) protocolStr = QLatin1String("IPv4Protocol");
+ else if (protocol == QAbstractSocket::IPv6Protocol) protocolStr = QLatin1String("IPv6Protocol");
+ else protocolStr = QLatin1String("UnknownNetworkLayerProtocol");
#endif
resetSocketLayer();
@@ -873,15 +873,19 @@ void QAbstractSocketPrivate::_q_startConnecting(const QHostInfo &hostInfo)
if (state != QAbstractSocket::HostLookupState)
return;
+ if (hostLookupId != -1 && hostLookupId != hostInfo.lookupId()) {
+ qWarning("QAbstractSocketPrivate::_q_startConnecting() received hostInfo for wrong lookup ID %d expected %d", hostInfo.lookupId(), hostLookupId);
+ }
+
addresses = hostInfo.addresses();
#if defined(QABSTRACTSOCKET_DEBUG)
- QString s = "{";
+ QString s = QLatin1String("{");
for (int i = 0; i < addresses.count(); ++i) {
- if (i != 0) s += ", ";
+ if (i != 0) s += QLatin1String(", ");
s += addresses.at(i).toString();
}
- s += '}';
+ s += QLatin1Char('}');
qDebug("QAbstractSocketPrivate::_q_startConnecting(hostInfo == %s)", s.toLatin1().constData());
#endif