Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
4.7.4, 5.10
-
None
-
Unix
Description
one of the fallback paths in this function reads QDir::current().absoluteFilePath(argv0). the problem here is that QDir::current() does not necessarily represent the cwd at the time the application was started.
this is a problem for QLibraryInfo, which uses that function to locate qt.conf.
i'm not entirely sure what to do about it. one could preemptively save the pwd (or even the executable location) in the qapp c'tor. but that comes at a small additional cost, and isn't even reliable (as the qapp is not guaranteed to be created first. maybe a static object would work "in most of the cases"?).
note that this usually does not affect linux, as it has a specialized code path based on /proc.
Attachments
Issue Links
- relates to
-
QTBUG-38598 Calling QCoreApplication::libraryPaths Before Constructing QApplication Causes Platform Plugins to Fail to Load
- Closed