Review Request 117612: Make ExpressionVisitor inherit from DynamicLanguageExpressionVisitor

Denis Steckelmacher steckdenis at
Thu Apr 17 19:24:58 UTC 2014

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

(Updated April 17, 2014, 7:24 p.m.)


This change has been marked as submitted.

Review request for KDevelop.

Repository: kdev-qmljs


Sven Brauch has just added a DynamicLanguageExpressionVisitor class in KDevPlatform. This class contains several useful methods for dynamic language expression visitors, such as everything needed to keep track of the current type and current declaration, and also a method that can be used to build a mixed integral type (very nice addition!)

This patch makes ExpressionVisitor inherit from DynamicLanguageExpressionVisitor. The patch is fairly simple as it removes one setType() method and changes every use of setType to encounter(). I also had to change QmlJS::findDeclaration, as it took a DUContextPointer parameter. The problem was that the constructor of DUContextPointer requires a DUContext*, while DynamicLanguageExpressionVisitor only provides a const DUContext*.


  duchain/expressionvisitor.h bd82ff2 
  duchain/expressionvisitor.cpp a7e0ba6 
  duchain/helper.h 23a6d0e 
  duchain/helper.cpp 935ccd8 
  duchain/usebuilder.cpp 154a4d3 



All the existing unit tests pass with the simplified expression visitor.


Denis Steckelmacher

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

More information about the KDevelop-devel mailing list