summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/lancelot/tst_lancelot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/other/lancelot/tst_lancelot.cpp')
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp
index cbbd28dc82..e024b75400 100644
--- a/tests/auto/other/lancelot/tst_lancelot.cpp
+++ b/tests/auto/other/lancelot/tst_lancelot.cpp
@@ -50,10 +50,6 @@
#include <QtOpenGL>
#endif
-#ifndef SRCDIR
-#define SRCDIR "."
-#endif
-
class tst_Lancelot : public QObject
{
Q_OBJECT
@@ -114,11 +110,8 @@ void tst_Lancelot::initTestCase()
if (!proto.connect(QLatin1String("tst_Lancelot"), &dryRunMode, clientInfo))
QSKIP(qPrintable(proto.errorMessage()));
-#if defined(USE_RUNTIME_DIR)
- scriptsDir = QCoreApplication::applicationDirPath() + "/scripts/";
-#else
- scriptsDir = SRCDIR "/scripts/";
-#endif
+ QString baseDir = QFINDTESTDATA("scripts/text.qps");
+ scriptsDir = baseDir.left(baseDir.lastIndexOf('/')) + '/';
QDir qpsDir(scriptsDir);
QStringList files = qpsDir.entryList(QStringList() << QLatin1String("*.qps"), QDir::Files | QDir::Readable);
if (files.isEmpty()) {