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.6 6.5 6.2 5.15 Change-Id: Idb96cfbddc56e0d7ed38ab1b0279f40592c75175 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 56e151663ebfd4fc0876d33f22c81f0218339914) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
0b5b6e7db2
commit
6a74a3c4c6
@ -2727,8 +2727,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()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user