summaryrefslogtreecommitdiff
path: root/libopie/pim/otodoaccesssql.cpp
authorzecke <zecke>2002-10-13 19:05:24 (UTC)
committer zecke <zecke>2002-10-13 19:05:24 (UTC)
commit34c1199becdb2f9b0447553e66c85d8f6770558f (patch) (side-by-side diff)
tree36c3bf20b6f07e643f4caef793356261f9982bd6 /libopie/pim/otodoaccesssql.cpp
parenta469689def798954c0f571a00cc52e87d6b008ce (diff)
downloadopie-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 'libopie/pim/otodoaccesssql.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/otodoaccesssql.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libopie/pim/otodoaccesssql.cpp b/libopie/pim/otodoaccesssql.cpp
index ea8b3c9..9ef6b7c 100644
--- a/libopie/pim/otodoaccesssql.cpp
+++ b/libopie/pim/otodoaccesssql.cpp
@@ -288,2 +288,3 @@ OTodo OTodoAccessBackendSQL::find(int uid ) const{
}
+#define CACHE 32
OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
@@ -291,3 +292,3 @@ OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
qWarning("searching for %d", uid );
- QArray<int> search( 8 );
+ QArray<int> search( CACHE );
uint size =0;
@@ -295,3 +296,3 @@ OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
- // we try to cache 8 items
+ // we try to cache CACHE items
switch( dir ) {
@@ -299,3 +300,3 @@ OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
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] );
@@ -307,3 +308,3 @@ OTodo OTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
case 1:
- for (uint i = cur; i != 0 && size < 8; i-- ) {
+ for (uint i = cur; i != 0 && size < CACHE; i-- ) {
search[size] = ints[i];