Diffstat (limited to 'core/pim/todo/todotemplatemanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/todotemplatemanager.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/core/pim/todo/todotemplatemanager.cpp b/core/pim/todo/todotemplatemanager.cpp index 5b83f76..eeac51b 100644 --- a/core/pim/todo/todotemplatemanager.cpp +++ b/core/pim/todo/todotemplatemanager.cpp | |||
@@ -1 +1,4 @@ | |||
1 | #include <opie2/otodoaccess.h> | ||
2 | #include <opie2/otodoaccessxml.h> | ||
3 | |||
1 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
@@ -3,5 +6,2 @@ | |||
3 | 6 | ||
4 | #include <opie/otodoaccess.h> | ||
5 | #include <opie/otodoaccessxml.h> | ||
6 | |||
7 | #include "todotemplatemanager.h" | 7 | #include "todotemplatemanager.h" |
@@ -19,11 +19,11 @@ void TemplateManager::load() { | |||
19 | Config conf("todolist_templates"); | 19 | Config conf("todolist_templates"); |
20 | OTodoAccessXML *xml = new OTodoAccessXML( QString::fromLatin1("template"), | 20 | OPimTodoAccessXML *xml = new OPimTodoAccessXML( QString::fromLatin1("template"), |
21 | m_path ); | 21 | m_path ); |
22 | OTodoAccess todoDB(xml ); | 22 | OPimTodoAccess todoDB(xml ); |
23 | todoDB.load(); | 23 | todoDB.load(); |
24 | 24 | ||
25 | OTodoAccess::List::Iterator it; | 25 | OPimTodoAccess::List::Iterator it; |
26 | OTodoAccess::List list = todoDB.allRecords(); | 26 | OPimTodoAccess::List list = todoDB.allRecords(); |
27 | for ( it = list.begin(); it != list.end(); ++it ) { | 27 | for ( it = list.begin(); it != list.end(); ++it ) { |
28 | OTodo ev = (*it); | 28 | OPimTodo ev = (*it); |
29 | conf.setGroup( QString::number( ev.uid() ) ); | 29 | conf.setGroup( QString::number( ev.uid() ) ); |
@@ -40,5 +40,5 @@ void TemplateManager::save() { | |||
40 | 40 | ||
41 | OTodoAccessXML *res = new OTodoAccessXML( "template", | 41 | OPimTodoAccessXML *res = new OPimTodoAccessXML( "template", |
42 | m_path ); | 42 | m_path ); |
43 | OTodoAccess db(res); | 43 | OPimTodoAccess db(res); |
44 | db.load(); | 44 | db.load(); |
@@ -47,5 +47,5 @@ void TemplateManager::save() { | |||
47 | 47 | ||
48 | QMap<QString, OTodo>::Iterator it; | 48 | QMap<QString, OPimTodo>::Iterator it; |
49 | for ( it = m_templates.begin(); it != m_templates.end(); ++it ) { | 49 | for ( it = m_templates.begin(); it != m_templates.end(); ++it ) { |
50 | OTodo ev = it.data(); | 50 | OPimTodo ev = it.data(); |
51 | conf.setGroup( QString::number( ev.uid() ) ); | 51 | conf.setGroup( QString::number( ev.uid() ) ); |
@@ -58,8 +58,8 @@ void TemplateManager::save() { | |||
58 | void TemplateManager::addEvent( const QString& str, | 58 | void TemplateManager::addEvent( const QString& str, |
59 | const OTodo& ev) { | 59 | const OPimTodo& ev) { |
60 | qWarning("AddEvent"+ str ); | 60 | qWarning("AddEvent"+ str ); |
61 | OTodo todo = ev; | 61 | OPimTodo todo = ev; |
62 | if( ev.uid() == 0 ) | 62 | if( ev.uid() == 0 ) |
63 | todo.setUid(1); // generate a new uid | 63 | todo.setUid(1); // generate a new uid |
64 | 64 | ||
65 | m_templates.replace( str, todo ); | 65 | m_templates.replace( str, todo ); |
@@ -71,3 +71,3 @@ QStringList TemplateManager::templates() const { | |||
71 | QStringList list; | 71 | QStringList list; |
72 | QMap<QString, OTodo>::ConstIterator it; | 72 | QMap<QString, OPimTodo>::ConstIterator it; |
73 | for (it = m_templates.begin(); it != m_templates.end(); ++it ) { | 73 | for (it = m_templates.begin(); it != m_templates.end(); ++it ) { |
@@ -78,3 +78,3 @@ QStringList TemplateManager::templates() const { | |||
78 | } | 78 | } |
79 | OTodo TemplateManager::templateEvent( const QString& templateName ) { | 79 | OPimTodo TemplateManager::templateEvent( const QString& templateName ) { |
80 | return m_templates[templateName]; | 80 | return m_templates[templateName]; |