-rw-r--r-- | libopie/pim/oevent.cpp | 20 | ||||
-rw-r--r-- | libopie/pim/otodo.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/oevent.cpp | 20 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 4 |
4 files changed, 38 insertions, 10 deletions
diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp index cda12f9..2b138c0 100644 --- a/libopie/pim/oevent.cpp +++ b/libopie/pim/oevent.cpp | |||
@@ -212,16 +212,26 @@ QString OEvent::timeZone()const { | |||
212 | return data->timezone; | 212 | return data->timezone; |
213 | } | 213 | } |
214 | bool OEvent::match( const QRegExp& re )const { | 214 | bool OEvent::match( const QRegExp& re )const { |
215 | if ( re.match( data->description ) != -1 ) | 215 | if ( re.match( data->description ) != -1 ){ |
216 | setLastHitField( DatebookDescription ); | ||
216 | return true; | 217 | return true; |
217 | if ( re.match( data->note ) != -1 ) | 218 | } |
219 | if ( re.match( data->note ) != -1 ){ | ||
220 | setLastHitField( Note ); | ||
218 | return true; | 221 | return true; |
219 | if ( re.match( data->location ) != -1 ) | 222 | } |
223 | if ( re.match( data->location ) != -1 ){ | ||
224 | setLastHitField( Location ); | ||
220 | return true; | 225 | return true; |
221 | if ( re.match( data->start.toString() ) != -1 ) | 226 | } |
227 | if ( re.match( data->start.toString() ) != -1 ){ | ||
228 | setLastHitField( StartDateTime ); | ||
222 | return true; | 229 | return true; |
223 | if ( re.match( data->end.toString() ) != -1 ) | 230 | } |
231 | if ( re.match( data->end.toString() ) != -1 ){ | ||
232 | setLastHitField( EndDateTime ); | ||
224 | return true; | 233 | return true; |
234 | } | ||
225 | return false; | 235 | return false; |
226 | } | 236 | } |
227 | QString OEvent::toRichText()const { | 237 | QString OEvent::toRichText()const { |
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index a29d88e..e087a00 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp | |||
@@ -105,12 +105,16 @@ OTodo::OTodo(bool completed, int priority, | |||
105 | bool OTodo::match( const QRegExp ®Exp )const | 105 | bool OTodo::match( const QRegExp ®Exp )const |
106 | { | 106 | { |
107 | if( QString::number( data->priority ).find( regExp ) != -1 ){ | 107 | if( QString::number( data->priority ).find( regExp ) != -1 ){ |
108 | setLastHitField( Priority ); | ||
108 | return true; | 109 | return true; |
109 | }else if( data->hasDate && data->date.toString().find( regExp) != -1 ){ | 110 | }else if( data->hasDate && data->date.toString().find( regExp) != -1 ){ |
111 | setLastHitField( HasDate ); | ||
110 | return true; | 112 | return true; |
111 | }else if(data->desc.find( regExp ) != -1 ){ | 113 | }else if(data->desc.find( regExp ) != -1 ){ |
114 | setLastHitField( Description ); | ||
112 | return true; | 115 | return true; |
113 | }else if(data->sum.find( regExp ) != -1 ) { | 116 | }else if(data->sum.find( regExp ) != -1 ) { |
117 | setLastHitField( Summary ); | ||
114 | return true; | 118 | return true; |
115 | } | 119 | } |
116 | return false; | 120 | return false; |
diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp index cda12f9..2b138c0 100644 --- a/libopie2/opiepim/oevent.cpp +++ b/libopie2/opiepim/oevent.cpp | |||
@@ -212,16 +212,26 @@ QString OEvent::timeZone()const { | |||
212 | return data->timezone; | 212 | return data->timezone; |
213 | } | 213 | } |
214 | bool OEvent::match( const QRegExp& re )const { | 214 | bool OEvent::match( const QRegExp& re )const { |
215 | if ( re.match( data->description ) != -1 ) | 215 | if ( re.match( data->description ) != -1 ){ |
216 | setLastHitField( DatebookDescription ); | ||
216 | return true; | 217 | return true; |
217 | if ( re.match( data->note ) != -1 ) | 218 | } |
219 | if ( re.match( data->note ) != -1 ){ | ||
220 | setLastHitField( Note ); | ||
218 | return true; | 221 | return true; |
219 | if ( re.match( data->location ) != -1 ) | 222 | } |
223 | if ( re.match( data->location ) != -1 ){ | ||
224 | setLastHitField( Location ); | ||
220 | return true; | 225 | return true; |
221 | if ( re.match( data->start.toString() ) != -1 ) | 226 | } |
227 | if ( re.match( data->start.toString() ) != -1 ){ | ||
228 | setLastHitField( StartDateTime ); | ||
222 | return true; | 229 | return true; |
223 | if ( re.match( data->end.toString() ) != -1 ) | 230 | } |
231 | if ( re.match( data->end.toString() ) != -1 ){ | ||
232 | setLastHitField( EndDateTime ); | ||
224 | return true; | 233 | return true; |
234 | } | ||
225 | return false; | 235 | return false; |
226 | } | 236 | } |
227 | QString OEvent::toRichText()const { | 237 | QString OEvent::toRichText()const { |
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index a29d88e..e087a00 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp | |||
@@ -105,12 +105,16 @@ OTodo::OTodo(bool completed, int priority, | |||
105 | bool OTodo::match( const QRegExp ®Exp )const | 105 | bool OTodo::match( const QRegExp ®Exp )const |
106 | { | 106 | { |
107 | if( QString::number( data->priority ).find( regExp ) != -1 ){ | 107 | if( QString::number( data->priority ).find( regExp ) != -1 ){ |
108 | setLastHitField( Priority ); | ||
108 | return true; | 109 | return true; |
109 | }else if( data->hasDate && data->date.toString().find( regExp) != -1 ){ | 110 | }else if( data->hasDate && data->date.toString().find( regExp) != -1 ){ |
111 | setLastHitField( HasDate ); | ||
110 | return true; | 112 | return true; |
111 | }else if(data->desc.find( regExp ) != -1 ){ | 113 | }else if(data->desc.find( regExp ) != -1 ){ |
114 | setLastHitField( Description ); | ||
112 | return true; | 115 | return true; |
113 | }else if(data->sum.find( regExp ) != -1 ) { | 116 | }else if(data->sum.find( regExp ) != -1 ) { |
117 | setLastHitField( Summary ); | ||
114 | return true; | 118 | return true; |
115 | } | 119 | } |
116 | return false; | 120 | return false; |