-
Committer:
Stefan Brüns
-
Date:
2019-04-11 21:36:43 UTC
-
Revision ID:
git-v1:899ed35c687222a346c997e9879c4ea064342c69
Ensure QFileInfo is valid for the first FilteredDirIterator entry
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
Reviewers: #baloo, #frameworks, ngraham, astippich, poboiko
Reviewed By: #baloo, ngraham
Subscribers: kde-frameworks-devel
Tags: #frameworks, #baloo
Differential Revision: https://phabricator.kde.org/D20332