Diffstat (limited to 'core/pim/todo/otaskeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index 84f854f..1ed20b4 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp @@ -1,5 +1,2 @@ -#include <qdatetime.h> -#include <qlabel.h> #include <qlayout.h> -#include <qmultilineedit.h> @@ -28,2 +25,3 @@ void OTaskEditor::init( int cur ) { OTodo to; + to.setUid( 1 ); // generate a new uid if ( cur != 0 ) @@ -31,3 +29,2 @@ void OTaskEditor::init( int cur ) { load(to); - m_uid = 1; // generate a new one } @@ -35,3 +32,2 @@ void OTaskEditor::init( const OTodo& to ) { load( to ); - m_uid = to.uid(); } @@ -39,4 +35,3 @@ OTodo OTaskEditor::todo()const{ qWarning("saving!"); - OTodo to; - to.setUid(m_uid ); + OTodo to ( m_todo ); m_overView->save( to ); @@ -52,7 +47,8 @@ void OTaskEditor::load(const OTodo& to) { m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); - m_alarm->setEnabled( !to.hasRecurrence() ); m_alarm->load( to ); + + m_todo = to; } void OTaskEditor::init() { - setCaption("Task Editor"); + setCaption(tr("Task Editor") ); |