qt6-bb10/tests/auto/corelib/io
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
..
largefile Change license for tests files 2024-02-04 09:56:42 +01:00
qabstractfileengine Change license for tests files 2024-02-04 09:56:42 +01:00
qbuffer Change license for tests files 2024-02-04 09:56:42 +01:00
qdataurl Change license for tests files 2024-02-04 09:56:42 +01:00
qdebug Change license for tests files 2024-02-04 09:56:42 +01:00
qdir QDir: Use QT_TEST_EQUALITY_OPS macro in unit-tests 2024-02-15 14:51:37 +01:00
qdiriterator tst_qdiriterator: add a test for QFsFileEngineIterator 2024-02-04 14:04:18 +02:00
qdirlisting Add QDirListing, an STL-style iterator for directory entries 2024-02-29 16:35:57 +02:00
qfile Change license for tests files 2024-02-04 09:56:42 +01:00
qfileinfo QFileInfo: Use new comparison helper macros 2024-02-14 21:47:29 +01:00
qfileselector Change license for tests files 2024-02-04 09:56:42 +01:00
qfilesystementry Change license for tests files 2024-02-04 09:56:42 +01:00
qfilesystemmetadata Change license for tests files 2024-02-04 09:56:42 +01:00
qfilesystemwatcher QFilesystemWatcher: speed up the unittests 2024-02-14 17:57:03 +02:00
qiodevice Change license for tests files 2024-02-04 09:56:42 +01:00
qipaddress Change license for tests files 2024-02-04 09:56:42 +01:00
qlockfile Change license for tests files 2024-02-04 09:56:42 +01:00
qloggingcategory Change license for tests files 2024-02-04 09:56:42 +01:00
qloggingregistry Change license for tests files 2024-02-04 09:56:42 +01:00
qnodebug Change license for tests files 2024-02-04 09:56:42 +01:00
qprocess Change license for tests files 2024-02-04 09:56:42 +01:00
qprocess-noapplication Change license for tests files 2024-02-04 09:56:42 +01:00
qprocessenvironment QProcessEnvironment: Use new comparison helper macros 2024-02-22 13:37:41 +01:00
qresourceengine Change license for tests files 2024-02-04 09:56:42 +01:00
qsavefile Change license for tests files 2024-02-04 09:56:42 +01:00
qsettings Remove extra semi-colons 2024-02-06 20:17:18 +09:00
qstandardpaths Change license for tests files 2024-02-04 09:56:42 +01:00
qstorageinfo QStorageInfo: Use new comparison helper macros 2024-02-22 13:37:42 +01:00
qtemporarydir Change license for tests files 2024-02-04 09:56:42 +01:00
qtemporaryfile Change license for tests files 2024-02-04 09:56:42 +01:00
qurl Change license for tests files 2024-02-04 09:56:42 +01:00
qurlinternal Change license for tests files 2024-02-04 09:56:42 +01:00
qurlquery QUrlQuery: Use new comparison helper macros 2024-02-23 19:46:02 +01:00
qurluts46 QUrl IDNA: Update to Unicode 15.1 2024-02-08 17:43:58 +01:00
qzip Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt Add QDirListing, an STL-style iterator for directory entries 2024-02-29 16:35:57 +02:00