-rw-r--r-- | microkde/kconfig.cpp | 3 |
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 | |||
@@ -316,50 +316,51 @@ void KConfig::sync() | |||
316 | f.close(); | 316 | f.close(); |
317 | 317 | ||
318 | mDirty = false; | 318 | mDirty = false; |
319 | } | 319 | } |
320 | 320 | ||
321 | 321 | ||
322 | //US I took the following deleteGroup method from a newer version from KDE. | 322 | //US I took the following deleteGroup method from a newer version from KDE. |
323 | /** | 323 | /** |
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 | */ |
335 | bool KConfig::deleteGroup( const QString& group) | 335 | bool 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); |
358 | dirty = true; | 359 | dirty = true; |
359 | } | 360 | } |
360 | } | 361 | } |
361 | */ | 362 | */ |
362 | QMap<QString,QString>::Iterator itString = mStringMap.begin(); | 363 | QMap<QString,QString>::Iterator itString = mStringMap.begin(); |
363 | QMap<QString,QString>::Iterator delString ; | 364 | QMap<QString,QString>::Iterator delString ; |
364 | while( itString != mStringMap.end() ) { | 365 | while( itString != mStringMap.end() ) { |
365 | pos = itString.key().find( group ); | 366 | pos = itString.key().find( group ); |