QNativeSocketEngine: fix build in debug mode under Unix
Change-Id: I197e4853cd3ddd7543bbdb12cecc19c0ed2c9ee2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
e996d68f61
commit
9ffbc139d1
@ -921,8 +921,10 @@ qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxS
|
|||||||
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
||||||
qDebug("QNativeSocketEnginePrivate::nativeReceiveDatagram(%p \"%s\", %lli, %s, %i) == %lli",
|
qDebug("QNativeSocketEnginePrivate::nativeReceiveDatagram(%p \"%s\", %lli, %s, %i) == %lli",
|
||||||
data, qt_prettyDebug(data, qMin(recvResult, ssize_t(16)), recvResult).data(), maxSize,
|
data, qt_prettyDebug(data, qMin(recvResult, ssize_t(16)), recvResult).data(), maxSize,
|
||||||
address ? address->toString().toLatin1().constData() : "(nil)",
|
(recvResult != -1 && options != QAbstractSocketEngine::WantNone)
|
||||||
port ? *port : 0, (qint64) recvResult);
|
? header->senderAddress.toString().toLatin1().constData() : "(unknown)",
|
||||||
|
(recvResult != -1 && options != QAbstractSocketEngine::WantNone)
|
||||||
|
? header->senderPort : 0, (qint64) recvResult);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return qint64(maxSize ? recvResult : recvResult == -1 ? -1 : 0);
|
return qint64(maxSize ? recvResult : recvResult == -1 ? -1 : 0);
|
||||||
@ -1018,8 +1020,9 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
|
|||||||
|
|
||||||
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
||||||
qDebug("QNativeSocketEngine::sendDatagram(%p \"%s\", %lli, \"%s\", %i) == %lli", data,
|
qDebug("QNativeSocketEngine::sendDatagram(%p \"%s\", %lli, \"%s\", %i) == %lli", data,
|
||||||
qt_prettyDebug(data, qMin<int>(len, 16), len).data(), len, host.toString().toLatin1().constData(),
|
qt_prettyDebug(data, qMin<int>(len, 16), len).data(), len,
|
||||||
port, (qint64) sentBytes);
|
header.destinationAddress.toString().toLatin1().constData(),
|
||||||
|
header.destinationPort, (qint64) sentBytes);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return qint64(sentBytes);
|
return qint64(sentBytes);
|
||||||
|
Loading…
Reference in New Issue
Block a user