Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-270

QPluginLoader requires a complete, platform-dependent filename.

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • Some future release
    • 4.1.4
    • Core: Plugins
    • None

      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            frederik Frederik Gladhorn
            smd Jan Arve
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes