summaryrefslogtreecommitdiff
path: root/libopie/pim/opimaccesstemplate.h
Unidiff
Diffstat (limited to 'libopie/pim/opimaccesstemplate.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/opimaccesstemplate.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/libopie/pim/opimaccesstemplate.h b/libopie/pim/opimaccesstemplate.h
index 92d7192..a0d8f63 100644
--- a/libopie/pim/opimaccesstemplate.h
+++ b/libopie/pim/opimaccesstemplate.h
@@ -175,30 +175,28 @@ T OPimAccessTemplate<T>::find( int uid ) const{
175 return t; 175 return t;
176} 176}
177template <class T> 177template <class T>
178T OPimAccessTemplate<T>::find( int uid, const QArray<int>& ar, 178T OPimAccessTemplate<T>::find( int uid, const QArray<int>& ar,
179 uint current, CacheDirection dir )const { 179 uint current, CacheDirection dir )const {
180 /* 180 /*
181 * better do T.isEmpty() 181 * better do T.isEmpty()
182 * after a find this way we would 182 * after a find this way we would
183 * avoid two finds in QCache... 183 * avoid two finds in QCache...
184 */ 184 */
185 // qWarning("find it now %d", uid ); 185 // qWarning("find it now %d", uid );
186 if (m_cache.contains( uid ) ) { 186 if (m_cache.contains( uid ) ) {
187 qWarning("m cache contains %d", uid);
188 return m_cache.find( uid ); 187 return m_cache.find( uid );
189 } 188 }
190 189
191 T t = m_backEnd->find( uid, ar, current, dir ); 190 T t = m_backEnd->find( uid, ar, current, dir );
192 qWarning("found it and cache it now %d", uid);
193 cache( t ); 191 cache( t );
194 return t; 192 return t;
195} 193}
196template <class T> 194template <class T>
197void OPimAccessTemplate<T>::clear() { 195void OPimAccessTemplate<T>::clear() {
198 invalidateCache(); 196 invalidateCache();
199 m_backEnd->clear(); 197 m_backEnd->clear();
200} 198}
201template <class T> 199template <class T>
202bool OPimAccessTemplate<T>::add( const T& t ) { 200bool OPimAccessTemplate<T>::add( const T& t ) {
203 cache( t ); 201 cache( t );
204 return m_backEnd->add( t ); 202 return m_backEnd->add( t );