D9252: Created 'GroupHiddenRole' for KPlacesModel

Milian Wolff noreply at phabricator.kde.org
Fri Dec 8 13:24:43 UTC 2017


mwolff accepted this revision.
mwolff added a comment.
This revision is now accepted and ready to land.


  you could reduce the code duplication by adding a loop. Note that you can even write something like this:
  
    for (auto type : {type1, type2, type3}) {
       ....
    }

INLINE COMMENTS

> kfileplacesmodeltest.cpp:1242
> +    m_places->setGroupHidden(KFilePlacesModel::SearchForType, true);
> +    for (auto index : m_places->groupIndexes(KFilePlacesModel::SearchForType)) {
> +        QCOMPARE(index.data(KFilePlacesModel::GroupHiddenRole).toBool(), true);

nest this in an outer loop over the group types to share most of the code

REPOSITORY
  R241 KIO

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

To: renatoo, mwolff
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171208/f880798b/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list