summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2004-07-04 14:45:19 (UTC)
committer zautrix <zautrix>2004-07-04 14:45:19 (UTC)
commit2978e6b5327f619dc8e295685f46640158e1fab0 (patch) (unidiff)
tree24bf8b27df9dfe91a12c0c7319d396eee8abbf67 /microkde
parentdd549dd992f914d30c39c6c85297d689b9ac6308 (diff)
downloadkdepimpi-2978e6b5327f619dc8e295685f46640158e1fab0.zip
kdepimpi-2978e6b5327f619dc8e295685f46640158e1fab0.tar.gz
kdepimpi-2978e6b5327f619dc8e295685f46640158e1fab0.tar.bz2
Added missing initialization of iterator
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kconfig.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index b882adb..f8e362e 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -324,34 +324,35 @@ void KConfig::sync()
324 * Deletes a configuration entry group 324 * Deletes a configuration entry group
325 * 325 *
326 * If the group is not empty and bDeep is false, nothing gets 326 * If the group is not empty and bDeep is false, nothing gets
327 * deleted and false is returned. 327 * deleted and false is returned.
328 * If this group is the current group and it is deleted, the 328 * If this group is the current group and it is deleted, the
329 * current group is undefined and should be set with setGroup() 329 * current group is undefined and should be set with setGroup()
330 * before the next operation on the configuration object. 330 * before the next operation on the configuration object.
331 * 331 *
332 * @param group The name of the group 332 * @param group The name of the group
333 * returns true if we deleted at least one entry. 333 * returns true if we deleted at least one entry.
334 */ 334 */
335bool KConfig::deleteGroup( const QString& group) 335bool KConfig::deleteGroup( const QString& group)
336{ 336{
337 bool dirty = false; 337 bool dirty = false;
338 int pos; 338 int pos;
339 339
340 QMap<QString,bool>::Iterator itBool; 340 QMap<QString,bool>::Iterator itBool = mBoolMap.begin();
341 QMap<QString,bool>::Iterator delBool; 341 QMap<QString,bool>::Iterator delBool;
342
342 while ( itBool != mBoolMap.end() ) { 343 while ( itBool != mBoolMap.end() ) {
343 pos = itBool.key().find( group ); 344 pos = itBool.key().find( group );
344 if (pos == 0) { 345 if (pos == 0) {
345 delBool = itBool; 346 delBool = itBool;
346 ++itBool; 347 ++itBool;
347 mBoolMap.remove(delBool); 348 mBoolMap.remove(delBool);
348 dirty = true; 349 dirty = true;
349 } 350 }
350 351
351 } 352 }
352 /* 353 /*
353 for( itBool = mBoolMap.begin(); itBool != mBoolMap.end(); ++itBool ) 354 for( itBool = mBoolMap.begin(); itBool != mBoolMap.end(); ++itBool )
354 { 355 {
355 pos = itBool.key().find( group ); 356 pos = itBool.key().find( group );
356 if (pos == 0) { 357 if (pos == 0) {
357 mBoolMap.remove(itBool); 358 mBoolMap.remove(itBool);