<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/118398/">https://git.reviewboard.kde.org/r/118398/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been submitted with commit a06996cb51221a22571c10a87a8ad645dc2653f6 by Denis Steckelmacher to branch master.</pre>
<br />
<p>- Commit Hook</p>
<br />
<p>On May 29th, 2014, 2:12 p.m. UTC, Denis Steckelmacher wrote:</p>
<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>
<p style="color: grey;"><i>Updated May 29, 2014, 2:12 p.m.</i></p>
<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;">QML components can be considered as classes and instances at the same time. This is a bit strange, but QML is a declarative language that allows the user to subclass components, modify them and give them IDs (thus instantiating the subclasses they have just created).
This is expressed in DUChain by using an anonymous class:
* When a QML component is declared, for instance with "Button {", a new class having no name is opened. This class inherits from Button.
* When an "id:" script binding is seen, the identifier given by the user is used to instantiate the anonymous class surrounding the id: statement. This patch also handles the "exports:" script binding, that is used by plugin.qmltypes files to declare exported subclasses of components. This is a small cleanup that was needed for all the DUContext opened by the classes to be correct.
This patch adds several methods that are used by the two aforementioned features: one adds a base class to a class declaration (addBaseClass), and one imports in a context the inner context of all the base classes of a class declaration (registerBaseClasses).</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 testsuite still passes, but needed to be heavily modified as it was previously built around the idea that "Button { id: foo }" declares a class foo that inherits from nothing. Now, the class that is declared has no name (because "Item { }" is still a valid component declaration and the user wants to be able to use code-completion without having to give an id to every component).</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/declarationbuilder.h <span style="color: grey">(e0c3539)</span></li>
<li>duchain/declarationbuilder.cpp <span style="color: grey">(8d9687a)</span></li>
<li>duchain/tests/testdeclarations.cpp <span style="color: grey">(199a566)</span></li>
<li>tests/files/plugins.qml <span style="color: grey">(eda5388)</span></li>
<li>tests/files/test.qml <span style="color: grey">(dc9efe4)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118398/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>