diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2024-04-02 19:34:39 +0200 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2024-05-25 21:41:31 +0300 |
commit | 28fd2730802b7361e180705e0a813bd4abe83ca4 (patch) | |
tree | d43183e813ca247b5cb5c6b704a89bae3e455d24 /doc/src/images/qpainter-vectordeformation.png | |
parent | 56568fdee66ee30fd6d0afdd2a60c9355aba759c (diff) |
QDirListing: begin() should start iteration from square 0
The old behavior was that calling begin() calls
QDirListingPrivate::advance(), if you call begin() again, it would call
advance() a second time. Not the most intuitive of APIs, but it wasn't
any worse/different from QDirIterator Java-style hasNext()/next() (if
you call next() twice, you advance twice).
Now (c)begin() always starts iterating from the very beginning.
Amends c39a0d1e8956e042139ce3065681e4c5d07412f3
pushDirectory(initialEntryInfo) is now called from beginIterating(), so
don't call it in init().
Not using a std::stack because beginIterating() needs to clear the
iterator containers; for some reason on INTEGRITY something like this
won't work (std::stack doesn't have clear()), complaining about the
constructor being explicit:
nativeIterators = {};
The above works just fine on Linux, so instead of having to spell out
the type... just use std::vector directly (back(), pop_back() and
clear()); this is private API so we have full constrol on how the
vectors are used.
Change-Id: Iaaa849f989b2724bf070730f6273263289dd4d9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'doc/src/images/qpainter-vectordeformation.png')
0 files changed, 0 insertions, 0 deletions