summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Petersson <Martin.Petersson@nokia.com>2012-03-27 12:43:37 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-27 17:16:26 +0200
commit854256cc699dc2dbdec0ecdf33a0b5578ab13012 (patch)
tree751e3f7debbc8f0a4c0bc0e8224a518d383d4c6c
parenta4d0c56a59f2c1b8cb94bfafb2ffb9273c6fc12c (diff)
QHttpNetworkConnection test: avoid integer divide by zero exception.
The speed calculation caused a dived by zero exception. Change-Id: I83281c8e66b9c18e7d282920901ccac1e9444a68 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
-rw-r--r--tests/manual/qhttpnetworkconnection/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/manual/qhttpnetworkconnection/main.cpp b/tests/manual/qhttpnetworkconnection/main.cpp
index 2d861530d3..8099e616f7 100644
--- a/tests/manual/qhttpnetworkconnection/main.cpp
+++ b/tests/manual/qhttpnetworkconnection/main.cpp
@@ -72,7 +72,7 @@ void tst_qhttpnetworkconnection::bigRemoteFile()
qDebug() << "Finished!" << endl;
qDebug() << "Time:" << t.elapsed() << "msec";
qDebug() << "Bytes:" << size;
- qDebug() << "Speed:" << (size / 1024) / (t.elapsed() / 1000) << "KB/sec";
+ qDebug() << "Speed:" << (size / qreal(1024)) / (t.elapsed() / qreal(1000)) << "KB/sec";
}
QTEST_MAIN(tst_qhttpnetworkconnection)