diff options
author | Ulf Hermann <[email protected]> | 2019-10-28 11:14:11 +0100 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2019-10-30 09:23:24 +0100 |
commit | fc3c6cde83ef705565cc8f3b960cc838329049d6 (patch) | |
tree | 1cc3d24874a824ed8e8b5b2ef3869818098a043b | |
parent | a317bff2985b0bd70a8b7685249137df4cc17c5d (diff) |
qmake: Don't call QDir::count() over and over
This can be expensive. We don't expect files to be added to the
directory while qmake is running, and if that happened, the result would
be unpredictable anyway.
Change-Id: I5db93132046c1284130bbe51ce1ecd2a14665206
Reviewed-by: Thiago Macieira <[email protected]>
-rw-r--r-- | qmake/library/qmakebuiltins.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/library/qmakebuiltins.cpp b/qmake/library/qmakebuiltins.cpp index 866915bdfd1..7f6926e98ed 100644 --- a/qmake/library/qmakebuiltins.cpp +++ b/qmake/library/qmakebuiltins.cpp @@ -1043,7 +1043,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinExpand( for (int d = 0; d < dirs.count(); d++) { QString dir = dirs[d]; QDir qdir(pfx + dir); - for (int i = 0; i < (int)qdir.count(); ++i) { + for (int i = 0, count = int(qdir.count()); i < count; ++i) { if (qdir[i] == statics.strDot || qdir[i] == statics.strDotDot) continue; QString fname = dir + qdir[i]; |