[Panel-devel] Plasmoids with a missing engine

Aaron J. Seigo aseigo at kde.org
Wed Jul 11 04:51:07 CEST 2007


On Tuesday 10 July 2007, Alex Merry wrote:
> What a plasmoids supposed to do when the engine they need doesn't exist?
> In this case dataEngine("foo") will return 0.  

DataEngineManager::loadDataEngine always returns a valid pointer so that bit 
of code in Applet::dataEngine will never get reached. the code in Applet was 
written prior to that change and so now is a bit odd 

> At the moment, the way 
> most of the plasmoids are written will mean that they will try
> dereferencing a null pointer, which causes plasma to crash.

due to the above, this isn't so.

> For example, if the syndication library doesn't exist, the cia.vs
> plasmoid gets built and installed, but not the data engine (when you
> run cmakekde in playground/base/plasma). 

have you actually tried this?

> There could be a field in the desktop files for this.
> X-KDE-PluginInfo-RequiredEngines?  That way if plasma encountered a
> plasmoid with a missing engine listed, it could leave it out of the
> list, and print a message to the console explaining why it has done so.

this could be interesting, however it would fail in a couple of situations:

1) where an engine is optional, meaning the applet should still load and run 
even if that particular engine isn't available
2) when the .desktop file falls out of sync with the applet, which 
unfortunately tends to happen ime

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

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070710/becf7192/attachment.pgp 


More information about the Panel-devel mailing list