summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Samir <[email protected]>2024-02-29 19:06:02 +0200
committerQt Cherry-pick Bot <[email protected]>2024-03-02 13:25:59 +0000
commit99b52e4a575dc57c3aafc94f87c45f36483b740b (patch)
tree7dce144f125a8d21518387f5b35b5b4406bd9664
parent39b90a96ff8d9444bcdb24508f2a09278ab33ab7 (diff)
androiddeployqt: fix QDirIterator::next() usage
The code inside the loop body uses it.next() twice, however hasNext() is called only once; each call to next() advances the iterator. Amends 4041610cb202699a47268975e5aaecaa1f182c0a. Pick-to: 6.2 5.15 Change-Id: Idb96cfbddc56e0d7ed38ab1b0279f40592c75175 Reviewed-by: Assam Boudjelthia <[email protected]> (cherry picked from commit 56e151663ebfd4fc0876d33f22c81f0218339914) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 6a74a3c4c6bf0af2297a32ec659fc2311f7e5126) (cherry picked from commit 2cec73ae80ad0c86b5c6628f1864e53ef33cdf4f)
-rw-r--r--src/tools/androiddeployqt/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index 3d7b31879d8..bbb36d7fab8 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -2730,8 +2730,9 @@ void checkAndWarnGradleLongPaths(const QString &outputDirectory)
QDirIterator it(outputDirectory, QStringList(QStringLiteral("*.java")), QDir::Files,
QDirIterator::Subdirectories);
while (it.hasNext()) {
- if (it.next().size() >= MAX_PATH)
- longFileNames.append(it.next());
+ const QString &filePath = it.next();
+ if (filePath.size() >= MAX_PATH)
+ longFileNames.append(filePath);
}
if (!longFileNames.isEmpty()) {