Diffstat (limited to 'core/pim/datebook2/managertemplate.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook2/managertemplate.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/core/pim/datebook2/managertemplate.h b/core/pim/datebook2/managertemplate.h index cdf121d..72fab3a 100644 --- a/core/pim/datebook2/managertemplate.h +++ b/core/pim/datebook2/managertemplate.h @@ -14,3 +14,3 @@ namespace Datebook { class ManagerTemplate { - typedef typename QMap<QString, T>::Iterator Iterator; + typedef typename QMap<QString, T>::ConstIterator Iterator; public: @@ -21,6 +21,6 @@ namespace Datebook { void remove( const QString& ); - bool load(); - bool save(); + virtual bool load() = 0; + virtual bool save() = 0; - QStringList names(); + QStringList names()const; T value(const QString&)const; @@ -29,7 +29,2 @@ namespace Datebook { QMap<QString, T> m_map; - - private: - virtual bool doSave() = 0; - virtual bool doLoad() = 0; - }; @@ -50,11 +45,3 @@ namespace Datebook { template<class T> - bool ManagerTemplate<T>::load() { - return doLoad(); - } - template<class T> - bool ManagerTemplate<T>::save() { - return doSave(); - } - template<class T> - QStringList ManagerTemplate<T>::names() { + QStringList ManagerTemplate<T>::names()const { QStringList lst; |