author | zautrix <zautrix> | 2005-10-22 15:51:43 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-22 15:51:43 (UTC) |
commit | c643664ae97e757afda1012dc998b49e6cc2d575 (patch) (side-by-side diff) | |
tree | 4af2b52729153d5d194ab46364e38dde85a0efeb | |
parent | a29a801e5500a8e5994afc317229698aeebe22e9 (diff) | |
download | kdepimpi-c643664ae97e757afda1012dc998b49e6cc2d575.zip kdepimpi-c643664ae97e757afda1012dc998b49e6cc2d575.tar.gz kdepimpi-c643664ae97e757afda1012dc998b49e6cc2d575.tar.bz2 |
second fix
-rw-r--r-- | korganizer/kotodoview.cpp | 13 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 07bfdbf..a12c43e 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -123,6 +123,7 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name sde->setDate( mTodo->runStart().date() ); ste->setTime( mTodo->runStart().time() ); - ede->setDate( QDate::currentDate()); - ete->setTime( QTime::currentTime() ); + mStop = QDateTime::currentDateTime(); + ede->setDate( mStop.date()); + ete->setTime( mStop.time() ); QPushButton * ok = new QPushButton( i18n("Stop and save"), this ); lay->addWidget( ok ); @@ -152,4 +153,12 @@ void KOStopTodoPrefs::accept() return; } + // restoring the seconds + if ( start == QDateTime( mTodo->runStart().date(), + QTime(mTodo->runStart().time().hour() , mTodo->runStart().time().minute() ) ) ) + start = mTodo->runStart(); + if ( stop == QDateTime( mStop.date(), + QTime( mStop.time().hour() , mStop.time().minute() ) ) ) + stop = mStop; + mTodo->saveRunningInfo( mComment->text(), start, stop ); QDialog::accept(); diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 9180015..ecd0ad9 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -72,4 +72,5 @@ private: Todo* mTodo; QLineEdit* mComment; + QDateTime mStop; KDateEdit *sde, *ede; KOTimeEdit *ste, *ete; |