QLibrary: merge duplicated setFileName{,AndVersion} code
The code was in triplicate. Once is enough. Change-Id: I12a088d1ae424825abd3fffd171ce375892457fc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 1f7850cd464a6131367543747a092fa1c75f2830) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e65bf0ab4f
commit
bd82fb5e65
@ -911,13 +911,7 @@ QLibrary::~QLibrary()
|
|||||||
|
|
||||||
void QLibrary::setFileName(const QString &fileName)
|
void QLibrary::setFileName(const QString &fileName)
|
||||||
{
|
{
|
||||||
QLibrary::LoadHints lh;
|
setFileNameAndVersion(fileName, QString());
|
||||||
if (d) {
|
|
||||||
lh = d->loadHints();
|
|
||||||
d->release();
|
|
||||||
d = {};
|
|
||||||
}
|
|
||||||
d = QLibraryPrivate::findOrCreate(fileName, QString(), lh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QLibrary::fileName() const
|
QString QLibrary::fileName() const
|
||||||
@ -940,13 +934,7 @@ QString QLibrary::fileName() const
|
|||||||
*/
|
*/
|
||||||
void QLibrary::setFileNameAndVersion(const QString &fileName, int verNum)
|
void QLibrary::setFileNameAndVersion(const QString &fileName, int verNum)
|
||||||
{
|
{
|
||||||
QLibrary::LoadHints lh;
|
setFileNameAndVersion(fileName, verNum >= 0 ? QString::number(verNum) : QString());
|
||||||
if (d) {
|
|
||||||
lh = d->loadHints();
|
|
||||||
d->release();
|
|
||||||
d = {};
|
|
||||||
}
|
|
||||||
d = QLibraryPrivate::findOrCreate(fileName, verNum >= 0 ? QString::number(verNum) : QString(), lh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user