<table><tr><td style="">davidedmundson added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D22762">View Revision</a></tr></table><br /><div><div><p>m_flat currently behaves a bit specially. It doesn't affect the toplevel, it only affects sub models created within it.</p>

<p>If we used AppsModel directly to fix the original bug, we would need to fix AppsModel to follow m_flat when showing an empty m_entryPath</p>

<p>So in addition to a property for entry path we would add something like:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">AppsModel.cpp:481
-      if (m_entryPath.isEmpty())
+    if (m_entryPath.isEmpty() && !m_flat) {

(bringing us into the else path that uses processServiceGroup which follows m_flat)</pre></div>

<p>Which fixes the bug giving us a flat AppsModel. But it now that introduces a regression into the dash that's currently in kdeplasma-addons.</p>

<p>We're now implicitly affecting the RootModel top level to be flat, meaning the sidebar on the right hand side now lists every application not just groups - which obviously isn't OK.</p>

<p>We would need to introduce a property "flatButForRealThisTime" property on AppsModel which IMHO is going in a messy direction compared to only affecting allModel.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D22762">https://phabricator.kde.org/D22762</a></div></div><br /><div><strong>To: </strong>tcanabrava, davidedmundson, hein<br /><strong>Cc: </strong>hein, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>