<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/127013/">https://git.reviewboard.kde.org/r/127013/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On February 29th, 2016, 11:52 p.m. UTC, <b>Albert Astals Cid</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I was going to commit this but then i realized I can't because it will crash the mobile version. In documentitem.cpp the parent of the model is not a view.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This highlights a problem with the patch, it accesses the view from the model, that is wrong, ideally models don't know about their views.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">My suggestion to workaround this problem is this:
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> Leave the decoration role as it is (as deprecated for the mobile version)
</em> Introduce a new role named someting like PathToLeaf that returns the arrow item for the whole path (except the leaf) (for that we do not need view info)
* In pageitemdeleate (that is tied to the view) you can inspect the view expanded/collapsed status + the new role to decide whether to draw the triangle or not for the non leaf</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Does that sound doable?</p></pre>
</blockquote>
<p>On February 29th, 2016, 11:53 p.m. UTC, <b>Albert Astals Cid</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Stupid markdown processing, i meant
* Leave the decoration role as it is (as deprecated for the mobile version)
* Introduce a new role named someting like PathToLeaf that returns the arrow item for the whole path (except the leaf) (for that we do not need view info)
* In pageitemdeleate (that is tied to the view) you can inspect the view expanded/collapsed status + the new role to decide whether to draw the triangle or not for the non leaf</pre>
</blockquote>
<p>On March 7th, 2016, 11:33 p.m. UTC, <b>Miklós Máté</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I can't compile the kactive code, because there is a dependency conflict between libkactivities-dev 4.13 and kde 5. Even if I could compile it, I have no idea how I could run it.
I have an idea for the solution, though. How about "dynamic_cast< QTreeView* > ( QObject::parent() );" and only filter the highlighted items when this returns not NULL?</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I can't compile the kactive code, because there is a dependency conflict between libkactivities-dev 4.13 and kde 5.</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">There's no such thing as KDE 5 ;)</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Even if I could compile it, I have no idea how I could run it.</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Well it creates a binary, is not hard at all</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have an idea for the solution, though. How about "dynamic_cast< QTreeView* > ( QObject::parent() );" and only filter the highlighted items when this returns not NULL?</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">That's a bit of a hack, what's wrong with the solution i suggested that properly applies the model/view separation?</p></pre>
<br />
<p>- Albert</p>
<br />
<p>On February 27th, 2016, 10:30 a.m. UTC, Miklós Máté wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Okular.</div>
<div>By Miklós Máté.</div>
<p style="color: grey;"><i>Updated Feb. 27, 2016, 10:30 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
okular
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">fixes bug #342076</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>ui/tocmodel.cpp <span style="color: grey">(ce93366)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/127013/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/02/27/78357c93-a723-4e1b-8a8d-638d49ed334e__okular_marker_v2.diff">okular_marker_v2.diff</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/02/27/c4395f9d-2991-4f6c-bf36-d973dbcb5b64__okular_marker_v2.diff">okular_marker_v2.diff</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>