author | zecke <zecke> | 2002-10-13 19:05:24 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-13 19:05:24 (UTC) |
commit | 34c1199becdb2f9b0447553e66c85d8f6770558f (patch) (side-by-side diff) | |
tree | 36c3bf20b6f07e643f4caef793356261f9982bd6 /libopie2/opiepim/backend/otodoaccesssql.cpp | |
parent | a469689def798954c0f571a00cc52e87d6b008ce (diff) | |
download | opie-34c1199becdb2f9b0447553e66c85d8f6770558f.zip opie-34c1199becdb2f9b0447553e66c85d8f6770558f.tar.gz opie-34c1199becdb2f9b0447553e66c85d8f6770558f.tar.bz2 |
Add a vCal Resource
Play a bit with cahce sizes
The idea is to have the current page
and the prior page cached... still looking how to do that
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccesssql.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccesssql.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libopie2/opiepim/backend/otodoaccesssql.cpp b/libopie2/opiepim/backend/otodoaccesssql.cpp index ea8b3c9..9ef6b7c 100644 --- a/libopie2/opiepim/backend/otodoaccesssql.cpp +++ b/libopie2/opiepim/backend/otodoaccesssql.cpp @@ -287,16 +287,17 @@ OTodo OTodoAccessBackendSQL::find(int uid ) const{ } +#define CACHE 32 OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints, uint cur, Frontend::CacheDirection dir ) const{ qWarning("searching for %d", uid ); - QArray<int> search( 8 ); + QArray<int> search( CACHE ); uint size =0; OTodo to; - // we try to cache 8 items + // we try to cache CACHE items switch( dir ) { /* forward */ case 0: - for (uint i = cur; i < ints.count() && size < 8; i++ ) { + for (uint i = cur; i < ints.count() && size < CACHE; i++ ) { qWarning("size %d %d", size, ints[i] ); search[size] = ints[i]; @@ -306,5 +307,5 @@ OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints, /* reverse */ case 1: - for (uint i = cur; i != 0 && size < 8; i-- ) { + for (uint i = cur; i != 0 && size < CACHE; i-- ) { search[size] = ints[i]; size++; |