From 25783c98686f006eebea6f358eadcbbbc49e365e Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Thu, 8 Apr 2010 15:53:37 +0200 Subject: When on Symbian use smaller files. Task-number: QT-9417 Reviewed-by: TrustMe --- .../network/access/qfile_vs_qnetworkaccessmanager/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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..81f6f25 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 #include #include -#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); -- cgit v0.12