<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/118700/">https://git.reviewboard.kde.org/r/118700/</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>
<p style="color: grey;"><i>Updated June 12, 2014, 7:27 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Enable the special handling of "parent" only for QML files (file names ending with ".qml"), and add a code-completion unit test for the feature.</pre>
</td>
</tr>
</table>
<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 a special-case for "parent" in ExpressionVisitor. Even if every QML object has a "parent" property of type QQuickItem, the user most of the time wants to refer to the enclosing QML component when he/she types "parent". If there is no enclosing QML component (the current component is a top-level one or something else happened), then ExpressionVisitor falls back to the old behavior and returns a QQuickItem instance.
I would like to be able to activate this special handling of "parent" only for QML files, because Javascript files may use "parent" for something else. Is it possible, given a DUContext, to find its language? (or is there a way for the QML/JS plugin to store in the DUContext that the file is a Javascript one or a QML one?)</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;">A new unit test has been added. "parent" is used to refer to the enclosing component of a sub-component, and uses are correctly built. The rest of the unit tests pass. Manual testing shows that the highlighting of "parent" and the code-completion for "parent." is as expected.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>codecompletion/tests/qmlcompletiontest.cpp <span style="color: grey">(1b5cdee)</span></li>
<li>duchain/expressionvisitor.cpp <span style="color: grey">(6545997)</span></li>
<li>tests/files/test.qml <span style="color: grey">(2d3dc7d)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118700/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>