From 54df3488aff977e0881b2591fff2e66f270e243e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 10 Oct 2022 19:41:54 -0700 Subject: [PATCH] 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 Reviewed-by: Marc Mutz --- src/corelib/plugin/qlibrary.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 89b91bbdedc..8c99520aba7 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); } /*!