diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 88a4494ec4f..70b2e8325b3 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -82,7 +82,7 @@ bool MingwMakefileGenerator::findLibraries() QString suffix = project->first(ProKey("QMAKE_" + steam.toUpper() + "_SUFFIX")).toQString(); for (QList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { QString extension; - int ver = findHighestVersion((*dir_it).local(), steam, "dll.a|a"); + int ver = findHighestVersion((*dir_it).local(), steam); if (ver > 0) extension += QString::number(ver); extension += suffix; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 2059cc75850..2d070e89e25 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -50,7 +50,7 @@ Win32MakefileGenerator::Win32MakefileGenerator() : MakefileGenerator() } int -Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem, const QString &ext) +Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem) { QString bd = Option::normalizePath(d); if(!exists(bd)) @@ -69,30 +69,10 @@ Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem return vover.first().toInt(); int biggest=-1; - if (project->isActiveConfig("link_highest_lib_version")) { - static QHash dirEntryListCache; - QStringList entries = dirEntryListCache.value(bd); - if (entries.isEmpty()) { - QDir dir(bd); - entries = dir.entryList(); - dirEntryListCache.insert(bd, entries); - } - - QRegExp regx(QString("((lib)?%1([0-9]*)).(%2|prl)$").arg(stem).arg(ext), Qt::CaseInsensitive); - for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { - if(regx.exactMatch((*it))) { - if (!regx.cap(3).isEmpty()) { - bool ok = true; - int num = regx.cap(3).toInt(&ok); - biggest = qMax(biggest, (!ok ? -1 : num)); - } - } - } - } if(libInfoRead && !libinfo.values("QMAKE_PRL_CONFIG").contains("staticlib") && !libinfo.isEmpty("QMAKE_PRL_VERSION")) - biggest = qMax(biggest, libinfo.first("QMAKE_PRL_VERSION").toQString().replace(".", "").toInt()); + biggest = libinfo.first("QMAKE_PRL_VERSION").toQString().replace(".", "").toInt(); return biggest; } diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h index d09ec4259de..25b555ec863 100644 --- a/qmake/generators/win32/winmakefile.h +++ b/qmake/generators/win32/winmakefile.h @@ -57,7 +57,7 @@ protected: virtual void writeRcFilePart(QTextStream &t); - int findHighestVersion(const QString &dir, const QString &stem, const QString &ext = QLatin1String("lib")); + int findHighestVersion(const QString &dir, const QString &stem); virtual bool findLibraries(); virtual ProString fixLibFlag(const ProString &lib);