summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/oevent.cpp10
-rw-r--r--libopie2/opiepim/oevent.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp
index b731c8a..cda12f9 100644
--- a/libopie/pim/oevent.cpp
+++ b/libopie/pim/oevent.cpp
@@ -203,33 +203,33 @@ 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}
206void OEvent::setTimeZone( const QString& tz ) { 206void OEvent::setTimeZone( const QString& tz ) {
207 changeOrModify(); 207 changeOrModify();
208 data->timezone = tz; 208 data->timezone = tz;
209} 209}
210QString OEvent::timeZone()const { 210QString 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}
214bool OEvent::match( const QRegExp& re )const { 214bool OEvent::match( const QRegExp& re )const {
215 if (data->description.contains( re ) ) 215 if ( re.match( data->description ) != -1 )
216 return true; 216 return true;
217 if ( data->note.contains( re ) ) 217 if ( re.match( data->note ) != -1 )
218 return true; 218 return true;
219 if ( data->location.contains( re ) ) 219 if ( re.match( data->location ) != -1 )
220 return true; 220 return true;
221 if ( data->start.toString().contains( re ) ) 221 if ( re.match( data->start.toString() ) != -1 )
222 return true; 222 return true;
223 if ( data->end.toString().contains( re ) ) 223 if ( re.match( data->end.toString() ) != -1 )
224 return true; 224 return true;
225 return false; 225 return false;
226} 226}
227QString OEvent::toRichText()const { 227QString OEvent::toRichText()const {
228 QString text; 228 QString text;
229 if ( !description().isEmpty() ) { 229 if ( !description().isEmpty() ) {
230 text += "<b>" + QObject::tr( "Description:") + "</b><br>"; 230 text += "<b>" + QObject::tr( "Description:") + "</b><br>";
231 text += Qtopia::escapeString(description() ). 231 text += Qtopia::escapeString(description() ).
232 replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; 232 replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
233 } 233 }
234 if ( startDateTime().isValid() ) { 234 if ( startDateTime().isValid() ) {
235 text += "<b>" + QObject::tr( "Start:") + "</b> "; 235 text += "<b>" + QObject::tr( "Start:") + "</b> ";
diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp
index b731c8a..cda12f9 100644
--- a/libopie2/opiepim/oevent.cpp
+++ b/libopie2/opiepim/oevent.cpp
@@ -203,33 +203,33 @@ 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}
206void OEvent::setTimeZone( const QString& tz ) { 206void OEvent::setTimeZone( const QString& tz ) {
207 changeOrModify(); 207 changeOrModify();
208 data->timezone = tz; 208 data->timezone = tz;
209} 209}
210QString OEvent::timeZone()const { 210QString 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}
214bool OEvent::match( const QRegExp& re )const { 214bool OEvent::match( const QRegExp& re )const {
215 if (data->description.contains( re ) ) 215 if ( re.match( data->description ) != -1 )
216 return true; 216 return true;
217 if ( data->note.contains( re ) ) 217 if ( re.match( data->note ) != -1 )
218 return true; 218 return true;
219 if ( data->location.contains( re ) ) 219 if ( re.match( data->location ) != -1 )
220 return true; 220 return true;
221 if ( data->start.toString().contains( re ) ) 221 if ( re.match( data->start.toString() ) != -1 )
222 return true; 222 return true;
223 if ( data->end.toString().contains( re ) ) 223 if ( re.match( data->end.toString() ) != -1 )
224 return true; 224 return true;
225 return false; 225 return false;
226} 226}
227QString OEvent::toRichText()const { 227QString OEvent::toRichText()const {
228 QString text; 228 QString text;
229 if ( !description().isEmpty() ) { 229 if ( !description().isEmpty() ) {
230 text += "<b>" + QObject::tr( "Description:") + "</b><br>"; 230 text += "<b>" + QObject::tr( "Description:") + "</b><br>";
231 text += Qtopia::escapeString(description() ). 231 text += Qtopia::escapeString(description() ).
232 replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; 232 replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
233 } 233 }
234 if ( startDateTime().isValid() ) { 234 if ( startDateTime().isValid() ) {
235 text += "<b>" + QObject::tr( "Start:") + "</b> "; 235 text += "<b>" + QObject::tr( "Start:") + "</b> ";