diff options
Diffstat (limited to 'src/corelib/plugin/qpluginloader.cpp')
-rw-r--r-- | src/corelib/plugin/qpluginloader.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index 2c139669e6..f34c019823 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -339,7 +339,7 @@ void QPluginLoader::setFileName(const QString &fileName) #if defined(QT_SHARED) QLibrary::LoadHints lh; if (d) { - lh = d->loadHints; + lh = d->loadHints(); d->release(); d = 0; did_load = false; @@ -405,17 +405,12 @@ void QPluginLoader::setLoadHints(QLibrary::LoadHints loadHints) d = QLibraryPrivate::findOrCreate(QString()); // ugly, but we need a d-ptr d->errorString.clear(); } - d->loadHints = loadHints; + d->setLoadHints(loadHints); } QLibrary::LoadHints QPluginLoader::loadHints() const { - if (!d) { - QPluginLoader *that = const_cast<QPluginLoader *>(this); - that->d = QLibraryPrivate::findOrCreate(QString()); // ugly, but we need a d-ptr - that->d->errorString.clear(); - } - return d->loadHints; + return d ? d->loadHints() : QLibrary::LoadHints(); } /*! |