summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2012-02-20 16:01:43 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-21 02:27:23 +0100
commitca1aa0da03aaf34aac1470bab52ce835a0392bef (patch)
tree4a4c1ebca517e351cd5957effd28fcc92a0c554e
parent8a182591be39e4c02f8acd907b31e5bebbd828a5 (diff)
Make the QApplication autotest work for shadow builds.
Use QFINDTESTDATA to locate the helper applications. Change-Id: I604d10e37c9367f2e95225864edf5bf705f1d961 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 4d52e6215e..98872cb2f6 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -1398,12 +1398,21 @@ void tst_QApplication::testDeleteLaterProcessEvents()
void tst_QApplication::desktopSettingsAware()
{
#ifndef QT_NO_PROCESS
- QProcess testProcess;
- const QString path = QStringLiteral("desktopsettingsaware/desktopsettingsaware");
+ QString path;
+ {
+ // We need an application object for QFINDTESTDATA to work
+ // properly in all cases.
+ int argc = 0;
+ QCoreApplication app(argc, 0);
+ path = QFINDTESTDATA("desktopsettingsaware/");
+ }
+ QVERIFY2(!path.isEmpty(), "Cannot locate desktopsettingsaware helper application");
+ path += "desktopsettingsaware";
#ifdef Q_OS_WINCE
int argc = 0;
QApplication tmpApp(argc, 0, QApplication::GuiServer);
#endif
+ QProcess testProcess;
testProcess.start(path);
QVERIFY2(testProcess.waitForStarted(),
qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString())));
@@ -2061,9 +2070,19 @@ void tst_QApplication::touchEventPropagation()
void tst_QApplication::qtbug_12673()
{
+ QString path;
+ {
+ // We need an application object for QFINDTESTDATA to work
+ // properly in all cases.
+ int argc = 0;
+ QCoreApplication app(argc, 0);
+ path = QFINDTESTDATA("modal/");
+ }
+ QVERIFY2(!path.isEmpty(), "Cannot locate modal helper application");
+ path += "modal";
+
QProcess testProcess;
QStringList arguments;
- const QString path = QStringLiteral("modal/modal");
testProcess.start(path, arguments);
QVERIFY2(testProcess.waitForStarted(),
qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString())));