summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-21 18:58:48 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-21 18:58:48 (GMT)
commit144f3bade4d5f48ebc268dae0df26ddf7dfe1228 (patch)
treef3bf8e45fef90344091ea59ee4383e4eebfa4ac7 /tests
parent2f14520ce72f0798a751f796baf93dd3f77a276d (diff)
parent0497c8925677e8b7fc4120bfe90ae16653db34d3 (diff)
downloadQt-144f3bade4d5f48ebc268dae0df26ddf7dfe1228.zip
Qt-144f3bade4d5f48ebc268dae0df26ddf7dfe1228.tar.gz
Qt-144f3bade4d5f48ebc268dae0df26ddf7dfe1228.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fixing the wrong QUrl usage When on Symbian use smaller files.
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
index 26308e9..7534e09 100644
--- a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
+++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
@@ -46,7 +46,6 @@
#include <QtNetwork/qnetworkaccessmanager.h>
#include <QtCore/QTemporaryFile>
#include <QtCore/QFile>
-#include "../../../../auto/network-settings.h"
class qfile_vs_qnetworkaccessmanager : public QObject
{
@@ -78,11 +77,15 @@ void qfile_vs_qnetworkaccessmanager::initTestCase()
{
testFile.open();
QByteArray qba(1*1024*1024, 'x'); // 1 MB
+#ifdef Q_OS_SYMBIAN
+ for (int i = 0; i < 10; i++) { // for Symbian only 10 MB
+#else
for (int i = 0; i < 100; i++) {
+#endif
testFile.write(qba);
testFile.flush();
size += qba.size();
- } // 100 MB
+ } // 100 MB or 10 MB
testFile.reset();
}
@@ -105,7 +108,7 @@ void qfile_vs_qnetworkaccessmanager::qnamFileRead()
{
QNetworkAccessManager manager;
QTime t;
- QNetworkRequest request(QUrl(testFile.fileName()));
+ QNetworkRequest request(QUrl::fromLocalFile(testFile.fileName()));
// do 3 dry runs for cache warmup
qnamFileRead_iteration(manager, request);
@@ -138,7 +141,7 @@ void qfile_vs_qnetworkaccessmanager::qnamImmediateFileRead()
{
QNetworkAccessManager manager;
QTime t;
- QNetworkRequest request(QUrl(testFile.fileName()));
+ QNetworkRequest request(QUrl::fromLocalFile(testFile.fileName()));
// do 3 dry runs for cache warmup
qnamImmediateFileRead_iteration(manager, request);