[Qt-qml] Static analysis for QML

Christian Kamm christian.d.kamm at nokia.com
Wed Nov 24 13:49:18 CET 2010


On Wednesday 24 November 2010 12:04:56 ext Gregory Schlomoff wrote:
> Hello,
> 
> One of the main problems that I have with QML, and that actually is
> directly linked to what makes it awesome, is the fact that you won't
> have any compile-time error when you change property names / slots /
> etc... in C++.
> 
> So I was wondering, would it be possible, from a technical point of
> view (not a product manager / roadmap POV), to have some kind of
> static analysis tool that could tell at compile time that some signal
> / slots names have changed ?

Yes, it's possible - and something we want to have in Qt Creator. 

In fact, for types defined in a QML plugin, Creator will often already be able 
to offer code completion and error reporting. What the static analysis can't do 
yet is get the types right when you embed QML in a C++ application and expose 
some random objects (say using setContextProperty).

It's under investigation though.

Cheers,
Christian



More information about the Qt-qml mailing list