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

QLibrary does not give absolute path to loaded library

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.1, 6.0.0
    • Fix Version/s: None
    • Component/s: Core: Other, Core: Plugins
    • Labels:
      None

      Description

      QLibrary offers no way to check the absolute path the library was actually found in if it was found by searching system paths, which would be a useful feature (for informing users what versions of the library were loaded, and loading other resources in the same location as the library). This information should be fairly easy for QLibrary to provide, I imagine?

      I tentatively filed this as a bug since the documentation states that fileName() "returns the fully-qualified file name of the library", although it does then state "including the full path to the library if one was given in the constructor or passed to setFileName()" [my emphasis], which you may feel clears it up. But my understanding of "fully-qualified" would require the resolution of ambiguous names like "mylib123" not just to "libmylib123.so" but to "/usr/lib/libmylib123.so".

      Regardless of whether this is a bug, having access to the full path would be very useful in certain cases. (I am currently using boost::dll to find the path, which isn't ideal! I need this to work around a quirk of another library.)

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            carlturner Carl Turner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes