Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QCoreApplication::addLibraryPath ( const QString path  )  [static]

Appends path to the end of the library path list. If path is empty or already in the path list, the path list is not changed.

The default path list consists of a single entry, the installation directory for plugins. The default installation directory for plugins is INSTALL/plugins, where INSTALL is the directory where Qt was installed.

See also:
removeLibraryPath(), libraryPaths(), setLibraryPaths()

Definition at line 1894 of file qcoreapplication.cpp.

References QStringList::contains(), and QString::isEmpty().

{
    if (path.isEmpty())
        return;

    // make sure that library paths is initialized
    libraryPaths();

    QString canonicalPath = QDir(path).canonicalPath();
    if (!coreappdata()->app_libpaths->contains(canonicalPath))
        coreappdata()->app_libpaths->prepend(canonicalPath);
}


Generated by  Doxygen 1.6.0   Back to index