Review Request 118918: Support QML built-in types (rect, point, Font, etc)

Denis Steckelmacher steckdenis at yahoo.fr
Tue Jun 24 13:46:49 UTC 2014


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

Review request for KDevelop.


Repository: kdev-qmljs


Description
-------

The QML language contains several built-in types, listed on this page: http://qt-project.org/doc/qt-5/qtqml-typesystem-basictypes.html. These types are not declared inside any module, so this patch adds a "built-in" module that declares these types.

Because most of the QML built-in types also exist in a C++ version (rect = QRect, Font = QFont, etc), this patch also adds a small translation layer between the C++ type names and the QML type names. This way, QML modules (that use the C++ names) can declares properties that will end up having the right type. A property declared of type "QRect" will have the type "rect", and all the attributes expected by the user.


Diffs
-----

  qmlplugins/builtins_1.0.qml PRE-CREATION 
  tests/files/test.qml a36cfdb 
  qmlplugins/QtQuick_2.0.qml 6d20f7a 
  qmlplugins/QtQuick_1.0.qml 50c08b9 
  codecompletion/tests/qmlcompletiontest.cpp e129b09 
  duchain/declarationbuilder.cpp aab8aeb 

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


Testing
-------

A new code-completion unit test has been added. It ensures that typing "font." in a QML component having a font property of type Font displays the properties of QFont. The unit tests don't test all the type names and all the attributes of the types (it would be huge), but Font is the most interesting type.


Thanks,

Denis Steckelmacher

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140624/69cff312/attachment.html>


More information about the KDevelop-devel mailing list