KLocale QML bindings
Marco Martin
notmart at gmail.com
Wed Jan 18 11:39:22 UTC 2012
On Saturday 14 January 2012, Giorgos Tsiapaliwkas wrote:
> Hello,
>
> me and Antonis have created a branch with the name
> "plasma/terietorANDkokeroulis/KLocaleQMLBindings" at kde-runtime.
> The branch contains the a wrapper which will be our QML bindings for
> KLocale.
>
> The bindings are not ready,we have just added the Q_PROPERTY,Q_ENUMS
> stuff and we removed all the deprecated methods.
> So,feel free to modify the code. Any notes,observations are more than
> welcome,actually we need them :) since none of us is good at QML.
thanks for working on that ;)
i taken a look on it.
it basically maps 1:1 tyhe api of klocale, and i think that's fine.
just a couple of comments:
*many q_invokables have out parameters, like translateRawFrom, i don't think
that will work
* not all types will be binded and recognized, i.e Q_INVOKABLE KCurrencyCode
*currency() const;
* i'm not sure about allowing functions that influence the bahavior, like bool
setEncoding(int mibEnum);
*every exported function or property should be tested that it actually works
* it's not a plasma thing, i think it should go in a plugin of its own
like org.kde.klocale
* the filename should be lowercase
* keeping the apidocs is fine, but all the @since lines should go
a not so nice effect would be every qml files that wishes to use it would have
to instantiate one (so one qobject more) but i don't see alternatives except
setting an instance in the global context (like it's done in Plasma theme) but
on the other hand this could be not *always* needed, so this way should be
fine
Cheers,
Marco Martin
More information about the Plasma-devel
mailing list