summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2004-07-03 23:59:49 (UTC)
committer zautrix <zautrix>2004-07-03 23:59:49 (UTC)
commit22470ff7ffe034a94bedb52b517ee4d245ae2808 (patch) (unidiff)
tree44cbe6a45c6ebb6c5dd64fa035cd995ee3b4d463 /microkde
parent260befadfaa64d94de7d38d7f6cad0d22f52c226 (diff)
downloadkdepimpi-22470ff7ffe034a94bedb52b517ee4d245ae2808.zip
kdepimpi-22470ff7ffe034a94bedb52b517ee4d245ae2808.tar.gz
kdepimpi-22470ff7ffe034a94bedb52b517ee4d245ae2808.tar.bz2
Fixed memory access violation in distlist handling
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kconfig.cpp44
1 files changed, 41 insertions, 3 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index 3f23ed2..b882adb 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -339,4 +339,16 @@ bool KConfig::deleteGroup( const QString& group)
339 339
340 QMap<QString,bool>::Iterator itBool; 340 QMap<QString,bool>::Iterator itBool;
341 QMap<QString,bool>::Iterator delBool;
342 while ( itBool != mBoolMap.end() ) {
343 pos = itBool.key().find( group );
344 if (pos == 0) {
345 delBool = itBool;
346 ++itBool;
347 mBoolMap.remove(delBool);
348 dirty = true;
349 }
350
351 }
352 /*
341 for( itBool = mBoolMap.begin(); itBool != mBoolMap.end(); ++itBool ) 353 for( itBool = mBoolMap.begin(); itBool != mBoolMap.end(); ++itBool )
342 { 354 {
@@ -347,6 +359,19 @@ bool KConfig::deleteGroup( const QString& group)
347 } 359 }
348 } 360 }
361 */
362 QMap<QString,QString>::Iterator itString = mStringMap.begin();
363 QMap<QString,QString>::Iterator delString ;
364 while( itString != mStringMap.end() ) {
365 pos = itString.key().find( group );
366 if (pos == 0) {
367 delString = itString;
368 ++itString;
369 mStringMap.remove(delString);
370 //qDebug("delte++++++++++++++++++ ");
371 dirty = true;
372 }
349 373
350 QMap<QString,QString>::Iterator itString; 374 }
375 /* this leads to a memory access violation
351 for( itString = mStringMap.begin(); itString != mStringMap.end(); ++itString ) 376 for( itString = mStringMap.begin(); itString != mStringMap.end(); ++itString )
352 { 377 {
@@ -357,6 +382,18 @@ bool KConfig::deleteGroup( const QString& group)
357 } 382 }
358 } 383 }
359 384 */
360 QMap<QString,QDateTime>::Iterator itDateTime; 385 QMap<QString,QDateTime>::Iterator itDateTime= mDateTimeMap.begin();
386 QMap<QString,QDateTime>::Iterator delDateTime;
387 while ( itDateTime != mDateTimeMap.end() ) {
388 pos = itDateTime.key().find( group );
389 if (pos == 0) {
390 delDateTime = itDateTime;
391 ++itDateTime;
392 mDateTimeMap.remove(delDateTime);
393 dirty = true;
394 }
395
396 }
397 /*
361 for( itDateTime = mDateTimeMap.begin(); itDateTime != mDateTimeMap.end(); ++itDateTime ) 398 for( itDateTime = mDateTimeMap.begin(); itDateTime != mDateTimeMap.end(); ++itDateTime )
362 { 399 {
@@ -367,4 +404,5 @@ bool KConfig::deleteGroup( const QString& group)
367 } 404 }
368 } 405 }
406 */
369 407
370 if (dirty) 408 if (dirty)