author | zecke <zecke> | 2003-02-14 18:23:40 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-14 18:23:40 (UTC) |
commit | fc117979a54fca11e591395b130cfef307deb66f (patch) (unidiff) | |
tree | c2aa7bb2e46a1506b9a8332c8e026aa04b550d2f | |
parent | 1f5bb42810965f86ae02fea7cb9df20cbe9aa22f (diff) | |
download | opie-fc117979a54fca11e591395b130cfef307deb66f.zip opie-fc117979a54fca11e591395b130cfef307deb66f.tar.gz opie-fc117979a54fca11e591395b130cfef307deb66f.tar.bz2 |
Remove the #ifdef for QWS
Fix saving of templates
The backends want's to load before it saves...
Oliver now things should work again
-rw-r--r-- | core/pim/todo/todoeditor.cpp | 4 | ||||
-rw-r--r-- | core/pim/todo/todotemplatemanager.cpp | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp index 5aa7097..c204325 100644 --- a/core/pim/todo/todoeditor.cpp +++ b/core/pim/todo/todoeditor.cpp | |||
@@ -21,7 +21,5 @@ OTodo Editor::newTodo( int cur, | |||
21 | 21 | ||
22 | 22 | ||
23 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | ||
24 | e->showMaximized(); | 23 | e->showMaximized(); |
25 | #endif | ||
26 | 24 | ||
27 | int ret = e->exec(); | 25 | int ret = e->exec(); |
@@ -44,7 +42,5 @@ OTodo Editor::edit( QWidget *, | |||
44 | e->setCaption( QObject::tr( "Edit Task" ) ); | 42 | e->setCaption( QObject::tr( "Edit Task" ) ); |
45 | 43 | ||
46 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | ||
47 | e->showMaximized(); | 44 | e->showMaximized(); |
48 | #endif | ||
49 | int ret = e->exec(); | 45 | int ret = e->exec(); |
50 | 46 | ||
diff --git a/core/pim/todo/todotemplatemanager.cpp b/core/pim/todo/todotemplatemanager.cpp index 02941ac..5b83f76 100644 --- a/core/pim/todo/todotemplatemanager.cpp +++ b/core/pim/todo/todotemplatemanager.cpp | |||
@@ -14,5 +14,5 @@ TemplateManager::TemplateManager() { | |||
14 | } | 14 | } |
15 | TemplateManager::~TemplateManager() { | 15 | TemplateManager::~TemplateManager() { |
16 | 16 | save(); | |
17 | } | 17 | } |
18 | void TemplateManager::load() { | 18 | void TemplateManager::load() { |
@@ -32,9 +32,9 @@ void TemplateManager::load() { | |||
32 | continue; | 32 | continue; |
33 | 33 | ||
34 | m_templates.insert( str, | 34 | m_templates.insert( str, ev ); |
35 | ev ); | ||
36 | } | 35 | } |
37 | } | 36 | } |
38 | void TemplateManager::save() { | 37 | void TemplateManager::save() { |
38 | qWarning("Saving!!!!"); | ||
39 | Config conf("todolist_templates"); | 39 | Config conf("todolist_templates"); |
40 | 40 | ||
@@ -42,4 +42,6 @@ void TemplateManager::save() { | |||
42 | m_path ); | 42 | m_path ); |
43 | OTodoAccess db(res); | 43 | OTodoAccess db(res); |
44 | db.load(); | ||
45 | db.clear(); | ||
44 | 46 | ||
45 | 47 | ||
@@ -57,5 +59,9 @@ void TemplateManager::addEvent( const QString& str, | |||
57 | const OTodo& ev) { | 59 | const OTodo& ev) { |
58 | qWarning("AddEvent"+ str ); | 60 | qWarning("AddEvent"+ str ); |
59 | m_templates.replace( str, ev ); | 61 | OTodo todo = ev; |
62 | if( ev.uid() == 0 ) | ||
63 | todo.setUid(1); // generate a new uid | ||
64 | |||
65 | m_templates.replace( str, todo ); | ||
60 | } | 66 | } |
61 | void TemplateManager::removeEvent( const QString& str ) { | 67 | void TemplateManager::removeEvent( const QString& str ) { |