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>.
Loading...
Searching...
No Matches
QLibraryPrivate Class Reference

#include <qlibrary_p.h>

+ Collaboration diagram for QLibraryPrivate:

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)
 
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 49 of file qlibrary_p.h.

Member Typedef Documentation

◆ Handle

Definition at line 55 of file qlibrary_p.h.

◆ UniquePtr

Definition at line 63 of file qlibrary_p.h.

Member Enumeration Documentation

◆ UnloadFlag

Enumerator
UnloadSys 
NoUnloadSys 

Definition at line 57 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 459 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 712 of file qlibrary.cpp.

References updatePluginState().

+ Here is the call graph for this function:

◆ load()

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

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

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

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

+ 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 80 of file qlibrary_unix.cpp.

◆ release()

void QLibraryPrivate::release ( )

Definition at line 576 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 478 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 485 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 28 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 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().

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

◆ updatePluginState()

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

+ 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 114 of file qlibrary_p.h.

Member Data Documentation

◆ errorString

QString QLibraryPrivate::errorString

◆ fileName

const QString QLibraryPrivate::fileName

◆ fullVersion

const QString QLibraryPrivate::fullVersion

Definition at line 66 of file qlibrary_p.h.

Referenced by suffixes_sys().

◆ inst

QPointer<QObject> QLibraryPrivate::inst

Definition at line 89 of file qlibrary_p.h.

Referenced by pluginInstance(), and unload().

◆ instanceFactory

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

Definition at line 84 of file qlibrary_p.h.

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

◆ metaData

QPluginParsedMetaData QLibraryPrivate::metaData

Definition at line 90 of file qlibrary_p.h.

Referenced by findPatternUnloaded(), and updatePluginState().

◆ mutex

QMutex QLibraryPrivate::mutex

◆ pHnd

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

◆ qualifiedFileName

QString QLibraryPrivate::qualifiedFileName

Definition at line 92 of file qlibrary_p.h.

Referenced by QLibrary::fileName().


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