summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qlibrary.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-10-10 19:41:54 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-10-17 15:01:39 -0700
commit54df3488aff977e0881b2591fff2e66f270e243e (patch)
tree566f429c67e9431c494c330dcb1d744418c0e755 /src/corelib/plugin/qlibrary.cpp
parentec6b22f67dc6133b280a8f3fe40d7d1cbef819bc (diff)
QLibrary::setFileNameAndVersion: reset the tag after findOrCreate
If the library we've found is already loaded, set the tag to Loaded. Pick-to: 6.4 Change-Id: I12a088d1ae424825abd3fffd171ce3831b884eee Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/plugin/qlibrary.cpp')
-rw-r--r--src/corelib/plugin/qlibrary.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 89b91bbded..8c99520aba 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -947,9 +947,10 @@ void QLibrary::setFileNameAndVersion(const QString &fileName, const QString &ver
if (d) {
lh = d->loadHints();
d->release();
- d = {};
}
- d = QLibraryPrivate::findOrCreate(fileName, version, lh);
+ QLibraryPrivate *dd = QLibraryPrivate::findOrCreate(fileName, version, lh);
+ d = dd;
+ d.setTag(isLoaded() ? Loaded : NotLoaded);
}
/*!