Details
Description
This is a regression.
while (!dir_iterator.next().isEmpty())
segfaults with 6.8 but not with 6.5 on macOS.
Qt docs on `next()`
If hasNext() returns false, this function does nothing, and returns an empty QString.
This
while (fIt.hasNext())
{
DEBG << fIt.next();
works on 6.8 and 6.5.
The source seems to be QDirListing. See here for some backtraces and some more info.
Attachments
For Gerrit Dashboard: QTBUG-130142 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
597865,4 | QDirIterator: don't crash with next() after hasNext() returned false | dev | qt/qtbase | Status: MERGED | +2 | 0 |
598230,2 | QDirIterator: don't crash with next() after hasNext() returned false | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |