From 97a40bb7f35a8323dd99712bf014387add283177 Mon Sep 17 00:00:00 2001 From: eilers Date: Sun, 05 Sep 2004 15:46:47 +0000 Subject: Fixing really stupid caching bug.. Thanks to zecke who found it.. Removed cachefind in backend which isn't needed anymore and not a goot idea... --- (limited to 'libopie2/opiepim/backend/opimaccessbackend.h') diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h index 15a7b7f..26af762 100644 --- a/libopie2/opiepim/backend/opimaccessbackend.h +++ b/libopie2/opiepim/backend/opimaccessbackend.h @@ -93,9 +93,9 @@ public: * find the OPimRecord with uid @param uid * returns T and T.isEmpty() if nothing was found */ - virtual T find(int uid )const = 0; + virtual T find( int uid )const = 0; - virtual T find(int uid, const QArray& items, + virtual T find( int uid, const QArray& items, uint current, typename Frontend::CacheDirection ) const; /** * clear the back end @@ -131,13 +131,6 @@ protected: void cache( const T& t )const; - /** - * Returns the element with given uid out of the cache. - * Returns empty element if nothing was found. - * Attention: This just works if we have a frontend which contains the cache ! - */ - T cacheFind( int uid ) const; - /** * use a prime number here! */ @@ -173,15 +166,6 @@ void OPimAccessBackend::cache( const T& t )const { m_front->cache( t ); } -template -T OPimAccessBackend::cacheFind( int uid )const { - if ( ! m_front ){ - qWarning ( "No frontend assigned ! Therefore we cannot access the cache to return the right element!" ); - return T(); - } - - return m_front->cacheFind( uid ); -} template void OPimAccessBackend::setSaneCacheSize( int size) { @@ -191,7 +175,7 @@ void OPimAccessBackend::setSaneCacheSize( int size) { template T OPimAccessBackend::find( int uid, const QArray&, uint, typename Frontend::CacheDirection ) const{ - qDebug( "*** Lookahead feature not supported. Fallback to default find!" ); + qDebug( "*** Lookahead feature not supported. Fallback to default find!!" ); return find( uid ); } template -- cgit v0.9.0.2