Diffstat (limited to 'core/pim/todo/otaskeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index e8e922f..1a68eb5 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp | |||
@@ -14,20 +14,27 @@ | |||
14 | OTaskEditor::OTaskEditor(int cur) | 14 | OTaskEditor::OTaskEditor(int cur) |
15 | : QDialog(0, 0, TRUE ) { | 15 | : QDialog(0, 0, TRUE ) { |
16 | init(); | 16 | init(); |
17 | OTodo to; | 17 | init( cur ); |
18 | to.setCategories( cur ); | ||
19 | load(to); | ||
20 | m_uid = 1; // generate a new one | ||
21 | } | 18 | } |
22 | OTaskEditor::OTaskEditor( const OTodo& to) | 19 | OTaskEditor::OTaskEditor( const OTodo& to) |
23 | : QDialog(0, 0, TRUE ) { | 20 | : QDialog(0, 0, TRUE ) { |
24 | init(); | 21 | init(); |
25 | load( to ); | 22 | init( to ); |
26 | m_uid = to.uid(); | ||
27 | } | 23 | } |
28 | OTaskEditor::~OTaskEditor() { | 24 | OTaskEditor::~OTaskEditor() { |
29 | 25 | ||
30 | } | 26 | } |
27 | void OTaskEditor::init( int cur ) { | ||
28 | OTodo to; | ||
29 | if ( cur != 0 ) | ||
30 | to.setCategories( cur ); | ||
31 | load(to); | ||
32 | m_uid = 1; // generate a new one | ||
33 | } | ||
34 | void OTaskEditor::init( const OTodo& to ) { | ||
35 | load( to ); | ||
36 | m_uid = to.uid(); | ||
37 | } | ||
31 | OTodo OTaskEditor::todo()const{ | 38 | OTodo OTaskEditor::todo()const{ |
32 | qWarning("saving!"); | 39 | qWarning("saving!"); |
33 | OTodo to; | 40 | OTodo to; |