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

QPluginLoader requires a complete, platform-dependent filename.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • Some future release
    • 4.1.4
    • Core: Plugins
    • 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

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes