QLibrary: merge duplicated setFileName{,AndVersion} code
The code was in triplicate. Once is enough. Pick-to: 6.4 Change-Id: I12a088d1ae424825abd3fffd171ce375892457fc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>bb10
parent
64e3f48e3b
commit
1f7850cd46
|
|
@ -906,13 +906,7 @@ QLibrary::~QLibrary()
|
|||
|
||||
void QLibrary::setFileName(const QString &fileName)
|
||||
{
|
||||
QLibrary::LoadHints lh;
|
||||
if (d) {
|
||||
lh = d->loadHints();
|
||||
d->release();
|
||||
d = {};
|
||||
}
|
||||
d = QLibraryPrivate::findOrCreate(fileName, QString(), lh);
|
||||
setFileNameAndVersion(fileName, QString());
|
||||
}
|
||||
|
||||
QString QLibrary::fileName() const
|
||||
|
|
@ -935,13 +929,7 @@ QString QLibrary::fileName() const
|
|||
*/
|
||||
void QLibrary::setFileNameAndVersion(const QString &fileName, int verNum)
|
||||
{
|
||||
QLibrary::LoadHints lh;
|
||||
if (d) {
|
||||
lh = d->loadHints();
|
||||
d->release();
|
||||
d = {};
|
||||
}
|
||||
d = QLibraryPrivate::findOrCreate(fileName, verNum >= 0 ? QString::number(verNum) : QString(), lh);
|
||||
setFileNameAndVersion(fileName, verNum >= 0 ? QString::number(verNum) : QString());
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Reference in New Issue