diff options
Diffstat (limited to 'tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 7431ff255a..ac8f2a34ce 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -815,7 +815,7 @@ void tst_QApplication::libraryPaths() { { #ifndef Q_OS_WINCE - QString testDir = QDir::current().canonicalPath() + "/test"; + QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath(); #else // On Windows CE we need QApplication object to have valid // current Path. Therefore we need to identify it ourselves @@ -861,7 +861,7 @@ void tst_QApplication::libraryPaths() "\nexpected:\n - " + expected.join("\n - "))); // setting the library paths overrides everything - QString testDir = QDir::currentPath() + "/test"; + QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath(); QApplication::setLibraryPaths(QStringList() << testDir); QVERIFY2(isPathListIncluded(QApplication::libraryPaths(), (QStringList() << testDir)), qPrintable("actual:\n - " + QApplication::libraryPaths().join("\n - ") + @@ -884,8 +884,8 @@ void tst_QApplication::libraryPaths() qDebug() << "After adding plugins path:" << QApplication::libraryPaths(); #endif QCOMPARE(QApplication::libraryPaths().count(), count); - - QApplication::addLibraryPath(QDir::currentPath() + "/test"); + QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath(); + QApplication::addLibraryPath(testDir); QCOMPARE(QApplication::libraryPaths().count(), count + 1); // creating QApplication adds the applicationDirPath to the libraryPath |