Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 135ca73..1508638 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -605,117 +605,117 @@ void KOEventViewer::formatAttendees(Incidence *event) } } } void KOEventViewer::appendJournal(Journal *jour, int mode ) { bool shortDate = KOPrefs::instance()->mShortDateInViewer; if (mode == 0 ) { addTag("h2",i18n("Journal from: ")); } else { if ( mode == 1 ) { addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); } else { addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); } } topLevelWidget()->setCaption("Journal Viewer"); mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); if (!jour->description().isEmpty()) { addTag("p",deTag(jour->description())); } setText(mText); } void KOEventViewer::formatReadOnly(Incidence *event) { if (event->isReadOnly()) { addTag("p","<em>(" + i18n("read-only") + ")</em>"); } } void KOEventViewer::setSyncMode( bool b ) { mSyncMode = b; } void KOEventViewer::setTodo(Todo *event, bool clearV ) { if ( clearV ) clearEvents(); if ( mSyncMode ) { if ( clearV ) appendTodo(event,1 ); else appendTodo(event,2); } else appendTodo(event); } void KOEventViewer::setJournal(Journal *event, bool clearV ) { if ( clearV ) clearEvents(); if ( mSyncMode ) { if ( clearV ) appendJournal(event, 1); else appendJournal(event, 2); } else appendJournal(event); } void KOEventViewer::setEvent(Event *event) { clearEvents(); if ( mSyncMode ) appendEvent(event, 1); else appendEvent(event); } void KOEventViewer::addEvent(Event *event) { if ( mSyncMode ) appendEvent(event, 2); else appendEvent(event); } void KOEventViewer::clearEvents(bool now) { mText = ""; if (now) setText(mText); } void KOEventViewer::addText(QString text) { mText.append(text); setText(mText); } QString KOEventViewer::deTag(QString text) { #if QT_VERSION >= 0x030000 text.replace( '<' , "<" ); text.replace( '>' , ">" ); #else - if ( text.find ('<') > 0 ) { + if ( text.find ('<') >= 0 ) { text.replace( QRegExp("<") , "<" ); } - if ( text.find ('>') > 0 ) { + if ( text.find ('>') >= 0 ) { text.replace( QRegExp(">") , ">" ); } #endif return text; } void KOEventViewer::keyPressEvent ( QKeyEvent * e ) { switch ( e->key() ) { case Qt::Key_Return: case Qt::Key_Enter : e->ignore(); break; default: QTextBrowser::keyPressEvent ( e ); break; } } |