author | zautrix <zautrix> | 2005-10-22 15:51:43 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-22 15:51:43 (UTC) |
commit | c643664ae97e757afda1012dc998b49e6cc2d575 (patch) (unidiff) | |
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 | |||
@@ -122,8 +122,9 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name | |||
122 | connect ( ede,SIGNAL(setTimeTo( QTime ) ),ete , SLOT ( setTime(QTime ) ) ); | 122 | connect ( ede,SIGNAL(setTimeTo( QTime ) ),ete , SLOT ( setTime(QTime ) ) ); |
123 | sde->setDate( mTodo->runStart().date() ); | 123 | sde->setDate( mTodo->runStart().date() ); |
124 | ste->setTime( mTodo->runStart().time() ); | 124 | ste->setTime( mTodo->runStart().time() ); |
125 | ede->setDate( QDate::currentDate()); | 125 | mStop = QDateTime::currentDateTime(); |
126 | ete->setTime( QTime::currentTime() ); | 126 | ede->setDate( mStop.date()); |
127 | ete->setTime( mStop.time() ); | ||
127 | QPushButton * ok = new QPushButton( i18n("Stop and save"), this ); | 128 | QPushButton * ok = new QPushButton( i18n("Stop and save"), this ); |
128 | lay->addWidget( ok ); | 129 | lay->addWidget( ok ); |
129 | ok->setDefault( true ); | 130 | ok->setDefault( true ); |
@@ -151,6 +152,14 @@ void KOStopTodoPrefs::accept() | |||
151 | i18n("Time mismatch!")); | 152 | i18n("Time mismatch!")); |
152 | return; | 153 | return; |
153 | } | 154 | } |
155 | // restoring the seconds | ||
156 | if ( start == QDateTime( mTodo->runStart().date(), | ||
157 | QTime(mTodo->runStart().time().hour() , mTodo->runStart().time().minute() ) ) ) | ||
158 | start = mTodo->runStart(); | ||
159 | if ( stop == QDateTime( mStop.date(), | ||
160 | QTime( mStop.time().hour() , mStop.time().minute() ) ) ) | ||
161 | stop = mStop; | ||
162 | |||
154 | mTodo->saveRunningInfo( mComment->text(), start, stop ); | 163 | mTodo->saveRunningInfo( mComment->text(), start, stop ); |
155 | QDialog::accept(); | 164 | QDialog::accept(); |
156 | } | 165 | } |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 9180015..ecd0ad9 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -71,6 +71,7 @@ private slots: | |||
71 | private: | 71 | private: |
72 | Todo* mTodo; | 72 | Todo* mTodo; |
73 | QLineEdit* mComment; | 73 | QLineEdit* mComment; |
74 | QDateTime mStop; | ||
74 | KDateEdit *sde, *ede; | 75 | KDateEdit *sde, *ede; |
75 | KOTimeEdit *ste, *ete; | 76 | KOTimeEdit *ste, *ete; |
76 | 77 | ||