avoid making a copy of the config group in the loop, and switch to a mutable iterator to avoid a const_cast (which are ugly); should make krazy happier
svn path=/trunk/KDE/kdelibs/; revision=880617
This commit is contained in:
parent
98585afd6e
commit
daf6fa87b5
@ -335,7 +335,9 @@ void Containment::restoreContents(KConfigGroup &group)
|
||||
}
|
||||
qSort(appletConfigs.begin(), appletConfigs.end(), appletConfigLessThan);
|
||||
|
||||
foreach (KConfigGroup appletConfig, appletConfigs) {
|
||||
QMutableListIterator<KConfigGroup> it(appletConfigs);
|
||||
while (it.hasNext()) {
|
||||
KConfigGroup &appletConfig = it.next();
|
||||
int appId = appletConfig.name().toUInt();
|
||||
QString plugin = appletConfig.readEntry("plugin", QString());
|
||||
|
||||
@ -343,9 +345,9 @@ void Containment::restoreContents(KConfigGroup &group)
|
||||
continue;
|
||||
}
|
||||
|
||||
Applet *applet =
|
||||
d->addApplet(plugin, QVariantList(),
|
||||
appletConfig.readEntry("geometry", QRectF()), appId, true);
|
||||
Applet *applet = d->addApplet(plugin, QVariantList(),
|
||||
appletConfig.readEntry("geometry", QRectF()),
|
||||
appId, true);
|
||||
applet->restore(appletConfig);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user