diff options
author | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2010-04-08 13:53:37 (GMT) |
---|---|---|
committer | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2010-04-21 15:17:01 (GMT) |
commit | 25783c98686f006eebea6f358eadcbbbc49e365e (patch) | |
tree | 77e2b08faee297ed15966fb615def4250ec3e194 /tests | |
parent | 66f02b76e7cd70545037d4eae984ed6819e39f1f (diff) | |
download | Qt-25783c98686f006eebea6f358eadcbbbc49e365e.zip Qt-25783c98686f006eebea6f358eadcbbbc49e365e.tar.gz Qt-25783c98686f006eebea6f358eadcbbbc49e365e.tar.bz2 |
When on Symbian use smaller files.
Task-number: QT-9417
Reviewed-by: TrustMe
Diffstat (limited to 'tests')
-rw-r--r-- | tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp | 9 |
1 files 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 <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); |