<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="https://git.reviewboard.kde.org/r/118325/">https://git.reviewboard.kde.org/r/118325/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://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 Denis Steckelmacher.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdev-qmljs
</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;">After having discussed with Sven Brauch on IRC, we decided to test if merging the features of ContextBuilder in DeclarationBuilder is possible. The potential benefit of that is the simplification of the code logic: contexts are created right after their corresponding declarations, and a quick look a the source code immediately exposes what is created where, why does this particular structure have a dedicated context, etc.
The closer integration of contexts and declarations also allows some code simplifications (currently not many, but future features will highly benefit from the merge). This patch actually removes more lines than it adds ones.
The ContextBuilder still exists, because it implements features used in DeclarationBuilder and UseBuilder that need to be kept factorized. There are also methods of AbstractContextBuilder that are declared pure virtual, so an implementation of AbstractContextBuilder is needed.
Finally, this patch changes UseBuilder so that it uses TopDUContext::findContextAt to find the context in which an identifier appears. Before this patch, UseBuilder relied on ContextBuilder, that reopened the contexts when needed.</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;">The whole testsuite passes, with ContextBuilder replaced by DeclarationBuilder in testcontexts. This is needed because ContextBuilder does not create any context anymore, so testcontexts has to use DeclarationBuilder.</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>duchain/usebuilder.cpp <span style="color: grey">(bd31f35)</span></li>
<li>duchain/tests/testcontexts.cpp <span style="color: grey">(2fbd7cf)</span></li>
<li>duchain/parsesession.cpp <span style="color: grey">(6fbdd91)</span></li>
<li>duchain/parsesession.h <span style="color: grey">(5f6c681)</span></li>
<li>duchain/declarationbuilder.cpp <span style="color: grey">(d2d5b02)</span></li>
<li>duchain/declarationbuilder.h <span style="color: grey">(fd56605)</span></li>
<li>duchain/contextbuilder.cpp <span style="color: grey">(091a799)</span></li>
<li>duchain/contextbuilder.h <span style="color: grey">(3a0ed0f)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118325/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>