D22762: Take in consideration flat() for the All Applications menu

Eike Hein noreply at phabricator.kde.org
Sat Jul 27 14:20:55 BST 2019


hein added a comment.


  You got a point, but there's a higher-level thing with the Kicker backend in terms of where it came from and where it's going:
  
  - Originally it was created specifically for the Kicker menu with the backend custom-designed to that UI. AppsModel is fairly generic (good), and the RootModel subclass exists almost solely to create the specific menu structure that the Kicker UI uses (it's the ugly wart in terms of this being a generic import, which it's increasingly used at)
  - Eventually we grew other UIs and RootModel keeps growing additional feature and mode knobs to customize it for them and it's getting rather sprawling
  
  I'd like to take the Kicker backend into a direction where it's more composable from QML to create different UIs rather than the equivalent of adding checkboxes to RootModel.
  
  In particular I think there's an opportunity to take a step towards that with this specific use case, which I'm guessing is to just get one flat list of apps, right?
  
  Namely I'd suggest:
  
  - AppsModel is already exposed to QML via the plugin and already implements QQmlParserStatus
  - Add a parameter-free constructor to AppsModel
  - Make entryPath a Q_PROPERTY to AppsModel and default it to empty (root level)
  
  Then whatever UI this is for can just do AppsModel{} and avoid all of the unnecessary stuff in RootModel and it's cleaner and a bit lighter.

REPOSITORY
  R119 Plasma Desktop

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

To: tcanabrava, davidedmundson, hein
Cc: hein, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190727/6db267af/attachment.html>


More information about the Plasma-devel mailing list