D26021: Display sub categories when searching

David Edmundson noreply at phabricator.kde.org
Fri Dec 20 12:06:45 GMT 2019


davidedmundson accepted this revision.
davidedmundson added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> MenuModel.cpp:49
>  
> +QHash<int, QByteArray> MenuModel::roleNames() const
> +{

In other models we tend to drop the suffix "Role" from the rolename

i.e Qt::DisplayRole -> "display"

but it's not super important.

> MenuModel.cpp:124
> +            MenuItem *candidate = mi;
> +            int depth = 0;
> +            while ( candidate && candidate->parent() ) {

I find it un-intuitive that they effectively start at 1, not 0.

The hidden root object is 0, but that can't be accessed via an index.

It took me a while to understand why the delegate spacing logic  had depth-2

REPOSITORY
  R124 System Settings

BRANCH
  arcpatch-D26021

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

To: mart, #plasma, #vdg, davidedmundson
Cc: ngraham, davidedmundson, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191220/7ecd9a1b/attachment.html>


More information about the Plasma-devel mailing list