summaryrefslogtreecommitdiffstats
path: root/tests/testcodeinjection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testcodeinjection.cpp')
-rw-r--r--tests/testcodeinjection.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/testcodeinjection.cpp b/tests/testcodeinjection.cpp
index 6b708eb6..abc33856 100644
--- a/tests/testcodeinjection.cpp
+++ b/tests/testcodeinjection.cpp
@@ -30,7 +30,10 @@
void TestCodeInjections::testReadFileUtf8()
{
const char* cppCode ="struct A {};";
- QString filePath = QFileInfo(__FILE__).absoluteDir().absolutePath();
+ int argc = 0;
+ char *argv[] = {NULL};
+ QCoreApplication app(argc, argv);
+ QString filePath = QCoreApplication::applicationDirPath();
QString xmlCode = "\
<typesystem package=\"Foo\"> \
<value-type name='A'> \