summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-12-29 19:33:07 -0200
committerThiago Macieira <thiago.macieira@intel.com>2012-12-29 22:49:46 +0100
commit8f084054b82ebe617238073ff53c6d6addf2574e (patch)
tree26fab8bf20ec99502dfc7dce32c5414bba1590ea
parentbecb58c71b7df39c5620d96f2a4317fc53f71958 (diff)
Make it possible to run the tests with Qt 4 tooqtchooser-9-g8f08405
Change-Id: Ied0efadce29348ea3f07a5238ac65f7f8bed35dc Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r--tests/auto/qtchooser/tst_qtchooser.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qtchooser/tst_qtchooser.cpp b/tests/auto/qtchooser/tst_qtchooser.cpp
index 345ae2c..8f11c32 100644
--- a/tests/auto/qtchooser/tst_qtchooser.cpp
+++ b/tests/auto/qtchooser/tst_qtchooser.cpp
@@ -94,7 +94,11 @@ private Q_SLOTS:
tst_ToolChooser::tst_ToolChooser()
: testModeEnvironment(QProcessEnvironment::systemEnvironment())
{
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QString testData = QFINDTESTDATA("testdata");
+#else
+ QString testData = SRCDIR "testdata";
+#endif
pathsWithDefault = testData + "/config1" LIST_SEP +
testData + "/config2";
testModeEnvironment.insert("XDG_CONFIG_HOME", "/dev/null");
@@ -348,7 +352,7 @@ void tst_ToolChooser::passArgs()
proc->readLine();
QByteArray procstdout = proc->readAll().trimmed();
- QCOMPARE(QString::fromLocal8Bit(procstdout), expected.join('\n'));
+ QCOMPARE(QString::fromLocal8Bit(procstdout), expected.join("\n"));
}
QTEST_MAIN(tst_ToolChooser)