Priority: P2: Important
Affects Version/s: 5.15.0
Fix Version/s: None
Component/s: Core: I/O
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.
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
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.
- 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.