qt6-bb10/tests/auto/corelib
Ahmad Samir c39a0d1e89 Add QDirListing, an STL-style iterator for directory entries
This class offers a forward-only const_iterator, that matches the system
low-level functions' logic (e.g. readdir()/dirstream logic). This
iterator is a std::input_iterator_tag.

QDirIterator uses Java-style iterators that have a couple of issues:
- They don't fit the logic of the underlying native system functions
  (readdir()/__dirstream and co.), there is no way to know if there is a
  next entry except by advancing the iterator (calling readdir()) first
- As a consequence of the above, two QFileInfo objects, current and next,
  had to be used to fit that paradigm; and the code always
  iterated/stat'ed an extra entry past the one we want, e.g. when
  filtering

The next step is porting QAbstractFileEngineIterator and its subclasses
to be like QFileSystemIterator, i.e. replace hasNext()/next() with a `bool
advance()` virtual method. This is easier to reason about than the
Java-style iterators, and is more in-line with the new class.

Discussed-on: https://lists.qt-project.org/pipermail/development/2023-December/044745.html
Change-Id: I8e696cefdca18d8c78f803efdb83a73dd43eb720
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-29 16:35:57 +02:00
..
animation Change license for tests files 2024-02-04 09:56:42 +01:00
global tst_qmessagehandler: disable the backtrace tests outside of x86 2024-02-26 23:29:39 -08:00
io Add QDirListing, an STL-style iterator for directory entries 2024-02-29 16:35:57 +02:00
ipc Change license for tests files 2024-02-04 09:56:42 +01:00
itemmodels Change license for tests files 2024-02-04 09:56:42 +01:00
kernel JNI: support construction of QJniArray from std::initializer_list 2024-02-26 20:17:27 +01:00
mimetypes Change license for tests files 2024-02-04 09:56:42 +01:00
platform Change license for tests files 2024-02-04 09:56:42 +01:00
plugin Remove extra semi-colons 2024-02-06 20:17:18 +09:00
serialization QCborStreamReader: rename toType(Type&) -> appendToType(Type&) 2024-02-29 15:35:57 +01:00
text QString/QByteArray: add slice() methods 2024-02-29 00:27:25 +02:00
thread Fix conversion warning in tst_qresultstore 2024-02-27 19:45:42 +01:00
time QIcuTimeZonePrivate constructor: save iteration over all zone IDs 2024-02-08 15:40:03 +01:00
tools QList: add uninitialized resizes 2024-02-16 14:20:50 +01:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00