summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qmake/generators/win32/winmakefile.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 5f56d66..8cf970e 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -78,8 +78,14 @@ Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem
int biggest=-1;
if(!project->isActiveConfig("no_versionlink")) {
- QDir dir(bd);
- QStringList entries = dir.entryList();
+ static QHash<QString, QStringList> 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(dllStem).arg(ext), Qt::CaseInsensitive);
for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
if(regx.exactMatch((*it))) {