}
QLibraryPrivate::QLibraryPrivate(const QString &canonicalFileName, const QString &version)
- :pHnd(0), fileName(canonicalFileName), fullVersion(version), instance(0), qt_version(0),
- libraryRefCount(1), libraryUnloadCount(0), pluginState(MightBeAPlugin)
+ : did_load(false), pHnd(0), fileName(canonicalFileName), fullVersion(version),
+ instance(0), qt_version(0), libraryRefCount(1), libraryUnloadCount(0),
+ pluginState(MightBeAPlugin)
{ libraryMap()->insert(canonicalFileName, this); }
QLibraryPrivate *QLibraryPrivate::findOrCreate(const QString &fileName, const QString &version)
{
if (!d)
return false;
- if (did_load)
+ if (d->did_load)
return d->pHnd;
- did_load = true;
+ d->did_load = true;
return d->load();
}
*/
bool QLibrary::unload()
{
- if (did_load) {
- did_load = false;
+ if (d->did_load) {
+ d->did_load = false;
return d->unload();
}
return false;
Constructs a library with the given \a parent.
*/
QLibrary::QLibrary(QObject *parent)
- :QObject(parent), d(0), did_load(false)
+ :QObject(parent), d(0)
{
}
*/
QLibrary::QLibrary(const QString& fileName, QObject *parent)
- :QObject(parent), d(0), did_load(false)
+ :QObject(parent), d(0)
{
setFileName(fileName);
}
".dylib" on Mac OS X, and ".dll" on Windows. (See \l{fileName}.)
*/
QLibrary::QLibrary(const QString& fileName, int verNum, QObject *parent)
- :QObject(parent), d(0), did_load(false)
+ :QObject(parent), d(0)
{
setFileNameAndVersion(fileName, verNum);
}
".dylib" on Mac OS X, and ".dll" on Windows. (See \l{fileName}.)
*/
QLibrary::QLibrary(const QString& fileName, const QString &version, QObject *parent)
- :QObject(parent), d(0), did_load(false)
+ :QObject(parent), d(0)
{
setFileNameAndVersion(fileName, version);
}
lh = d->loadHints;
d->release();
d = 0;
- did_load = false;
}
d = QLibraryPrivate::findOrCreate(fileName);
d->loadHints = lh;
+ d->did_load = false;
}
QString QLibrary::fileName() const
lh = d->loadHints;
d->release();
d = 0;
- did_load = false;
}
d = QLibraryPrivate::findOrCreate(fileName, verNum >= 0 ? QString::number(verNum) : QString());
d->loadHints = lh;
+ d->did_load = false;
}
/*!
lh = d->loadHints;
d->release();
d = 0;
- did_load = false;
}
d = QLibraryPrivate::findOrCreate(fileName, version);
d->loadHints = lh;
+ d->did_load = false;
}
/*!