summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-06-08 10:34:22 (UTC)
committer zautrix <zautrix>2005-06-08 10:34:22 (UTC)
commit793d117812b4da36c9c11d90cccba347cbc6e208 (patch) (side-by-side diff)
tree5bc77e2b7a32a541c2a3b3c3d6d50f873216deef /korganizer/mainwindow.cpp
parent39d84e2fc3099bd5d7596e8be5dc6783826cec01 (diff)
downloadkdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.zip
kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.tar.gz
kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.tar.bz2
changed incidence type to a faster access method
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 53b65b2..481eab4 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1332,11 +1332,11 @@ void MainWindow::exportToPhone( int mode )
QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
QDateTime end = cur.addDays( ( inFuture +1 ) *7 );
while ( incidence ) {
- if ( incidence->type() != "Journal" ) {
+ if ( incidence->typeID() != journalID ) {
bool add = true;
if ( inFuture ) {
QDateTime dt;
- if ( incidence->type() == "Todo" ) {
+ if ( incidence->typeID() == todoID ) {
Todo * t = (Todo*)incidence;
if ( t->hasDueDate() )
dt = t->dtDue();
@@ -1596,7 +1596,7 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
//KGlobal::locale()->formatDateTime(nextA, true);
QString startString = "";
- if ( incidence->type() != "Todo" ) {
+ if ( incidence->typeID() != todoID ) {
if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
if ( incidence->doesFloat() ) {
startString += ": "+incidence->dtStartDateStr( true );
@@ -1634,13 +1634,13 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
enableIncidenceActions( true );
- if ( incidence->type() == "Event" ) {
+ if ( incidence->typeID() == eventID ) {
mShowAction->setText( i18n("Show Event...") );
mEditAction->setText( i18n("Edit Event...") );
mDeleteAction->setText( i18n("Delete Event...") );
mNewSubTodoAction->setEnabled( false );
- } else if ( incidence->type() == "Todo" ) {
+ } else if ( incidence->typeID() == todoID ) {
mShowAction->setText( i18n("Show Todo...") );
mEditAction->setText( i18n("Edit Todo...") );
mDeleteAction->setText( i18n("Delete Todo...") );