summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-04-08 13:53:37 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-04-08 13:53:37 (GMT)
commit2d8d85c78ff683f0c687a3f112507fb61d10a9a0 (patch)
tree477853ef65a633a3531f6729e08b81e7afc558c2
parentb20e9827610fec260603059232c3ae54213eb407 (diff)
downloadQt-2d8d85c78ff683f0c687a3f112507fb61d10a9a0.zip
Qt-2d8d85c78ff683f0c687a3f112507fb61d10a9a0.tar.gz
Qt-2d8d85c78ff683f0c687a3f112507fb61d10a9a0.tar.bz2
When on Symbian use smaller files.
Task-number: QT-9417 Reviewed-by: TrustMe
-rw-r--r--tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp9
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);