Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QLibraryPrivate Class Reference

#include <qlibrary_p.h>

+ Collaboration diagram for QLibraryPrivate:

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)
 
QObjectpluginInstance ()
 
void updatePluginState ()
 
bool isPlugin ()
 

Static Public Member Functions

static QLibraryPrivatefindOrCreate (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 >::typeinstanceFactory
 
QAtomicPointer< std::remove_pointer< Handle >::typepHnd
 
QMutex mutex
 
QPointer< QObjectinst
 
QPluginParsedMetaData metaData
 
QString errorString
 
QString qualifiedFileName
 

Friends

class QLibraryStore
 

Detailed Description

Definition at line 47 of file qlibrary_p.h.

Member Typedef Documentation

◆ Handle

Definition at line 53 of file qlibrary_p.h.

Member Enumeration Documentation

◆ UnloadFlag

Enumerator
UnloadSys 
NoUnloadSys 

Definition at line 55 of file qlibrary_p.h.

Member Function Documentation

◆ findOrCreate()

QLibraryPrivate * QLibraryPrivate::findOrCreate ( const QString fileName,
const QString version = QString(),
QLibrary::LoadHints  loadHints = { } 
)
static

Definition at line 452 of file qlibrary.cpp.

References fileName, QLibraryStore::findOrCreate(), and loadHints().

Referenced by QLibrary::setFileNameAndVersion(), and QLibrary::setLoadHints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPlugin()

bool QLibraryPrivate::isPlugin ( )

Definition at line 705 of file qlibrary.cpp.

References updatePluginState().

+ Here is the call graph for this function:

◆ load()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadHints()

QLibrary::LoadHints QLibraryPrivate::loadHints ( ) const
inline

Definition at line 66 of file qlibrary_p.h.

References QBasicAtomicInteger< T >::loadRelaxed().

Referenced by findOrCreate(), QLibrary::loadHints(), and QLibrary::setFileNameAndVersion().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadPlugin()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prefixes_sys()

QStringList QLibraryPrivate::prefixes_sys ( )
static

Definition at line 86 of file qlibrary_unix.cpp.

◆ release()

void QLibraryPrivate::release ( )

Definition at line 569 of file qlibrary.cpp.

References QLibraryStore::releaseLibrary().

Referenced by QLibrary::~QLibrary(), and QLibrary::setFileNameAndVersion().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolve()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLoadHints()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ suffixes_sys()

QStringList QLibraryPrivate::suffixes_sys ( const QString fullVersion)
static

Definition at line 34 of file qlibrary_unix.cpp.

References fullVersion, QString::isEmpty(), and QStringLiteral.

+ Here is the call graph for this function:

◆ unload()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePluginState()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QLibraryStore

friend class QLibraryStore
friend

Definition at line 106 of file qlibrary_p.h.

Member Data Documentation

◆ errorString

QString QLibraryPrivate::errorString

◆ fileName

◆ fullVersion

const QString QLibraryPrivate::fullVersion

Definition at line 58 of file qlibrary_p.h.

Referenced by suffixes_sys().

◆ inst

QPointer<QObject> QLibraryPrivate::inst

Definition at line 81 of file qlibrary_p.h.

Referenced by pluginInstance(), and unload().

◆ instanceFactory

QAtomicPointer<std::remove_pointer<QtPluginInstanceFunction>::type> QLibraryPrivate::instanceFactory

Definition at line 76 of file qlibrary_p.h.

Referenced by loadPlugin(), pluginInstance(), and unload().

◆ metaData

QPluginParsedMetaData QLibraryPrivate::metaData

Definition at line 82 of file qlibrary_p.h.

Referenced by findPatternUnloaded(), and updatePluginState().

◆ mutex

QMutex QLibraryPrivate::mutex

◆ pHnd

QAtomicPointer<std::remove_pointer<Handle>::type> QLibraryPrivate::pHnd

◆ qualifiedFileName

QString QLibraryPrivate::qualifiedFileName

Definition at line 84 of file qlibrary_p.h.

Referenced by QLibrary::fileName().


The documentation for this class was generated from the following files: