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 4041610cb2.
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: Idb96cfbddc56e0d7ed38ab1b0279f40592c75175
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
bb10
parent
4b806d678e
commit
56e151663e
|
|
@ -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…
Reference in New Issue