diff options
author | axis <qt-info@nokia.com> | 2009-05-25 11:26:23 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-05-25 11:26:23 (GMT) |
commit | de01a7e1e827ee7df035e0b32166db2263712e63 (patch) | |
tree | 3a5cda42d360c63c027afd80eb2e6715faa72aaa /tests/auto/qsocks5socketengine | |
parent | 4c06cd950d27ba10d2288d508cbaef4e44abee91 (diff) | |
parent | 44d992ca150d9448cb7b9114b2bc489b441c7b76 (diff) | |
download | Qt-de01a7e1e827ee7df035e0b32166db2263712e63.zip Qt-de01a7e1e827ee7df035e0b32166db2263712e63.tar.gz Qt-de01a7e1e827ee7df035e0b32166db2263712e63.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts:
src/corelib/io/qfile.cpp
src/corelib/kernel/qsharedmemory_unix.cpp
src/network/socket/qnativesocketengine_p.h
src/network/socket/qnativesocketengine_unix.cpp
Diffstat (limited to 'tests/auto/qsocks5socketengine')
-rw-r--r-- | tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp index 2083b26..a27ea00 100644 --- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -798,14 +798,14 @@ void tst_QSocks5SocketEngine::downloadBigFile() if (QTestEventLoop::instance().timeout()) QFAIL("Network operation timed out"); - QCOMPARE(bytesAvailable, qint64(10000309)); + QCOMPARE(bytesAvailable, qint64(10000000)); QVERIFY(tmpSocket->state() == QAbstractSocket::ConnectedState); - qDebug("\t\t%.1fMB/%.1fs: %.1fMB/s", + /*qDebug("\t\t%.1fMB/%.1fs: %.1fMB/s", bytesAvailable / (1024.0 * 1024.0), stopWatch.elapsed() / 1024.0, - (bytesAvailable / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024)); + (bytesAvailable / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));*/ delete tmpSocket; tmpSocket = 0; @@ -819,7 +819,10 @@ void tst_QSocks5SocketEngine::exitLoopSlot() void tst_QSocks5SocketEngine::downloadBigFileSlot() { - bytesAvailable += tmpSocket->readAll().size(); + QByteArray tmp=tmpSocket->readAll(); + int correction=tmp.indexOf((char)0,0); //skip header + if (correction==-1) correction=0; + bytesAvailable += (tmp.size()-correction); if (bytesAvailable >= 10000000) QTestEventLoop::instance().exitLoop(); } |