![]() |
Qt 6.x
The Qt SDK
|
#include <qlibrary_p.h>
Public Types | |
enum | UnloadFlag { UnloadSys , NoUnloadSys } |
using | Handle = void * |
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 47 of file qlibrary_p.h.
using QLibraryPrivate::Handle = void * |
Definition at line 53 of file qlibrary_p.h.
Enumerator | |
---|---|
UnloadSys | |
NoUnloadSys |
Definition at line 55 of file qlibrary_p.h.
|
static |
Definition at line 452 of file qlibrary.cpp.
References fileName, QLibraryStore::findOrCreate(), and loadHints().
Referenced by QLibrary::setFileNameAndVersion(), and QLibrary::setLoadHints().
bool QLibraryPrivate::isPlugin | ( | ) |
Definition at line 705 of file qlibrary.cpp.
References updatePluginState().
bool QLibraryPrivate::load | ( | ) |
Definition at line 519 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 66 of file qlibrary_p.h.
References QBasicAtomicInteger< T >::loadRelaxed().
Referenced by findOrCreate(), QLibrary::loadHints(), and QLibrary::setFileNameAndVersion().
QtPluginInstanceFunction QLibraryPrivate::loadPlugin | ( | ) |
Definition at line 574 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 492 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 86 of file qlibrary_unix.cpp.
void QLibraryPrivate::release | ( | ) |
Definition at line 569 of file qlibrary.cpp.
References QLibraryStore::releaseLibrary().
Referenced by QLibrary::~QLibrary(), and QLibrary::setFileNameAndVersion().
QFunctionPointer QLibraryPrivate::resolve | ( | const char * | symbol | ) |
Definition at line 471 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 478 of file qlibrary.cpp.
References fileName, QString::isEmpty(), lock, qt_library_mutex, and QBasicAtomicInteger< T >::storeRelaxed().
Referenced by QLibrary::setLoadHints().
|
static |
Definition at line 34 of file qlibrary_unix.cpp.
References fullVersion, QString::isEmpty(), and QStringLiteral.
bool QLibraryPrivate::unload | ( | UnloadFlag | flag = UnloadSys | ) |
Definition at line 547 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 QLibraryStore::cleanup(), and QLibrary::unload().
void QLibraryPrivate::updatePluginState | ( | ) |
Definition at line 713 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 106 of file qlibrary_p.h.
QString QLibraryPrivate::errorString |
Definition at line 83 of file qlibrary_p.h.
Referenced by QLibrary::errorString(), findPatternUnloaded(), load(), loadPlugin(), QLibrary::setLoadHints(), and updatePluginState().
const QString QLibraryPrivate::fileName |
Definition at line 57 of file qlibrary_p.h.
Referenced by QLibrary::fileName(), findOrCreate(), installCoverageTool(), load(), loadPlugin(), QLibraryStore::releaseLibrary(), setLoadHints(), unload(), and updatePluginState().
const QString QLibraryPrivate::fullVersion |
Definition at line 58 of file qlibrary_p.h.
Referenced by suffixes_sys().
Definition at line 81 of file qlibrary_p.h.
Referenced by pluginInstance(), and unload().
QAtomicPointer<std::remove_pointer<QtPluginInstanceFunction>::type> QLibraryPrivate::instanceFactory |
Definition at line 76 of file qlibrary_p.h.
Referenced by loadPlugin(), pluginInstance(), and unload().
QPluginParsedMetaData QLibraryPrivate::metaData |
Definition at line 82 of file qlibrary_p.h.
Referenced by findPatternUnloaded(), and updatePluginState().
QMutex QLibraryPrivate::mutex |
Definition at line 80 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 77 of file qlibrary_p.h.
Referenced by QLibraryStore::cleanup(), QLibrary::load(), load(), resolve(), unload(), and updatePluginState().
QString QLibraryPrivate::qualifiedFileName |
Definition at line 84 of file qlibrary_p.h.
Referenced by QLibrary::fileName().