Plasma::Service in plasma2

Marco Martin notmart at gmail.com
Thu May 2 13:53:28 UTC 2013


Hi all,
following the last monday api review i started to port Service to QVariantMap, 
in the branch qvariantmapservice in plasma-framework

ie now you do from c++
QVariantMap op = storage.operationDescription("retrieve");
op["group"] = "Test";
Plasma::ServiceJob *job = storage.startOperationCall(op);

instead op being a KConfigGroup.
In QML the api is exactly the same (and this actually fixes it for qml, where 
kconfiggroup couldn't work in qml2 anymore)

the branch now works correctly (the storage test passes) there are two 
problems still tough:

* the operation description always has an "hidden" key "_name", because is 
needed in Service::startOperationCall (the operation name was before in 
KConfigGroup::name())  yhis is not really clean.

* It may require Plasma::DataEngine::Data back to a QVariantMap as in Plasma1 
(with all performance issues it means), besides this would be needed for qml 
to directly read DataEngine::Data, the storage service, that is always 
available for use from anywhere in qml, it saves and restores Data instances, 
so QVariantHash, that is not currently usable from QML

Cheers,
Marco Martin


More information about the Plasma-devel mailing list