diff options
Diffstat (limited to 'tests/auto/languagechange/tst_languagechange.cpp')
-rw-r--r-- | tests/auto/languagechange/tst_languagechange.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/languagechange/tst_languagechange.cpp b/tests/auto/languagechange/tst_languagechange.cpp index b91dd83..f856f67 100644 --- a/tests/auto/languagechange/tst_languagechange.cpp +++ b/tests/auto/languagechange/tst_languagechange.cpp @@ -212,7 +212,12 @@ void tst_languageChange::retranslatability() "languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to " "get proper widget layout."); TransformTranslator translator; +#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) + // Allow a little extra time or emulator startup delays cause failure + QTimer::singleShot(5000, &translator, SLOT(install())); +#else QTimer::singleShot(500, &translator, SLOT(install())); +#endif switch (dialogType) { case InputDialog: (void)QInputDialog::getInteger(0, QLatin1String("title"), QLatin1String("label")); @@ -235,7 +240,17 @@ void tst_languageChange::retranslatability() QString fooName = tmpParentDir + "/foo"; QDir dir; QCOMPARE(dir.mkpath(tmpDir), true); +#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) + // Just create a new file instead of copying exe, because exe is not there in emulator + { + QFile fooFile(fooName); + QVERIFY(fooFile.open(QIODevice::WriteOnly | QIODevice::Text)); + for(int i=0; i<2048; i++) // File needs to be big enough for size to read in KB + fooFile.write("@"); + } +#else QCOMPARE(QFile::copy(QApplication::applicationFilePath(), fooName), true); +#endif dlg.setDirectory(tmpParentDir); #ifdef Q_OS_WINCE @@ -244,7 +259,12 @@ void tst_languageChange::retranslatability() dlg.setFileMode(QFileDialog::ExistingFiles); dlg.setViewMode(QFileDialog::Detail); dlg.exec(); +#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) + // increase the wait time because of increased delay caused by emulator startup + QTest::qWait(15000); +#else QTest::qWait(3000); +#endif QCOMPARE(QFile::remove(fooName), true); QCOMPARE(dir.rmdir(tmpDir), true); QCOMPARE(dir.rmdir(tmpParentDir), true); |