does HTTP extension work in plasma qml?

Sebastian Kügler sebas at kde.org
Tue Jul 16 12:44:01 UTC 2013


Hi Bruce,

On Tuesday, July 16, 2013 19:51:09 bruce wrote:
> i have wrote a little plasma-qml applet.i try to utilize HTTP extension from 
> plasma-javascript to retreive web resources. but plasmoid.getUrl() returned 
> undefined. in plasma-javascript works well.
> i have pasted the main.qml code into paste.kde.org, link follows:
> http://paste.kde.org/p1f0f7ab5/
> the attachment is the whole project zip file.

> i have add line X-Plasma-RequiredExtensions=LaunchApp,HTTP in this qml 
> plasmoid metadata.desktop is HTTP extension available in QML?

This is a little different in QML, you can load content from a http:// url in 
many components without this extension. We are not able to sandbox QML as we 
do with JavaScript, so our QML API, while being very similar to the JS one, is 
less restrictive.

Wether it works or not depends a little on the actual usecase, some properties 
(the image source, for example) "just work" with http (or QUrl, really).

I can't look into your code as the zip is filtered out by a virus scanner, but 
I believe this answer should help you. If not, let us know.

Cheers,
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Plasma-devel mailing list