author | zautrix <zautrix> | 2005-01-29 15:23:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-29 15:23:10 (UTC) |
commit | c6548bb194a5e73b9b72505c2e952ef6346dec46 (patch) (side-by-side diff) | |
tree | 74039fb5cd5f1a64f6a7844c9ece030e6d76de87 /korganizer/koeditorgeneraltodo.cpp | |
parent | f542fb5846520683e6241a522921e3d5eb24b833 (diff) | |
download | kdepimpi-c6548bb194a5e73b9b72505c2e952ef6346dec46.zip kdepimpi-c6548bb194a5e73b9b72505c2e952ef6346dec46.tar.gz kdepimpi-c6548bb194a5e73b9b72505c2e952ef6346dec46.tar.bz2 |
todo
Diffstat (limited to 'korganizer/koeditorgeneraltodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index 158a7d3..b9a028b 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp @@ -192,26 +192,31 @@ void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay) } else { mTimeButton->setEnabled(false); } enableTimeEdits( !allDay ); - - mDueCheck->setChecked(false); - enableDueEdit(false); + if ( due.isValid() ) { + mDueCheck->setChecked(true); + enableDueEdit(true); + } else { + mDueCheck->setChecked(false); + enableDueEdit(false); + due = QDateTime::currentDateTime().addDays(7); + } alarmDisable(true); mStartCheck->setChecked(false); enableStartEdit(false); mDueDateEdit->setDate(due.date()); mDueTimeEdit->setTime(due.time()); - - mStartDateEdit->setDate(QDate::currentDate()); - mStartTimeEdit->setTime(QTime::currentTime()); + due = due.addDays(-7); + mStartDateEdit->setDate(due.date()); + mStartTimeEdit->setTime(due.time()); mPriorityCombo->setCurrentItem(2); mCompletedLabel->setText(i18n("completed"));; mCompletedCombo->setCurrentItem(0); } |