QML style guide
Marco Martin
notmart at gmail.com
Tue Oct 30 11:55:31 UTC 2012
On Tuesday 30 October 2012, Aaron J. Seigo wrote:
> this is because there is no way to influence how import lines work at
> runtime. it's a failing of QML (or, rather, of the people who implemented
> it). it makes this a bit (though not much) uglier, but more importantly
> this is also a security hole.
>
> oh, and it actually is:
>
> import "../code/foo.js"
>
> just one "../" and i don't think that's overly ugly at all.
oh, small think on that.
if it's a qml-only plasmoid (unfortunately only in that case for usual reason
of not being able to influence imports) it can/should be:
import "plasmapackage:/code/Foo.js" as Foo
in this case even if the qml file is buried deep down a device specific
folder, it will take the right one anyways
if we agree to use this when possible will add to the wiki
Cheers,
Marco Martin
More information about the Plasma-devel
mailing list