void KU_Users::commit() { kDebug() << "KU_Users::commit()"; for ( ModList::Iterator it = mModSucc.begin(); it != mModSucc.end(); ++it ) { replace(it.key(),*it); } for ( AddList::Iterator it = mAddSucc.begin(); it != mAddSucc.end(); ++it ) { append(*it); } for ( DelList::Iterator it = mDelSucc.begin(); it != mDelSucc.end(); ++it ) { removeAt(*it); } cancelMods(); }
void KU::KGroups::commit() { kdDebug() << "KU::KGroups::commit()" << endl; KU::KGroup *group; DelIt dit( mDelSucc ); AddIt ait( mAddSucc ); ModIt mit = mModSucc.begin(); while ( mit != mModSucc.end() ) { *(mit.key()) = mit.data(); mit++; } while ( (group = dit.current()) != 0 ) { ++dit; mGroups.remove( group ); } while ( (group = ait.current()) != 0 ) { ++ait; mGroups.append( group ); } cancelMods(); }