Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.0
-
None
Description
We have upgraded from Qt 5.12 to 5.15. Now I receive an assertion when I start one of our applications with Qt debug build.
ASSERT failure in getRelocatablePrefix: "Failed to find the Qt prefix path.", file qtbase/src/corelib/global/qlibraryinfo.cpp, line 63
Note: All the Qt libs are in the same folder as the executable
According to https://doc.qt.io/qt-5/qt-conf.html I created then a qt.conf file in the application folder to adapt the Libraries path
[Paths] Libraries=.
However, it did not help.
Other some debugging I found the root cause:
- We are using QSettings before an instance of QApplication is created (we are using a global static object that uses QSettings, but the issue is easiyl reproducible with creating a QSettings object before creating QCoreApplication, see e.g. QTBUG-53539)
- In qlibraryinfo.cpp QSettings *QLibraryInfoPrivate::findConfiguration() the search path for qt.conf is:
- resource system
- filesystem but only if QCoreApplication::instance()
I circumvented the problem now by creating a qt.conf resource file and integrating it into the executable. But then I loose the possibility to adopt any paths by using a qt.conf in the installation folder.