rem: KABC::ResourceExchange *r = new KABC::ResourceExchange( url, user, password ); r->setResourceName( i18n("Exchange Server") ); m.add( r );
add: KCal::CalendarResourceManager::Iterator it; for ( it = m.begin(); it != m.end(); ++it ) { if ( (*it)->identifier() == ExchangeConfig::kcalResource() ) { KCal::ResourceExchange *r = static_cast<KCal::ResourceExchange *>( *it ); r->prefs()->setUrl( url.url() ); r->prefs()->setUser( ExchangeConfig::self()->user() ); r->prefs()->setPassword( ExchangeConfig::self()->password() ); r->setSavePolicy( KCal::ResourceCached::SaveDelayed ); r->setReloadPolicy( KCal::ResourceCached::ReloadInterval ); r->setReloadInterval( 20 ); } }
context:     void apply()    {      #if 0      KRES::Manager<KABC::Resource> m( "contact" );      m.readConfig();      KURL url( exchangeUrl() );      QString user( ExchangeConfig::self()->user() );      QString password( ExchangeConfig::self()->password() );      KABC::ResourceExchange *r = new KABC::ResourceExchange( url, user, password );      r->setResourceName( i18n("Exchange Server") );      m.add( r );      m.writeConfig();      ExchangeConfig::self()->setKabcResource( r->identifier() );      #endif    }