[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/akonadi/resources/kabc
From: Kevin Krammer <kevin.krammer () gmx ! at>
Date: 2008-08-24 18:57:12
Message-ID: 1219604232.173203.29307.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 851852 by krake:
Since the resource only synchronizes the collection tree on initial addressbook load, \
set CachePolicy to SynchOnDemand to make sure the items are retrieved once the first \
client tries to fetch them
M +7 -0 kabcresource.cpp
--- trunk/KDE/kdepim/akonadi/resources/kabc/kabcresource.cpp #851851:851852
@@ -18,6 +18,7 @@
#include "kabcresource.h"
+#include <akonadi/cachepolicy.h>
#include <akonadi/changerecorder.h>
#include <akonadi/itemfetchscope.h>
@@ -180,10 +181,15 @@
return;
}
+ CachePolicy cachePolicy;
+ cachePolicy.setInheritFromParent( false );
+ cachePolicy.setSyncOnDemand( true );
+
Collection topLevelCollection;
topLevelCollection.setParent( Collection::root() );
topLevelCollection.setRemoteId( mBaseResource->identifier() );
topLevelCollection.setName( name() );
+ topLevelCollection.setCachePolicy( cachePolicy );
QStringList mimeTypes;
mimeTypes << QLatin1String( "text/directory" );
@@ -215,6 +221,7 @@
childCollection.setParent( topLevelCollection );
childCollection.setRemoteId( subResource );
childCollection.setName( mFolderResource->subresourceLabel( subResource ) );
+ childCollection.setCachePolicy( cachePolicy );
childCollection.setContentMimeTypes( mimeTypes );
bool readOnly = !mFolderResource->subresourceWritable( subResource );
childCollection.setRights( readOnly ? readOnlyRights : readWriteRights );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic