Fix compilation with QNATIVESOCKETENGINE_DEBUG enabled

Change-Id: Ie60b70aaa1fe11de613ba99427be00e307b6769d
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
This commit is contained in:
Frederik Gladhorn 2014-03-12 14:07:44 +01:00 committed by The Qt Project
parent c4650779c4
commit df757e30f8

View File

@ -363,7 +363,7 @@ bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt
bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &addr, quint16 port)
{
#ifdef QNATIVESOCKETENGINE_DEBUG
qDebug("QNativeSocketEnginePrivate::nativeConnect() : %d ", socketDescriptor);
qDebug("QNativeSocketEnginePrivate::nativeConnect() : %lli", socketDescriptor);
#endif
struct sockaddr_in sockAddrIPv4;
@ -847,7 +847,7 @@ qint64 QNativeSocketEnginePrivate::nativePendingDatagramSize() const
}
#if defined (QNATIVESOCKETENGINE_DEBUG)
qDebug("QNativeSocketEnginePrivate::nativePendingDatagramSize() == %i", recvResult);
qDebug("QNativeSocketEnginePrivate::nativePendingDatagramSize() == %zd", recvResult);
#endif
return qint64(recvResult);
@ -1012,13 +1012,13 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
socketType = QAbstractSocket::UnknownSocketType;
}
#if defined (QNATIVESOCKETENGINE_DEBUG)
QString socketProtocolStr = "UnknownProtocol";
if (socketProtocol == QAbstractSocket::IPv4Protocol) socketProtocolStr = "IPv4Protocol";
else if (socketProtocol == QAbstractSocket::IPv6Protocol) socketProtocolStr = "IPv6Protocol";
QString socketProtocolStr = QStringLiteral("UnknownProtocol");
if (socketProtocol == QAbstractSocket::IPv4Protocol) socketProtocolStr = QStringLiteral("IPv4Protocol");
else if (socketProtocol == QAbstractSocket::IPv6Protocol) socketProtocolStr = QStringLiteral("IPv6Protocol");
QString socketTypeStr = "UnknownSocketType";
if (socketType == QAbstractSocket::TcpSocket) socketTypeStr = "TcpSocket";
else if (socketType == QAbstractSocket::UdpSocket) socketTypeStr = "UdpSocket";
QString socketTypeStr = QStringLiteral("UnknownSocketType");
if (socketType == QAbstractSocket::TcpSocket) socketTypeStr = QStringLiteral("TcpSocket");
else if (socketType == QAbstractSocket::UdpSocket) socketTypeStr = QStringLiteral("UdpSocket");
qDebug("QNativeSocketEnginePrivate::fetchConnectionParameters() local == %s:%i,"
" peer == %s:%i, socket == %s - %s",
@ -1112,7 +1112,7 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxSize)
}
#if defined (QNATIVESOCKETENGINE_DEBUG)
qDebug("QNativeSocketEnginePrivate::nativeRead(%p \"%s\", %llu) == %i",
qDebug("QNativeSocketEnginePrivate::nativeRead(%p \"%s\", %llu) == %zd",
data, qt_prettyDebug(data, qMin(r, ssize_t(16)), r).data(),
maxSize, r);
#endif