<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/101690/">http://git.reviewboard.kde.org/r/101690/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On June 19th, 2011, 6:14 p.m., <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/101690/diff/1/?file=24726#file24726line523" style="color: black; font-weight: bold; text-decoration: underline;">languages/cpp/cppduchain/declarationbuilder.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">TemplateDeclaration* DeclarationBuilder::findTemplateSpecializedFrom(Identifier templateId, AbstractFunctionDeclaration* templFunDecl)</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">523</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QualifiedIdentifier</span> <span class="n">searchId</span> <span class="o">=</span> <span class="n">Cpp</span><span class="o">::</span><span class="n">stripPrefixes</span><span class="p">(</span><span class="n">findInContext</span><span class="p">,</span> <span class="n">QualifiedIdentifier</span><span class="p">(</span><span class="n">templateId</span><span class="p">.</span><span class="n">toString</span><span class="p">()));</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;">has the QID no ctor taking a ID? If not, why? I'd assume this could also be optimized API-wise?</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;">I should've commented this. For some reason the localID takes the form "ClassName::Foo". If I pass the localID to the QualifiedIdentifier it won't break it up into its parts (ie "ClassName", "Foo"). That means that it won't be able to stripPrefixes at all. If I pass it as a string however, it breaks it up as expected and all is well.
I'm not sure how Identifier vs QualifiedIdentifier is supposed to work, but I'm guessing that localID should actually be a QualifiedIdentifier.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On June 19th, 2011, 6:14 p.m., <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/101690/diff/1/?file=24729#file24729line186" style="color: black; font-weight: bold; text-decoration: underline;">languages/cpp/cppduchain/tests/test_expressionparser.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void TestExpressionParser::testTemplateSpecialization()</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">186</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QEXPECT_FAIL</span><span class="p">(</span><span class="s">""</span><span class="p">,</span> <span class="s">"Why doesn't this work?"</span><span class="p">,</span> <span class="n">Continue</span><span class="p">);</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;">when you print (->toString()) the specializedFrom - what does it say? Or is .data() = 0?</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, in the test, specializedFrom is always nil. I only bothered to trace it as far as "isSpecialization()", where for some reason "templDecl->templateContext(topContext)" is always nill. I'm guessing it has something to do with the test environment, but I'm hoping someone knows a workaround/solution.</pre>
<br />
<p>- Olivier Jean de</p>
<br />
<p>On June 19th, 2011, 7:51 a.m., Olivier Jean de Gaalon wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDevelop and David Nolden.</div>
<div>By Olivier Jean de Gaalon.</div>
<p style="color: grey;"><i>Updated June 19, 2011, 7:51 a.m.</i></p>
<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;">Set specializedFrom for TemplateDeclarations in more cases then before.
Make expressionvisitor check specializedFrom to find type of "this".
Also adds a test that should work (works in normal usage), but in the test environment for some reason the template declarations never have a templateContext().</pre>
</td>
</tr>
</table>
<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=183614">183614</a>
</div>
<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/declarationbuilder.h <span style="color: grey">(2242da2)</span></li>
<li>languages/cpp/cppduchain/declarationbuilder.cpp <span style="color: grey">(0423842)</span></li>
<li>languages/cpp/cppduchain/expressionvisitor.cpp <span style="color: grey">(eef33e3)</span></li>
<li>languages/cpp/cppduchain/tests/test_expressionparser.h <span style="color: grey">(385568f)</span></li>
<li>languages/cpp/cppduchain/tests/test_expressionparser.cpp <span style="color: grey">(22e123a)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/101690/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>