qt5base-lts/tests/benchmarks/corelib
Marc Mutz 25fff849e8 QDirIterator: add nextFileInfo()
Before this change, next() was the only way to advance the iterator,
whether the caller was ultimately interested in just the filePath()
(good) or not (bad luck, had to call .fileInfo()).

Add a new function, nextFileInfo(), with returns fileInfo() instead.
Incidentally, the returned object has already been constructed as part
of advance()ing the iterator, so the new function is faster than
next() even if the result is ignored, because we're not calculating a
QString result the caller may not be interested in.

Use the new function around the code.

Fix a couple of cases of next(); fileInfo().filePath() (just use
next()'s return value) as a drive-by.

[ChangeLog][QtCore][QDirIterator] Added nextFileInfo(), which is like
next(), but returns fileInfo() instead of filePath().

Change-Id: I601220575961169b44139fc55b9eae6c3197afb4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-07-28 15:16:42 +02:00
..
io QDirIterator: add nextFileInfo() 2021-07-28 15:16:42 +02:00
itemmodels Add QSortFilterProxyModel clear-filter benchmark 2021-04-25 13:25:01 +03:00
json Remove qmake project files for benchmarks 2021-02-01 21:14:01 +01:00
kernel Fix QMetaType API deprecation warning in benchmark 2021-04-26 10:59:32 +02:00
mimetypes Remove qmake project files for benchmarks 2021-02-01 21:14:01 +01:00
plugin Fix some warnings 2021-03-29 16:06:25 +02:00
text Add benchmarks for QString::number 2021-07-22 23:01:41 +02:00
thread Add basic benchmarks for QFuture 2021-06-19 08:48:14 +02:00
time Make loop variables references in date benchmark 2021-04-27 15:34:50 +02:00
tools Add a benchmark for QSharedPointer 2021-07-27 14:58:41 +02:00
CMakeLists.txt Add QSortFilterProxyModel clear-filter benchmark 2021-04-25 13:25:01 +03:00