From 131fb643b6ac95285503040bff6c3c5dfaff92c6 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sat, 10 Nov 2007 23:20:48 +0000 Subject: [PATCH] KRUSH: * endsWith, since it must end with; prevent possible clash with an applet with the name containment ;) * don't add containments multiple times to the scene; no harm, but it spits out warnings to the konsole svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=735125 --- corona.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/corona.cpp b/corona.cpp index c6d030275..47ce772fa 100644 --- a/corona.cpp +++ b/corona.cpp @@ -150,7 +150,7 @@ void Corona::loadApplets(const QString& configname) QHash containments; foreach (const QString& group, config.groupList()) { KConfigGroup appletConfig(&config, group); - if (group.contains("containment")) { + if (group.endsWith("containment")) { int cid = group.left(group.indexOf('-')).toUInt(); Containment *c = addContainment(appletConfig.readEntry("plugin", QString()), QVariantList(), cid, true); @@ -158,7 +158,7 @@ void Corona::loadApplets(const QString& configname) addItem(c); containments.insert(c->id(), c); c->initConstraints(&appletConfig); - //kDebug() << "Containment" << c->id() << "geometry is" << c->geometry(); + //kDebug() << "Containment" << c->id() << "geometry is" << c->geometry().toRect() << "config'd with" << appletConfig.name(); } } else { // it's an applet, let's grab the containment association @@ -197,7 +197,6 @@ void Corona::loadApplets(const QString& configname) } else { foreach (Containment* containment, d->containments) { containment->init(); - addItem(containment); foreach(Applet* applet, containment->applets()) { applet->init();