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>
This commit is contained in:
Thiago Macieira 2022-10-10 19:41:54 -07:00
parent ec6b22f67d
commit 54df3488af

View File

@ -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);
}
/*!