summaryrefslogtreecommitdiff
authorzecke <zecke>2003-02-14 18:23:40 (UTC)
committer zecke <zecke>2003-02-14 18:23:40 (UTC)
commitfc117979a54fca11e591395b130cfef307deb66f (patch) (side-by-side diff)
treec2aa7bb2e46a1506b9a8332c8e026aa04b550d2f
parent1f5bb42810965f86ae02fea7cb9df20cbe9aa22f (diff)
downloadopie-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
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todoeditor.cpp4
-rw-r--r--core/pim/todo/todotemplatemanager.cpp14
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
@@ -22,5 +22,3 @@ OTodo Editor::newTodo( int cur,
-#if defined(Q_WS_QWS) || defined(_WS_QWS_)
e->showMaximized();
-#endif
@@ -45,5 +43,3 @@ OTodo Editor::edit( QWidget *,
-#if defined(Q_WS_QWS) || defined(_WS_QWS_)
e->showMaximized();
-#endif
int ret = e->exec();
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
@@ -15,3 +15,3 @@ TemplateManager::TemplateManager() {
TemplateManager::~TemplateManager() {
-
+ save();
}
@@ -33,4 +33,3 @@ void TemplateManager::load() {
- m_templates.insert( str,
- ev );
+ m_templates.insert( str, ev );
}
@@ -38,2 +37,3 @@ void TemplateManager::load() {
void TemplateManager::save() {
+ qWarning("Saving!!!!");
Config conf("todolist_templates");
@@ -43,2 +43,4 @@ void TemplateManager::save() {
OTodoAccess db(res);
+ db.load();
+ db.clear();
@@ -58,3 +60,7 @@ void TemplateManager::addEvent( const QString& str,
qWarning("AddEvent"+ str );
- m_templates.replace( str, ev );
+ OTodo todo = ev;
+ if( ev.uid() == 0 )
+ todo.setUid(1); // generate a new uid
+
+ m_templates.replace( str, todo );
}