<table><tr><td style="">rjvbb created this revision.<br />rjvbb added a reviewer: KDevelop.<br />rjvbb added a project: KDevelop.<br />rjvbb requested review of this revision.
</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/D14469">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This patch aims to introduce a "clever" way to wrap the message ("error") column in the Problem Reporter toolview, something that I have often missed (e.g. because of very long file messages).</p>
<p>Activating text wrapping isn't very difficult, getting the rows at the appropriate height isn't because I haven't been able to get a reliable indicator that text is indeed being wrapped (= displayed on more than a single line). I'm thus guessing it by comparing the standard delegate sizeHint to the width that will actually be used; if larger wrapping will result.</p>
<p>Ideally that rendering width will be the width selected by the user or else 2/3 of the toolview width (which works well for me but can be another value of course).</p>
<p>Annoyingly I haven't been able to figure out how to detect *user* induced changes to the column width (hence the approximation of waiting for the 1st column redraw). In addition, the delegate's sizeHint() method isn't re-called when the user is or has finished resizing the column.</p>
<p>Finally, the calculated height for wrapped text is sometimes a bit too low (or the sizeHint is ignored?) but is usually much too high initially when starting KDevelop with the Problem view open.</p>
<p>This is thus very much a work in process; I'm putting it here because I think it is potentially useful and hope to get a few nudges to get the glitches out of my code.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Apply patch and open any document where the parser gives diagnostic output.<br />
One can set the default width to 1/3 of the toolview to cause wrapping in almost any text.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14469">https://phabricator.kde.org/D14469</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/problemreporter/problemtreeview.cpp</div></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop<br /><strong>Cc: </strong>kdevelop-devel, antismap, iodelay, vbspam, njensen, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>