D20332: Ensure QFileInfo is valid for the first FilteredDirIterator entry

Stefan BrĂ¼ns noreply at phabricator.kde.org
Sun Apr 7 03:59:15 BST 2019


bruns created this revision.
bruns added reviewers: Baloo, Frameworks, ngraham, astippich, poboiko.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  FilteredDirIterator returns its own path for the first next() call. As
  the fileInfo() from the underlying QDirIterator is only valid after
  the QDirIterator::next() has been called, the first QFileInfo was the
  default constructed one.
  
  Initialize a proper QFileInfo() on m_firstItem, and use the QDirIterators
  fileInfo() only for the subsequent ones.

TEST PLAN
  make

REPOSITORY
  R293 Baloo

BRANCH
  fileinfo

REVISION DETAIL
  https://phabricator.kde.org/D20332

AFFECTED FILES
  src/file/filtereddiriterator.cpp
  src/file/filtereddiriterator.h

To: bruns, #baloo, #frameworks, ngraham, astippich, poboiko
Cc: kde-frameworks-devel, gennad, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190407/36759613/attachment.html>


More information about the Kde-frameworks-devel mailing list