summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp13
-rw-r--r--korganizer/kotodoview.h1
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
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 );
@@ -152,4 +153,12 @@ void KOStopTodoPrefs::accept()
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();
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:
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;