Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
4.1.4
-
None
Description
This is because QLibraryPrivate::load_sys() has this check:
if (pluginState != IsAPlugin) {
... populate all the possible prefixes and suffixes
}
(...before loading the library with dlopen().)
Maybe we could add a static function to QLibrary that has the signature
QString qualifiedFilename(const QString &fileName).
If the fileName is relative, it will try to look in the same locations as QLibrary already does, but it will not
load the library, but rather just return the shared library filename for that platform.
So, possible API changes to QLibrary:
Alt 1:
QLibrary lib("GL");
QString fileName = lib.qualifiedFilename();
// fileName == libGL.so.2 or fileName == libGL.so
Alt 2:
QString fileName = QLibrary::qualifiedFilename("GL", 2);
// fileName == libGL.so.2 or fileName == libGL.so
Attachments
Issue Links
- relates to
-
QTBUG-3103 expose QLibrary's automatic suffix completion
-
- Open
-