<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/118600/">https://git.reviewboard.kde.org/r/118600/</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;">maybe we should check whether we can/should update our internal copy of the QML AST library from QtCreator. Maybe they improved the AST there?</pre>
 <br />









<p>- Milian Wolff</p>


<br />
<p>On June 6th, 2014, 8:52 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 6, 2014, 8:52 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 QML signal declarations:

Item {
    signal test(int param1, bool param2)
}

The patch is not the nicest ever, but the QMLJS AST is especially bad here. First, QML signals and properties are both handled using a single UiPublicMember node (even if they are completely different things), and signals are declared in a completely different mean than Javascript function expressions or plugin.qmltypes signals. There are therefore three ways of declaring a function (a JS function, signals/methods in plugin.qmltypes files and plain QML signals), and the three ways cannot share any code because they use a completely different AST structure (FunctionExpression + FormalParameterList, "Signal { Parameter {...} Parameter {...} }", UiPublicMember + UiParameterList.</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;">Two new unit tests have been added. The first one ensures that signals are properly declared (with their typed parameters), and the second one ensures that the "minimal" syntax for defining signals (without parameters) does not crash. All the other unit tests pass.</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.cpp <span style="color: grey">(03ae915)</span></li>

 <li>tests/files/test.qml <span style="color: grey">(d50e737)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/118600/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>