summaryrefslogtreecommitdiffabout
path: root/libkcal/kincidenceformatter.cpp
Unidiff
Diffstat (limited to 'libkcal/kincidenceformatter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/kincidenceformatter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 57a9ede..e506a96 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -337,57 +337,57 @@ void KIncidenceFormatter::formatAttendees(Incidence *event)
337 mText.append(a->email()); 337 mText.append(a->email());
338 mText += "\n"; 338 mText += "\n";
339 } 339 }
340 } else { 340 } else {
341 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 341 mText += "<li><a href=\"uid:" + a->uid() + "\">";
342 if (!a->name().isEmpty()) mText += a->name(); 342 if (!a->name().isEmpty()) mText += a->name();
343 else mText += a->email(); 343 else mText += a->email();
344 mText += "</a>\n"; 344 mText += "</a>\n";
345 } 345 }
346#else 346#else
347 //qDebug("nokabc "); 347 //qDebug("nokabc ");
348 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 348 mText += "<li><a href=\"uid:" + a->uid() + "\">";
349 if (!a->name().isEmpty()) mText += a->name(); 349 if (!a->name().isEmpty()) mText += a->name();
350 else mText += a->email(); 350 else mText += a->email();
351 mText += "</a>\n"; 351 mText += "</a>\n";
352#endif 352#endif
353 353
354 if (!a->email().isEmpty()) { 354 if (!a->email().isEmpty()) {
355 if (iconPath) { 355 if (iconPath) {
356 mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; 356 mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">";
357 if ( a->RSVP() ) 357 if ( a->RSVP() )
358 mText += "<IMG src=\"" + iconPath + "\">"; 358 mText += "<IMG src=\"" + iconPath + "\">";
359 else 359 else
360 mText += "<IMG src=\"" + NOiconPath + "\">"; 360 mText += "<IMG src=\"" + NOiconPath + "\">";
361 mText += "</a>\n"; 361 mText += "</a>\n";
362 } 362 }
363 } 363 }
364 if (a->status() != Attendee::NeedsAction ) 364 if (a->status() != Attendee::NeedsAction )
365 mText +="[" + a->statusStr() + "] "; 365 mText +="[" + a->statusStr() + "] ";
366 if (a->role() == Attendee::Chair ) 366 if (a->role() == Attendee::Chair )
367 mText +="(" + a->roleStr().left(1) + ".)"; 367 mText +="(" + a->roleStr().left(1) + ".)";
368 } 368 }
369 mText.append("</li></ul>"); 369 mText.append("</li></ul>");
370 } 370 }
371} 371}
372 372
373void KIncidenceFormatter::formatReadOnly(Incidence *event) 373void KIncidenceFormatter::formatReadOnly(Incidence *event)
374{ 374{
375 if (event->isReadOnly()) { 375 if (event->isReadOnly()) {
376 addTag("p","<em>(" + i18n("read-only") + ")</em>"); 376 addTag("p","<em>(" + i18n("read-only") + ")</em>");
377 } 377 }
378} 378}
379QString KIncidenceFormatter::deTag(QString text) 379QString KIncidenceFormatter::deTag(QString text)
380{ 380{
381#if QT_VERSION >= 0x030000 381#if QT_VERSION >= 0x030000
382 text.replace( '<' , "&lt;" ); 382 text.replace( '<' , "&lt;" );
383 text.replace( '>' , "&gt;" ); 383 text.replace( '>' , "&gt;" );
384#else 384#else
385 if ( text.find ('<') > 0 ) { 385 if ( text.find ('<') >= 0 ) {
386 text.replace( QRegExp("<") , "&lt;" ); 386 text.replace( QRegExp("<") , "&lt;" );
387 } 387 }
388 if ( text.find ('>') > 0 ) { 388 if ( text.find ('>') >= 0 ) {
389 text.replace( QRegExp(">") , "&gt;" ); 389 text.replace( QRegExp(">") , "&gt;" );
390 } 390 }
391#endif 391#endif
392 return text; 392 return text;
393} 393}