<table><tr><td style="">cullmann planned changes to this revision.<br />cullmann 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/D22592">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D22592#498923" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D22592#498923</a>, <a href="https://phabricator.kde.org/p/mnauwelaerts/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@mnauwelaerts</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>Thanks for the new feature! However, a few regressions and concerns:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">the "show details" action is no longer enabled/disabled depending on whether useful detail info is available</li>
<li class="remarkup-list-item">the detail is now in a separate column; if a server decides to present e.g. argument info there, it does not look that good in a separate column with not-so-useful white space in between (others thing probably also not either). While a bit hack-ish, that's why it was previously merged with the "main text".</li>
<li class="remarkup-list-item">if the symbol view tree is (partially) collapsed, and then the item tracking kicks in to sync with cursor position, the tree is expanded again, rather than showing topmost relevant (visible) item. Previously, it was kept collapsed, as presumably so done by user for a reason.</li>
<li class="remarkup-list-item">the flat-list option is gone as well as already mentioned (whether or not it may be deemed useful)
<br /><br />
There are good arguments for moving to a model/view where a single treewidget is now treeview/model combination, such as to support filtering as added here. However, most of the other issues seem due to moving part of the "presentation layer" (the model part) to the server layer. The latter now returns a (wrapped) QStandardItemModel, which is (essentially) a not so descriptive variant type. So it requires inspection of the implementation to see what is happening, and ties implementation in one (view) part to implementation elsewhere. As a result, deciding what/where/how to do with flat (or not) or where/how to present "detail info" is less transparent and plain-and-simple. Additional parameters could indeed be passed down to the server call and that would effectively work, but also clearly such parameters are not relevant to protocol layer (= server responsibility). So it would all work, but become blurry as to what server part actually represents and what part is doing what, since it would then do do some protocol level stuff/call and then some <not-always-so-clear> ... Maybe the detail thingy or the flat list is not so important or useful (now?), but then it feels a bit like dropping some functionality because implementation does not really handle it well/nicely (whereas conversely implementation should serve functionality/features). And more relevant, other more important presentation choices may arise (such as perhaps already the detail representation now) and would then become more complicated and less flexible to handle (e.g. require not so plain-and-simple proxy model or passing stuff back and forth to server). Also note that the server part has acquired more dependencies (a.o. QtGui), which even more reduces any chance/possibility of splitting out things for use by 3rd party (as mentioned in <a href="https://phabricator.kde.org/D22595" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D22595</a>), and for which reason the (server) dependencies have been kept minimum so far.
<br /><br />
So, in this view, it seems/feels like we could have our cake and eat it, that is, avoid those (future) issues and still have the new filter option (and icon on demand etc) by having a server layer as it was and then using treeview/model combination on the (symbol)view level. Likewise, the latter view part is also in a good position to cache server call results and can simply forego submitting to server if it finds it cached (in some map or so). It already knows about text changes (by signal) and can invalidate (local) cache entry at that time.</li>
</ul></div>
</blockquote>
<p>Thanks for the review ;=)</p>
<p>I agree on most points, without implementing a own model, which is error prone, stuff like dynamic show details or flat-list need e.g. own item delegates and yet-an-other extra filter model.<br />
Given that will make the code base twice as large as with your initial implemetation, I will backtrack here and just create the model in the view as needed, like you did before, then the only difference will be the use of the QTreeView and the ability to filter.<br />
I will take care of the other regressions ;)</p>
<p>Then you can take a look again, one can still at a later point again decide if one wants to lower the model to a different layer.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R40 Kate</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D22592">https://phabricator.kde.org/D22592</a></div></div><br /><div><strong>To: </strong>cullmann, dhaumann, mnauwelaerts<br /><strong>Cc: </strong>kwrite-devel, domson, michaelh, ngraham, demsking, cullmann, sars, dhaumann<br /></div>