[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Accessing dataengine from different plasmoid
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2012-02-21 17:56:58
Message-ID: 69994418.PWSYH5SZ6s () freedom
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Tuesday, February 21, 2012 17:16:35 Simone Gaiarin wrote:
> I need some explanation on how dataengines work. I can't understand if
> the dataengine is shared among plasmoids or if every plasmoid creates
> his own dataengine that retrive info.

DataEngines are shared and read-only. Services are not shared and are read-
write.

> My purpose is: I create a plasmoid, this plasmoid require a source to
> a dataengine, this source is a pointer to a kprocess. After that I
> create more plasmoids and they should access the same source to get
> the pointer to the KProcess.

sharing pointers via DataEngines in this way is not a great idea. DataEngines 
can be accessed remotely, for instance, and then the pointer will be 
meaningless (or worse -> cause crashes)

> What I obtain when I call the dataEngine() method from a plasmoid is
> that a new instance of a dataengine is created, so I cannot see source
> requested by other plasmoid because the dataengines are distinct.

are the plasmoids running in the same process? or are you starting them in 
different processes (e.g. plasma-desktop and plasmoidviewer)?

-- 
Aaron J. Seigo
["signature.asc" (application/pgp-signature)]

_______________________________________________
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