Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qlibrary_p.h>
Classes | |
struct | Deleter |
Public Types | |
enum | UnloadFlag { UnloadSys , NoUnloadSys } |
using | Handle = void * |
using | UniquePtr = std::unique_ptr<QLibraryPrivate, Deleter> |
Public Member Functions | |
bool | load () |
QtPluginInstanceFunction | loadPlugin () |
bool | unload (UnloadFlag flag=UnloadSys) |
void | release () |
QFunctionPointer | resolve (const char *) |
QLibrary::LoadHints | loadHints () const |
void | setLoadHints (QLibrary::LoadHints lh) |
QObject * | pluginInstance () |
void | updatePluginState () |
bool | isPlugin () |
Static Public Member Functions | |
static QLibraryPrivate * | findOrCreate (const QString &fileName, const QString &version=QString(), QLibrary::LoadHints loadHints={ }) |
static QStringList | suffixes_sys (const QString &fullVersion) |
static QStringList | prefixes_sys () |
Public Attributes | |
const QString | fileName |
const QString | fullVersion |
QAtomicPointer< std::remove_pointer< QtPluginInstanceFunction >::type > | instanceFactory |
QAtomicPointer< std::remove_pointer< Handle >::type > | pHnd |
QMutex | mutex |
QPointer< QObject > | inst |
QPluginParsedMetaData | metaData |
QString | errorString |
QString | qualifiedFileName |
Friends | |
class | QLibraryStore |
Definition at line 49 of file qlibrary_p.h.
using QLibraryPrivate::Handle = void * |
Definition at line 55 of file qlibrary_p.h.
using QLibraryPrivate::UniquePtr = std::unique_ptr<QLibraryPrivate, Deleter> |
Definition at line 63 of file qlibrary_p.h.
Enumerator | |
---|---|
UnloadSys | |
NoUnloadSys |
Definition at line 57 of file qlibrary_p.h.
|
static |
Definition at line 459 of file qlibrary.cpp.
References fileName, QLibraryStore::findOrCreate(), and loadHints().
Referenced by QLibrary::setFileNameAndVersion(), and QLibrary::setLoadHints().
bool QLibraryPrivate::isPlugin | ( | ) |
Definition at line 712 of file qlibrary.cpp.
References updatePluginState().
bool QLibraryPrivate::load | ( | ) |
Definition at line 526 of file qlibrary.cpp.
References errorString, fileName, installCoverageTool(), QString::isEmpty(), QBasicAtomicPointer< X >::loadRelaxed(), pHnd, Q_TRACE, qCDebug, qUtf8Printable, QBasicAtomicInteger< T >::ref(), and ret.
Referenced by QLibrary::load(), loadPlugin(), and updatePluginState().
|
inline |
Definition at line 74 of file qlibrary_p.h.
References QBasicAtomicInteger< T >::loadRelaxed().
Referenced by findOrCreate(), QLibrary::loadHints(), and QLibrary::setFileNameAndVersion().
QtPluginInstanceFunction QLibraryPrivate::loadPlugin | ( | ) |
Definition at line 581 of file qlibrary.cpp.
References errorString, fileName, instanceFactory, load(), QBasicAtomicPointer< X >::loadAcquire(), ptr(), qCDebug, QBasicAtomicInteger< T >::ref(), resolve(), and QBasicAtomicPointer< X >::storeRelease().
Referenced by pluginInstance().
QObject * QLibraryPrivate::pluginInstance | ( | ) |
Definition at line 499 of file qlibrary.cpp.
References QPointer< T >::data(), factory, inst, instanceFactory, QBasicAtomicPointer< X >::loadAcquire(), loadPlugin(), and mutex.
Referenced by QFactoryLoader::instance().
|
static |
Definition at line 80 of file qlibrary_unix.cpp.
void QLibraryPrivate::release | ( | ) |
Definition at line 576 of file qlibrary.cpp.
References QLibraryStore::releaseLibrary().
Referenced by QLibrary::~QLibrary(), and QLibrary::setFileNameAndVersion().
QFunctionPointer QLibraryPrivate::resolve | ( | const char * | symbol | ) |
Definition at line 478 of file qlibrary.cpp.
References QBasicAtomicPointer< X >::loadRelaxed(), and pHnd.
Referenced by loadPlugin(), and QLibrary::resolve().
void QLibraryPrivate::setLoadHints | ( | QLibrary::LoadHints | lh | ) |
Definition at line 485 of file qlibrary.cpp.
References fileName, QString::isEmpty(), lock, qt_library_mutex, and QBasicAtomicInteger< T >::storeRelaxed().
Referenced by QLibrary::setLoadHints().
|
static |
Definition at line 28 of file qlibrary_unix.cpp.
References fullVersion, QString::isEmpty(), and QStringLiteral.
bool QLibraryPrivate::unload | ( | UnloadFlag | flag = UnloadSys | ) |
Definition at line 554 of file qlibrary.cpp.
References QPointer< T >::data(), QBasicAtomicInteger< T >::deref(), fileName, inst, instanceFactory, QBasicAtomicInteger< T >::loadRelaxed(), QBasicAtomicPointer< X >::loadRelaxed(), mutex, NoUnloadSys, pHnd, qCDebug, and QBasicAtomicPointer< X >::storeRelaxed().
Referenced by QLibrary::unload().
void QLibraryPrivate::updatePluginState | ( | ) |
Definition at line 720 of file qlibrary.cpp.
References QString::arg(), QString::clear(), debug, QFile::encodeName(), QString::endsWith(), errorString, fileName, findPatternUnloaded(), IsDebug, QString::isEmpty(), load(), QBasicAtomicPointer< X >::loadRelaxed(), metaData, mutex, QString::number(), pHnd, PluginMustMatchQtDebug, qCDebug, qt_get_metadata(), QT_VERSION, QtBuildIsDebug, QtVersion, QMutexLocker< Mutex >::relock(), QCborValue::toBool(), QCborValue::toInteger(), QMutexLocker< Mutex >::unlock(), and QPluginParsedMetaData::value().
Referenced by isPlugin().
|
friend |
Definition at line 114 of file qlibrary_p.h.
QString QLibraryPrivate::errorString |
Definition at line 91 of file qlibrary_p.h.
Referenced by QLibrary::errorString(), findPatternUnloaded(), load(), loadPlugin(), QLibrary::setLoadHints(), and updatePluginState().
const QString QLibraryPrivate::fileName |
Definition at line 65 of file qlibrary_p.h.
Referenced by QLibrary::fileName(), findOrCreate(), load(), loadPlugin(), QLibraryStore::releaseLibrary(), setLoadHints(), unload(), and updatePluginState().
const QString QLibraryPrivate::fullVersion |
Definition at line 66 of file qlibrary_p.h.
Referenced by suffixes_sys().
Definition at line 89 of file qlibrary_p.h.
Referenced by pluginInstance(), and unload().
QAtomicPointer<std::remove_pointer<QtPluginInstanceFunction>::type> QLibraryPrivate::instanceFactory |
Definition at line 84 of file qlibrary_p.h.
Referenced by loadPlugin(), pluginInstance(), and unload().
QPluginParsedMetaData QLibraryPrivate::metaData |
Definition at line 90 of file qlibrary_p.h.
Referenced by findPatternUnloaded(), and updatePluginState().
QMutex QLibraryPrivate::mutex |
Definition at line 88 of file qlibrary_p.h.
Referenced by QLibrary::errorString(), QLibrary::fileName(), pluginInstance(), unload(), and updatePluginState().
QAtomicPointer<std::remove_pointer<Handle>::type> QLibraryPrivate::pHnd |
Definition at line 85 of file qlibrary_p.h.
Referenced by QLibrary::load(), load(), resolve(), unload(), and updatePluginState().
QString QLibraryPrivate::qualifiedFileName |
Definition at line 92 of file qlibrary_p.h.
Referenced by QLibrary::fileName().