예제 #1
0
void ResourceKolab::doClose()
{
  KConfig config( configFile() );
  KConfigGroup group = config.group( configGroupName );
  Kolab::ResourceMap::ConstIterator it;
  for ( it = mSubResources.constBegin(); it != mSubResources.constEnd(); ++it )
    group.writeEntry( it.key(), it.value().active() );
}
예제 #2
0
void ResourceKolab::doClose()
{
    KConfig config(configFile());
    config.setGroup(configGroupName);
    Kolab::ResourceMap::ConstIterator it;
    for(it = mSubResources.begin(); it != mSubResources.end(); ++it)
        config.writeEntry(it.key(), it.data().active());
}
예제 #3
0
bool ResourceKolab::load()
{
  // We get a fresh list of events, so clean out the old ones
  mCalendar.deleteAllEvents();
  mUidMap.clear();

  bool rc = true;
  Kolab::ResourceMap::ConstIterator itR;
  for ( itR = mSubResources.constBegin(); itR != mSubResources.constEnd(); ++itR ) {
    if ( !itR.value().active() )
      // This subResource is disabled
      continue;

    QString mimetype = inlineMimeType;
    rc &= loadSubResource( itR.key(), mimetype );
    mimetype = attachmentMimeType;
    rc &= loadSubResource( itR.key(), mimetype );
  }

  return rc;
}