author | zautrix <zautrix> | 2005-06-08 10:34:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-08 10:34:22 (UTC) |
commit | 793d117812b4da36c9c11d90cccba347cbc6e208 (patch) (side-by-side diff) | |
tree | 5bc77e2b7a32a541c2a3b3c3d6d50f873216deef /korganizer/kolistview.cpp | |
parent | 39d84e2fc3099bd5d7596e8be5dc6783826cec01 (diff) | |
download | kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.zip kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.tar.gz kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.tar.bz2 |
changed incidence type to a faster access method
-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; |