Diffstat (limited to 'core/pim/todo/todotemplatemanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/todotemplatemanager.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/core/pim/todo/todotemplatemanager.cpp b/core/pim/todo/todotemplatemanager.cpp index 0b20d5a..7690d37 100644 --- a/core/pim/todo/todotemplatemanager.cpp +++ b/core/pim/todo/todotemplatemanager.cpp | |||
@@ -33,13 +33,12 @@ void TemplateManager::load() { | |||
33 | continue; | 33 | continue; |
34 | 34 | ||
35 | m_templates.insert( str, ev ); | 35 | m_templates.insert( str, ev ); |
36 | } | 36 | } |
37 | } | 37 | } |
38 | void TemplateManager::save() { | 38 | void TemplateManager::save() { |
39 | Opie::Core::owarn << "Saving!!!!" << oendl; | ||
40 | Config conf("todolist_templates"); | 39 | Config conf("todolist_templates"); |
41 | 40 | ||
42 | OPimTodoAccessXML *res = new OPimTodoAccessXML( "template", | 41 | OPimTodoAccessXML *res = new OPimTodoAccessXML( "template", |
43 | m_path ); | 42 | m_path ); |
44 | OPimTodoAccess db(res); | 43 | OPimTodoAccess db(res); |
45 | db.load(); | 44 | db.load(); |
@@ -47,21 +46,19 @@ void TemplateManager::save() { | |||
47 | 46 | ||
48 | 47 | ||
49 | QMap<QString, OPimTodo>::Iterator it; | 48 | QMap<QString, OPimTodo>::Iterator it; |
50 | for ( it = m_templates.begin(); it != m_templates.end(); ++it ) { | 49 | for ( it = m_templates.begin(); it != m_templates.end(); ++it ) { |
51 | OPimTodo ev = it.data(); | 50 | OPimTodo ev = it.data(); |
52 | conf.setGroup( QString::number( ev.uid() ) ); | 51 | conf.setGroup( QString::number( ev.uid() ) ); |
53 | Opie::Core::owarn << "Name " << it.key() << oendl; | ||
54 | conf.writeEntry("Name", it.key() ); | 52 | conf.writeEntry("Name", it.key() ); |
55 | db.add( ev ); | 53 | db.add( ev ); |
56 | } | 54 | } |
57 | db.save(); | 55 | db.save(); |
58 | } | 56 | } |
59 | void TemplateManager::addEvent( const QString& str, | 57 | void TemplateManager::addEvent( const QString& str, |
60 | const OPimTodo& ev) { | 58 | const OPimTodo& ev) { |
61 | Opie::Core::owarn << "AddEvent " << str << oendl; | ||
62 | OPimTodo todo = ev; | 59 | OPimTodo todo = ev; |
63 | if( ev.uid() == 0 ) | 60 | if( ev.uid() == 0 ) |
64 | todo.setUid(1); // generate a new uid | 61 | todo.setUid(1); // generate a new uid |
65 | 62 | ||
66 | m_templates.replace( str, todo ); | 63 | m_templates.replace( str, todo ); |
67 | } | 64 | } |