-rw-r--r-- | korganizer/kolistview.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 7022e02..be51694 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -400,8 +400,8 @@ void KOListView::setAlarm() while ( qitem ) { if ( qitem->isSelected() ) { Incidence* inc = ((KOListViewItem *) qitem)->data(); - if ( inc->type() != "Journal" ) { - if ( inc->type() == "Todo" ) { + if ( inc->typeID() != journalID ) { + if ( inc->typeID() == todoID ) { if ( ((Todo*)inc)->hasDueDate() ) sel.append(((KOListViewItem *)qitem)); } else @@ -488,7 +488,7 @@ void KOListView::setCategories( bool removeOld ) if( item ) { Incidence* inc = item->data() ; bool setSub = false; - if( inc->type() == "Todo" && sel.count() == 1 && inc->relations().count() > 0 ) { + if( inc->typeID() == todoID && sel.count() == 1 && inc->relations().count() > 0 ) { int result = KMessageBox::warningYesNoCancel(this, i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), i18n("Todo has subtodos"), @@ -611,7 +611,7 @@ void KOListView::saveDescriptionToFile() Incidence *incidence = delSel.first(); icount = 0; while ( incidence ) { - if ( incidence->type() == "Journal" ) { + if ( incidence->typeID() == journalID ) { text += "\n************************************\n"; text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); @@ -621,7 +621,7 @@ void KOListView::saveDescriptionToFile() } else { if ( !incidence->description().isEmpty() ) { text += "\n************************************\n"; - if ( incidence->type() == "Todo" ) + if ( incidence->typeID() == todoID ) text += i18n("To-Do: "); text += incidence->summary(); if ( incidence->hasStartDate() ) @@ -669,7 +669,7 @@ void KOListView::writeToFile( bool iCal ) while ( item ) { if ( item->isSelected() ) { if ( !journal ) - if ( ((KOListViewItem *)item)->data()->type() == "Journal") + if ( ((KOListViewItem *)item)->data()->typeID() == journalID ) journal = true; delSel.append(((KOListViewItem *)item)->data()); ++icount; |