Review Request 118600: Support QML signal declarations

Denis Steckelmacher steckdenis at
Sat Jun 7 17:49:04 UTC 2014

This is an automatically generated e-mail. To reply, visit:

(Updated June 7, 2014, 5:49 p.m.)


This change has been marked as submitted.

Review request for KDevelop.

Repository: kdev-qmljs


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.


  duchain/declarationbuilder.h 1e6c895 
  duchain/declarationbuilder.cpp 03ae915 
  duchain/tests/testcontexts.cpp 4810f9c 
  tests/files/test.qml d50e737 



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.


Denis Steckelmacher

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list