QtScript bindings

Tommi Mikkonen tjm at cs.tut.fi
Mon Sep 14 21:54:01 CEST 2009

Aaron J. Seigo wrote:
> On September 14, 2009, Tommi Mikkonen wrote:
>> Having said that, what I would also like is a harmonized API; having
>> finally spend some hours tonight (after traveling in conferences for
>> some weeks!) on JS Plasmoid development with Lively content, I
>> constantly seem to have problems on the names of widget types etc.
> can you provide some concrete examples?

QFrame vs. Frame and QWebView vs. Webview is QtScriptGenerator and
Plasmoids, and at the same time QtVertical in native Qt,
QtScriptGenerator and Plasmoids. Another  issue is with types when
adding a Qt widget that has been instantiated in C++. At least 
documents that at times a QPainter etc is expected as parameter whereas
Plasma uses name Painter etc. As the error message I get is 'script
could not be initialized' or something similar when misspelling a class
name, it is very frustrating to debug API usage.

This is not a major issue, and any convention will be ok for me.
However, if we have two scripting systems --- one wirh privileges and
another without --- it will be confusing if type names etc. are
different. An additional issue is that if we have these two sets, the
restricted one should not fail without error messages if someone tests
privileged APIs but give an error message etc.

Personally, I can live with either API; both are probably fine for most
developers but there should only be one. In a perfect world, we could
have two, one for privileged apps and the other for regular ones. I am
however worried that this will complicate the view a casual developer
will get to Plasma widget development.


More information about the Plasma-devel mailing list