Skip to content

Commit

Permalink
tests: Fix tst_qlibrary QDir::setCurrent to use a file system directory
Browse files Browse the repository at this point in the history
The library_path directory is located within Qt resource system which
is not working for QDir::setCurrent with packaged builtin resources.

Task-number: QTBUG-118680
Change-Id: I65dc0e07ec41ddb160d81b801767e8494059b037
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
arpaqt committed Jul 8, 2024
1 parent 37b2b2e commit d35a4ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void tst_QLibrary::initTestCase()
directory = paths.first();
#else
// chdir to our testdata directory, and use relative paths in some tests.
QString testdatadir = QFileInfo(QFINDTESTDATA("library_path")).absolutePath();
QString testdatadir = QFileInfo(QFINDTESTDATA("lib")).absolutePath();
QVERIFY2(QDir::setCurrent(testdatadir), qPrintable("Could not chdir to " + testdatadir));
directory = QCoreApplication::applicationDirPath();
#endif
Expand Down

0 comments on commit d35a4ea

Please sign in to comment.