<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/114397/">http://git.reviewboard.kde.org/r/114397/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On December 17th, 2013, 12:24 p.m. UTC, <b>Milian Wolff</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/114397/diff/2/?file=224391#file224391line1210" style="color: black; font-weight: bold; text-decoration: underline;">languages/cpp/cppduchain/expressionvisitor.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void ExpressionVisitor::createDelayedType( AST* node , bool expression ) {</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1210</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="c1">// unfortunately for cases '{ A a; }', we don't have anything we can point to</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">We could point to the semicolon :D

Anyhow, without associating it with anything, can we still navigate uses in a row? I.e. will the "next use" cycle with key board shortcuts work?</pre>
 </blockquote>



 <p>On December 17th, 2013, 1:06 p.m. UTC, <b>Kevin Funk</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;">Indeed, the keyboard shortcuts don't work. I was only verifying if clicking into the "Show Uses" widget works appropriately (which is working just fine).

I'd argue that the bug is in the shortcut handlers, then. Investigating a bit: ContextBrowserPlugin::switchUse uses 'allUses' from ducontext.h to collect the uses. Uses with empty ranges seem to be filtered out.

So I'm wondering: Why is the "bool noEmptyUses" parameter needed in allUses() at all? An empty range doesn't mean it is invalid. To me, it looks like allUses() should rather check whether RangeInRevision::isValid() returns true instead of checking RangeInRevision::isEmpty(). I'm proposing getting rid off the additional boolean parameter to allUses(). Hypothetically speaking here -- this is untested.</pre>
 </blockquote>





 <p>On December 17th, 2013, 1:32 p.m. UTC, <b>Kevin Funk</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;">For the record: Getting rid off the parameter alone doesn't fix it. It fixes the case where the "Next Use" keyboard shortcut is invoked, but in case "Previous Use" is invoked, it ignores the use a la { A a; }. Some more bits of the ContextBrowserPlugin::switchUse method need to be changed in order to fix this, I guess.

If you don't mind I'll push this and investigate the keyboard navigation separately.</pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, please go ahead.

One thing to note is that the current code probably tries to prevent navigation into a macro expansion (which would also have an empty range).</pre>
<br />




<p>- Milian</p>


<br />
<p>On December 11th, 2013, 8:12 a.m. UTC, Kevin Funk wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for KDevelop.</div>
<div>By Kevin Funk.</div>


<p style="color: grey;"><i>Updated Dec. 11, 2013, 8:12 a.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=300347">300347</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdevelop
</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;">Show uses for default-initialization

Before this patch, declarations such as '{ A a; }' didn't increase the
use-count of 'A::A()'

BUG: 300347
REVIEW: 114397</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>languages/cpp/cppduchain/expressionvisitor.cpp <span style="color: grey">(5e1200f023ff49d9c9e341f286173ecf6ceb94a3)</span></li>

 <li>languages/cpp/cppduchain/tests/test_duchain.cpp <span style="color: grey">(c7aa38de8fc7f6ff6a32d0ae24958c3ed6f30121)</span></li>

</ul>

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







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








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