author | zecke <zecke> | 2002-03-19 19:20:30 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-03-19 19:20:30 (UTC) |
commit | ebbdb5c4f1c01881bd09f02d9efaa434a073a788 (patch) (unidiff) | |
tree | 9cf900b90df734248ec26d7860b427c397d148f9 | |
parent | c23db0c35b77cc1656ac8822ca948e73c50e8ee6 (diff) | |
download | opie-ebbdb5c4f1c01881bd09f02d9efaa434a073a788.zip opie-ebbdb5c4f1c01881bd09f02d9efaa434a073a788.tar.gz opie-ebbdb5c4f1c01881bd09f02d9efaa434a073a788.tar.bz2 |
Make multiple backends possible
-rw-r--r-- | libopie/tododb.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie/tododb.cpp b/libopie/tododb.cpp index 91331d0..e440dfc 100644 --- a/libopie/tododb.cpp +++ b/libopie/tododb.cpp | |||
@@ -135,13 +135,13 @@ ToDoDB::ToDoDB(const QString &fileName = QString::null, ToDoResource *res ){ | |||
135 | } | 135 | } |
136 | m_res = res; | 136 | m_res = res; |
137 | load(); | 137 | load(); |
138 | } | 138 | } |
139 | ToDoDB::~ToDoDB() | 139 | ToDoDB::~ToDoDB() |
140 | { | 140 | { |
141 | 141 | delete m_res; | |
142 | } | 142 | } |
143 | QValueList<ToDoEvent> ToDoDB::effectiveToDos(const QDate &from, const QDate &to, | 143 | QValueList<ToDoEvent> ToDoDB::effectiveToDos(const QDate &from, const QDate &to, |
144 | bool all ) | 144 | bool all ) |
145 | { | 145 | { |
146 | QValueList<ToDoEvent> events; | 146 | QValueList<ToDoEvent> events; |
147 | for( QValueList<ToDoEvent>::Iterator it = m_todos.begin(); it!= m_todos.end(); ++it ){ | 147 | for( QValueList<ToDoEvent>::Iterator it = m_todos.begin(); it!= m_todos.end(); ++it ){ |
@@ -196,13 +196,13 @@ void ToDoDB::setFileName(const QString &file ) | |||
196 | QString ToDoDB::fileName()const | 196 | QString ToDoDB::fileName()const |
197 | { | 197 | { |
198 | return m_fileName; | 198 | return m_fileName; |
199 | } | 199 | } |
200 | void ToDoDB::load() | 200 | void ToDoDB::load() |
201 | { | 201 | { |
202 | 202 | m_todos = m_res->load( m_fileName ); | |
203 | } | 203 | } |
204 | bool ToDoDB::save() | 204 | bool ToDoDB::save() |
205 | { | 205 | { |
206 | return m_res->save( m_fileName, m_todos ); | 206 | return m_res->save( m_fileName, m_todos ); |
207 | } | 207 | } |
208 | 208 | ||