summaryrefslogtreecommitdiff
path: root/libopie2
Unidiff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ChangeLog1
-rw-r--r--libopie2/opiepim/backend/opimaccessbackend.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiepim/ChangeLog b/libopie2/opiepim/ChangeLog
index a1b4db0..84517fb 100644
--- a/libopie2/opiepim/ChangeLog
+++ b/libopie2/opiepim/ChangeLog
@@ -1,26 +1,27 @@
12005-03.19 Stefan Eilers <stefan@eilers-online.net> 12005-03.19 Stefan Eilers <stefan@eilers-online.net>
2 * Minor update for sorted(). Now ignoring any category search if "DoNotShowWithCategory" filter is activated. 2 * Minor update for sorted(). Now ignoring any category search if "DoNotShowWithCategory" filter is activated.
3 * Fixing uninitialized member variable, caused crash of backend
32005-03-18 Stefan Eilers <stefan@eilers-online.net> 42005-03-18 Stefan Eilers <stefan@eilers-online.net>
4 * Rewrote generic sorted filter and added filter for "DoNotShowWithCategory", needed by addressbook (other filters need to be added!) 5 * Rewrote generic sorted filter and added filter for "DoNotShowWithCategory", needed by addressbook (other filters need to be added!)
52005-01-16 Stefan Eilers <stefan@eilers-online.net> 62005-01-16 Stefan Eilers <stefan@eilers-online.net>
6 * Added new OPimEventSortVector class, improved OPimSortVector 7 * Added new OPimEventSortVector class, improved OPimSortVector
7 * OPimAccessBackend now supports generic sorting. 8 * OPimAccessBackend now supports generic sorting.
82005-01-03 Stefan Eilers <stefan@eilers-online.net> 92005-01-03 Stefan Eilers <stefan@eilers-online.net>
9 * Fixing bug in API documentation 10 * Fixing bug in API documentation
10 * Moving hasQuerySettings() and querySettings() to OPimAccessTemplate to be available for all frontends 11 * Moving hasQuerySettings() and querySettings() to OPimAccessTemplate to be available for all frontends
112004-12-28 Stefan Eilers <stefan@eilers-online.net> 122004-12-28 Stefan Eilers <stefan@eilers-online.net>
12 * Make improved query by example accessable via frontend 13 * Make improved query by example accessable via frontend
13 * Some API documentation improvement 14 * Some API documentation improvement
14 * Cleanup of backend api.. 15 * Cleanup of backend api..
15 * Fixing bug #1501 16 * Fixing bug #1501
162004-11-23 Stefan Eilers <stefan@eilers-online.net> 172004-11-23 Stefan Eilers <stefan@eilers-online.net>
17 * Implement fast and full featured version of sorted() for addressbook 18 * Implement fast and full featured version of sorted() for addressbook
18 * Implement generic queryByExample for all Addressboook backends. It allows incremental search. 19 * Implement generic queryByExample for all Addressboook backends. It allows incremental search.
19 * Update of API Documentation 20 * Update of API Documentation
202004-11-18 Holger Freyther <freyther@handhelds.org> 212004-11-18 Holger Freyther <freyther@handhelds.org>
21 * Every Access can give a set of Occurrences for a period or a datetime 22 * Every Access can give a set of Occurrences for a period or a datetime
22 * QueryByExample, Find, Sort can be generically accessed by OPimBase 23 * QueryByExample, Find, Sort can be generically accessed by OPimBase
23 pointer interface 24 pointer interface
24 * OPimBackendOccurrence gets split up to OPimOccurrences by 25 * OPimBackendOccurrence gets split up to OPimOccurrences by
25 OPimTemplateBase 26 OPimTemplateBase
26 * Add safeCast to various OPimRecords 27 * Add safeCast to various OPimRecords
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h
index 6666fd6..71f81f4 100644
--- a/libopie2/opiepim/backend/opimaccessbackend.h
+++ b/libopie2/opiepim/backend/opimaccessbackend.h
@@ -121,48 +121,49 @@ public:
121 * set the read ahead count 121 * set the read ahead count
122 */ 122 */
123 void setReadAhead( uint count ); 123 void setReadAhead( uint count );
124protected: 124protected:
125 //@{ 125 //@{
126 int access()const; 126 int access()const;
127 void cache( const T& t )const; 127 void cache( const T& t )const;
128 void setSaneCacheSize( int ); 128 void setSaneCacheSize( int );
129 uint readAhead()const; 129 uint readAhead()const;
130 //@} 130 //@}
131 131
132private: 132private:
133 OPimAccessBackendPrivate *d; 133 OPimAccessBackendPrivate *d;
134 Frontend* m_front; 134 Frontend* m_front;
135 uint m_read; 135 uint m_read;
136 int m_acc; 136 int m_acc;
137 137
138}; 138};
139 139
140template <class T> 140template <class T>
141OPimAccessBackend<T>::OPimAccessBackend(int acc) 141OPimAccessBackend<T>::OPimAccessBackend(int acc)
142 : m_acc( acc ) 142 : m_acc( acc )
143{ 143{
144 m_front = 0l; 144 m_front = 0l;
145 m_read = 20;
145} 146}
146template <class T> 147template <class T>
147OPimAccessBackend<T>::~OPimAccessBackend() { 148OPimAccessBackend<T>::~OPimAccessBackend() {
148 149
149} 150}
150 151
151/* 152/*
152 * Slow but default matchRegexp Implementation 153 * Slow but default matchRegexp Implementation
153 * Create a Big Enough QArray and then iterate 154 * Create a Big Enough QArray and then iterate
154 * over all Records and matchRegexp them. 155 * over all Records and matchRegexp them.
155 * At the end we will resize the array to the actual 156 * At the end we will resize the array to the actual
156 * number of items 157 * number of items
157 */ 158 */
158template <class T> 159template <class T>
159UIDArray OPimAccessBackend<T>::matchRegexp( const QRegExp& reg )const { 160UIDArray OPimAccessBackend<T>::matchRegexp( const QRegExp& reg )const {
160 UIDArray all_rec = allRecords(); 161 UIDArray all_rec = allRecords();
161 UIDArray result( all_rec.count() ); 162 UIDArray result( all_rec.count() );
162 uint used_records = 0, all_rec_count = all_rec.count(); 163 uint used_records = 0, all_rec_count = all_rec.count();
163 164
164 for ( uint i = 0; i < all_rec_count; ++i ) 165 for ( uint i = 0; i < all_rec_count; ++i )
165 if (find( all_rec[i], all_rec, i, Frontend::Forward ).match( reg ) ) 166 if (find( all_rec[i], all_rec, i, Frontend::Forward ).match( reg ) )
166 result[used_records++] = all_rec[i]; 167 result[used_records++] = all_rec[i];
167 168
168 /* shrink to fit */ 169 /* shrink to fit */