Review Request 118493: Add support for object literals

Denis Steckelmacher steckdenis at
Tue Jun 3 09:32:43 UTC 2014

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

Review request for KDevelop.

Repository: kdev-qmljs


This patch adds support for object literals, that are now properly declared as classes. Their keys are now shown in the code-completion popup, and their uses are correctly found.


  duchain/declarationbuilder.h 5f16573 
  duchain/declarationbuilder.cpp 5d786b5 
  duchain/expressionvisitor.cpp e659fd5 
  tests/files/arrays.js 4a0d923 
  tests/files/plugins.qml 83973f1 



A new unit test ensures that the two keys hereafter are properly recognized and have one use each:

var a = {key1: "string", key2: "string"};

a.key1 = "other"; // key1 used
a.key2 = 3;       // type set to unsure(string, int)
a.|               // lists "key1" and "key2"


Denis Steckelmacher

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

More information about the KDevelop-devel mailing list