[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: declarative plasmoids and services
From: Alex Merry <kde () randomguy3 ! me ! uk>
Date: 2012-04-27 23:13:35
Message-ID: 4F9B281F.3070704 () randomguy3 ! me ! uk
[Download RAW message or body]
While developing the nowplaying QML plasmoid (see previous email), I ran
into problems using services where
service.startOperationCall(service.operationDescription("Play"))
would fail ("Play" takes no arguments), because startOperationCall would
get an invalid KConfigGroup (with no name).
It turned out that this was because I was storing the service in a
QtObject property, and some sort of typing information about functions
was being lost. The solution was to always call serviceForSource() at
the point where I needed to use the service.
However, the design pattern for services is to always create a new one,
so we've either got a memory leak (if they don't go away), or
setAssociatedWidget() isn't going to work (if they do).
Brief testing suggests that setAssociated[Widget/Item]() works (subject
to https://git.reviewboard.kde.org/r/104760/). That may indicate the
leak scenario, or I may have just been (un)lucky with garbage collection.
Is this something that needs to be dealt with? Perhaps in libplasma2?
Alex
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic