<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/123586/">https://git.reviewboard.kde.org/r/123586/</a>
     </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been marked as submitted.</h1>
  </td>
 </tr>
</table>
<br />


<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 KDevelop.</div>
<div>By Alex Richardson.</div>


<p style="color: grey;"><i>Updated Aug. 4, 2015, 10:49 a.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Submitted with commit 6d678cfc4c6380888f8e80d443c812298ecad9ec by Alex Richardson to branch master.</pre>
  </td>
 </tr>
</table>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdevplatform
</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;">This patch adds the following improvements:
- Contexts without a matching declaration (DUContext::owner()) now also show up in the outline view
- Outline view can be sorted alphabetically
- Nodes in the outline will now always appear in the order that the matching declaration appears in the source
- Reduce code duplication between OutlineNode and OutlineModel</p>
<hr style="text-rendering: inherit;margin: 0;padding: 0;white-space: normal;border: 1px solid #ddd;line-height: inherit;" />
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Simplify outlineview by reusing code from OutlineNode in the model</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Instead of storing a std::vector<OutlineNode> we now store a single
OutlineNode* which means the model no longer iterates over the decls of
the TopDUContext but rather we reuse OutlineNode::appendChildContext()</p>
<hr style="text-rendering: inherit;margin: 0;padding: 0;white-space: normal;border: 1px solid #ddd;line-height: inherit;" />
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Fix not showing Contexts without declarations in outline view</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">For example in the following code the members of N::C would not show up:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">namespace N {
    class C;
}</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">class N::C {
    char c;
}</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">int main(int, char**) {}</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">There is still the problem that N::C gets listed after main(), but there
are also other ordering problems. This will require sorting based on the
declaration location of the OulineNode</p>
<hr style="text-rendering: inherit;margin: 0;padding: 0;white-space: normal;border: 1px solid #ddd;line-height: inherit;" />
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Outline view: show icons also for contexts without a declaration</p>
<hr style="text-rendering: inherit;margin: 0;padding: 0;white-space: normal;border: 1px solid #ddd;line-height: inherit;" />
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Sort outlineview base on where the elements appear in the source</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The outline view is mostly correct. However, in cases where there are
contexts that don't have an associated declaration these will be added
to the end of the list regardless of where they are in the source. For
example the following code</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">namespace N { class C; }
class N::C {
   int f(double);
};
void foo()</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">would previously result in an outline like this:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">+-+- N
| \-- C
+-- foo(): void
+-+- N
   \-+- C
      \-- f(double): int</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">now it correctly renders as:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">+-+- N
| \-- C
+-+- N
|  \-+- C
|     \-- f(double): int
+-- foo(): void</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Allow sorting the outline alphabetically</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This adds a button next to the filter field to toggle sorting. By
default it will be sorted based on the source location, but for a quick
overview of a source file an alphabetical list can be very useful.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">Appears to work flawlessly in testing so far, but I would appreciate it if someone else could have a look at the code.</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>plugins/outlineview/outlinewidget.cpp <span style="color: grey">(56c1e4436f0b02d6071d14586326d0b332606d49)</span></li>

 <li>plugins/outlineview/outlinewidget.h <span style="color: grey">(3535ac8fce2e6c2fbc95a970496951b00ef84a9b)</span></li>

 <li>plugins/outlineview/outlinenode.cpp <span style="color: grey">(fedcbd87cc8dc6e9e18bad1336e912a643af6722)</span></li>

 <li>plugins/outlineview/outlinenode.h <span style="color: grey">(0e8d3f536322478d84c13141a4e9fbebe09ede66)</span></li>

 <li>plugins/outlineview/outlinemodel.cpp <span style="color: grey">(8f4f8fbc3c97365e223ca7cb45e685f2dcf96c0f)</span></li>

 <li>plugins/outlineview/CMakeLists.txt <span style="color: grey">(8c25c4ede920b492f8e38db68013640673cfc504)</span></li>

 <li>plugins/outlineview/outlinemodel.h <span style="color: grey">(b54ab04acf089ce9e046e2f274b2d019a036ab93)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/123586/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>



  </div>
 </body>
</html>