From f512c8a279518e992ae59c13c17453ac2769359e Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Fri, 29 Jan 2010 18:05:39 +0100 Subject: Fixing benchmark for Symbian The bidi.txt has to be deployed in proper way. Reviewed-by: TrustMe --- tests/benchmarks/qtext/main.cpp | 10 ++++++++++ tests/benchmarks/qtext/qtext.pro | 9 ++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/qtext/main.cpp b/tests/benchmarks/qtext/main.cpp index 9854a9f..d4f3165 100644 --- a/tests/benchmarks/qtext/main.cpp +++ b/tests/benchmarks/qtext/main.cpp @@ -51,6 +51,12 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +// Application private dir is default serach path for files, so SRCDIR can be set to empty +#define SRCDIR "" +#endif + Q_DECLARE_METATYPE(QTextDocument*) class tst_QText: public QObject @@ -129,7 +135,11 @@ void tst_QText::shaping_data() QTest::newRow("lorem") << m_lorem; QTest::newRow("short") << QString::fromLatin1("Lorem ipsum dolor sit amet"); +#if !defined(Q_OS_SYMBIAN) QFile file(QString::fromLatin1(SRCDIR) + QLatin1String("/bidi.txt")); +#else + QFile file( SRCDIR "bidi.txt" ); +#endif QVERIFY(file.open(QFile::ReadOnly)); QByteArray data = file.readAll(); QVERIFY(data.count() > 1000); diff --git a/tests/benchmarks/qtext/qtext.pro b/tests/benchmarks/qtext/qtext.pro index ce4f604..9e8860f 100644 --- a/tests/benchmarks/qtext/qtext.pro +++ b/tests/benchmarks/qtext/qtext.pro @@ -4,4 +4,11 @@ TARGET = tst_QText SOURCES += main.cpp -DEFINES += SRCDIR=\\\"$$PWD/\\\" +symbian* { + TARGET.CAPABILITY = ALL -TCB + addFiles.sources = bidi.txt + addFiles.path = . + DEPLOYMENT += addFiles +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} \ No newline at end of file -- cgit v0.12