diff options
Diffstat (limited to 'src/corelib/plugin/qpluginloader.cpp')
-rw-r--r-- | src/corelib/plugin/qpluginloader.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index c6341199c9..03b8cfbb84 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -71,7 +71,7 @@ using namespace Qt::StringLiterals; link to plugins statically. You can use QLibrary if you need to load dynamic libraries in a statically linked application. - \sa QLibrary, {Plug & Paint Example} + \sa QLibrary */ static constexpr QLibrary::LoadHints defaultLoadHints = QLibrary::PreventUnloadHint; @@ -349,10 +349,11 @@ QString QPluginLoader::errorString() const void QPluginLoader::setLoadHints(QLibrary::LoadHints loadHints) { if (!d) { - d = QLibraryPrivate::findOrCreate(QString()); // ugly, but we need a d-ptr + d = QLibraryPrivate::findOrCreate({}, {}, loadHints); // ugly, but we need a d-ptr d->errorString.clear(); + } else { + d->setLoadHints(loadHints); } - d->setLoadHints(loadHints); } QLibrary::LoadHints QPluginLoader::loadHints() const |