Review Request 118493: Add support for object literals

Denis Steckelmacher steckdenis at yahoo.fr
Tue Jun 3 10:51:04 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118493/
-----------------------------------------------------------

(Updated June 3, 2014, 10:51 a.m.)


Status
------

This change has been marked as submitted.


Review request for KDevelop.


Repository: kdev-qmljs


Description
-------

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.


Diffs
-----

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

Diff: https://git.reviewboard.kde.org/r/118493/diff/


Testing
-------

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"


Thanks,

Denis Steckelmacher

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140603/3394af12/attachment.html>


More information about the KDevelop-devel mailing list