diff options
Diffstat (limited to 'tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp')
-rw-r--r-- | tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index 8165ccbc58..8ebb27e58c 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -962,8 +962,10 @@ void tst_QUdpSocket::bindMode() // Depending on the user's privileges, this or will succeed or // fail. Admins are allowed to reuse the address, but nobody else. - if (!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData()) - qWarning("Failed to bind with QUdpSocket::ReuseAddressHint, user isn't an administrator?"); + if (!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint)) { + qWarning("Failed to bind with QUdpSocket::ReuseAddressHint(%s), user isn't an administrator?", + qPrintable(socket2.errorString())); + } socket.close(); QVERIFY2(socket.bind(0, QUdpSocket::ShareAddress), socket.errorString().toLatin1().constData()); QVERIFY(!socket2.bind(socket.localPort())); |