Plasma::Service API addition

Alex Merry kde at randomguy3.me.uk
Fri May 11 16:29:44 UTC 2012


On 11/05/12 12:18, Aaron J. Seigo wrote:
> On Friday, May 11, 2012 11:59:59 Alex Merry wrote:
>> What's the best thing to do here?
>
> i just reviewed the change; it can go in imho. it's a short term fix, though,
> as we need to chnage this for libplasma2...

It's probably worth considering the interaction between Plasma::Service 
and declarative applets generally.  I ran into issues with keeping 
around an instance of Plasma::Service (I tried to keep it as a QtObject 
property on a QML item, which didn't work), and eventually managed to 
get it working by storing it as a variable in a separate .js file (which 
I remembered doing in another QML project of mine).

I think having a DataSource equivalent for Plasma::Service would be 
good, and allowing things like

Button {
	text: "Open"
	enabled: mprisService.commands.openUri.enabled
	onClicked: mprisService.commands.openUri({url = uriEdit.text});
}

or something along those lines.

Alex


More information about the Plasma-devel mailing list