-rw-r--r-- | libopie2/opiepim/oevent.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
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 | |||
@@ -203,34 +203,44 @@ void OEvent::setAllDay( bool allDay ) { | |||
203 | data->isAllDay = allDay; | 203 | data->isAllDay = allDay; |
204 | if (allDay ) data->timezone = "UTC"; | 204 | if (allDay ) data->timezone = "UTC"; |
205 | } | 205 | } |
206 | void OEvent::setTimeZone( const QString& tz ) { | 206 | void OEvent::setTimeZone( const QString& tz ) { |
207 | changeOrModify(); | 207 | changeOrModify(); |
208 | data->timezone = tz; | 208 | data->timezone = tz; |
209 | } | 209 | } |
210 | QString OEvent::timeZone()const { | 210 | QString OEvent::timeZone()const { |
211 | if (data->isAllDay ) return QString::fromLatin1("UTC"); | 211 | if (data->isAllDay ) return QString::fromLatin1("UTC"); |
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 { |
228 | QString text; | 238 | QString text; |
229 | if ( !description().isEmpty() ) { | 239 | if ( !description().isEmpty() ) { |
230 | text += "<b>" + QObject::tr( "Description:") + "</b><br>"; | 240 | text += "<b>" + QObject::tr( "Description:") + "</b><br>"; |
231 | text += Qtopia::escapeString(description() ). | 241 | text += Qtopia::escapeString(description() ). |
232 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; | 242 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; |
233 | } | 243 | } |
234 | if ( startDateTime().isValid() ) { | 244 | if ( startDateTime().isValid() ) { |
235 | text += "<b>" + QObject::tr( "Start:") + "</b> "; | 245 | text += "<b>" + QObject::tr( "Start:") + "</b> "; |
236 | text += Qtopia::escapeString(startDateTime().toString() ). | 246 | text += Qtopia::escapeString(startDateTime().toString() ). |