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

setLibraryPaths keeps the applications directory in path, docs should mention it

XMLWordPrintable

    • All
    • efa5a699729c6ff9f9d7991d12ed70139e3be669 (qt/qtbase/dev) f120933e53970ee425cfa5ce621b29c435a1000e (qt/qtbase/6.0) 41937df503b0c09ea319194d78a41a16ef5e0bbf (qt/tqtc-qtbase/tqtc/lts-5.15)
    • Da Vinci sprint 25

      https://doc.qt.io/qt-5/qcoreapplication.html#setLibraryPaths says:

      Sets the list of directories to search when loading libraries to paths. All existing paths will be deleted and the path list will consist of the paths given in paths.

      Which is not correct because the applications path is added:

      #include <QApplication>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
          qputenv("QT_DEBUG_PLUGINS","1");
          QStringList sl;
          sl.append("/home/kapinter/Qt/5.15.1/gcc_64/lib");
          QCoreApplication::setLibraryPaths(sl);
          QApplication app(argc, argv);
          return app.exec();
      }
      

      and the log shows that it is still searching in the location where the application is.
      The code is visible here void QCoreApplicationPrivate::init() :
      https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qcoreapplication.cpp#n789

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

            paulwicking Paul Wicking
            karimpinter Karim Pinter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes