Bug or feature ?

Aaron J. Seigo aseigo at kde.org
Mon Apr 28 20:36:52 CEST 2008


On Monday 28 April 2008, Gilles CHAUVIN wrote:
> bool MyDataEngine::sourceRequestEvent(const QString &source)
> {
>     Q_UNUSED(source);
>     setData("foo", "key1", "value");
>     setData("foo", "key2", "value");
>     setData("foo", "key3", "value");
>     return true;
> }
>
>
> Now, if I launch plasmaengineexplorer and ask for "test" in the
> "Source Name" LineEdit, I will only see the 1st "key1->value". Typing
> anything but "test" will give the expected result.

i'm not sure if this is your problem, but there's an obvious bug in your code 
that should be fixed first. from the apidox for sourceRequestEvent:

         * The name of the data source (e.g. the source parameter passed into
         * setData) must be the same as the name passed to sourceRequestEvent
         * otherwise the requesting visualization may not receive notice of a
         * data update.

so it should either be setData(source, ...) on each of those lines, or:

if (source == "foo") {
    // your setData calls
}

if the problem still persists, please send me your engine code to look at. 
it's much easier to actually just build and test locally.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080428/2d3d0b7f/attachment.pgp 


More information about the Panel-devel mailing list