summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index df8c1678bd..fb946d9ca1 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -465,7 +465,11 @@ namespace QTest {
"SOURCES += project.cpp\n"
"QT -= core gui\n"
"INCLUDEPATH += . ");
- projectFile.write(QFile::encodeName(QDir::currentPath()));
+
+ QString workingDir = QDir::currentPath();
+ if (extraProgramSources.count() > 0)
+ workingDir = QFileInfo(extraProgramSources.first()).absolutePath();
+ projectFile.write(QFile::encodeName(workingDir));
#ifndef QT_NO_DEBUG
projectFile.write("\nCONFIG += debug\n");