<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/118451/">https://git.reviewboard.kde.org/r/118451/</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 98bb8800e2346c8906e382b4720064b3e8117388 by Denis Steckelmacher to branch master.</pre>
<br />
<p>- Commit Hook</p>
<br />
<p>On June 1st, 2014, 1:49 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 June 1, 2014, 1:49 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;">This patch adds support for field member expressions ("base.identifier") to ExpressionVisitor and UseBuilder. When ExpressionVisitor encounters such an expression, it finds the type of the base (that can be anything) and then looks in its internal context for the declaration of the identifier. UseBuilder has also been modified to take advantage of this: when a field member expression is encountered, ExpressionVisitor is used to get its corresponding declaration.
This patch makes something like this possible:
Item {
id: test
prop: "value"
onSomething: { console.log(test.prop); }
}
"prop" in "test.prop" is registered as being an use of the "prop" property of test.
Currently, only QML components are handled. Snippets like "var a = {foo: "bar"}; a.bar = "bar";" are currently not supported because a is not declared in such a way that ExpressionVisitor can find a declaration having an inner context. I have ideas allowing this to work, though.</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 passes, and a new test ensures that "prop" has two uses (its declaration and "test.prop") in the snippet I give in the description.</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/expressionvisitor.h <span style="color: grey">(b5c2781)</span></li>
<li>duchain/expressionvisitor.cpp <span style="color: grey">(68a6226)</span></li>
<li>duchain/helper.h <span style="color: grey">(fa28a9c)</span></li>
<li>duchain/helper.cpp <span style="color: grey">(480a051)</span></li>
<li>duchain/usebuilder.h <span style="color: grey">(6ffbf62)</span></li>
<li>duchain/usebuilder.cpp <span style="color: grey">(7d443c3)</span></li>
<li>tests/files/test.qml <span style="color: grey">(f6b1295)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118451/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>