* fix the case of empty pluginName properly

* mark containments as containments; we need to do this here because a containment may also be used as a regular applet; only the corona knows which is when

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=737028
This commit is contained in:
Aaron J. Seigo 2007-11-15 09:41:55 +00:00
parent bfcc1e31e6
commit 6aa793e6a8

View File

@ -305,7 +305,9 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg
if (pluginName.isEmpty()) { if (pluginName.isEmpty()) {
// default to the desktop containment // default to the desktop containment
pluginName = "desktop"; pluginName = "desktop";
} else if (pluginName != "null") { }
if (pluginName != "null") {
applet = Applet::loadApplet(pluginName, id, args); applet = Applet::loadApplet(pluginName, id, args);
containment = dynamic_cast<Containment*>(applet); containment = dynamic_cast<Containment*>(applet);
} }
@ -322,6 +324,8 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg
containment->setFormFactor(Plasma::Planar); containment->setFormFactor(Plasma::Planar);
} }
containment->setIsContainment(true);
if (!delayedInit) { if (!delayedInit) {
addItem(containment); addItem(containment);
containment->init(); containment->init();