From fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Jul 2011 06:00:29 +0000 Subject: TQt4 port kmymoney This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/mymoney/mymoneyobjectcontainer.cpp | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'kmymoney2/mymoney/mymoneyobjectcontainer.cpp') diff --git a/kmymoney2/mymoney/mymoneyobjectcontainer.cpp b/kmymoney2/mymoney/mymoneyobjectcontainer.cpp index 666da3b..c842f0d 100644 --- a/kmymoney2/mymoney/mymoneyobjectcontainer.cpp +++ b/kmymoney2/mymoney/mymoneyobjectcontainer.cpp @@ -34,7 +34,7 @@ MyMoneyObjectContainer::~MyMoneyObjectContainer() void MyMoneyObjectContainer::clear(IMyMoneyStorage* storage) { // delete all objects - QMap::const_iterator it; + TQMap::const_iterator it; for(it = m_map.begin(); it != m_map.end(); ++it) { delete (*it); } @@ -46,10 +46,10 @@ void MyMoneyObjectContainer::clear(IMyMoneyStorage* storage) m_storage = storage; } -void MyMoneyObjectContainer::clear(const QString& id) +void MyMoneyObjectContainer::clear(const TQString& id) { - QMap::iterator it; - it = m_map.find(id); + TQMap::iterator it; + it = m_map.tqfind(id); if(it != m_map.end()) { delete (*it); m_map.erase(it); @@ -57,9 +57,9 @@ void MyMoneyObjectContainer::clear(const QString& id) } #define listMethod(a, T) \ -void MyMoneyObjectContainer::a(QValueList& list) \ +void MyMoneyObjectContainer::a(TQValueList& list) \ { \ - QMap::const_iterator it; \ + TQMap::const_iterator it; \ for(it = m_map.begin(); it != m_map.end(); ++it) { \ const T* node = dynamic_cast(*it); \ if(node) { \ @@ -69,9 +69,9 @@ void MyMoneyObjectContainer::a(QValueList& list) \ } #define preloadListMethod(a, T) \ -void MyMoneyObjectContainer::preload##a(const QValueList& list) \ +void MyMoneyObjectContainer::preload##a(const TQValueList& list) \ { \ - QValueList::const_iterator it; \ + TQValueList::const_iterator it; \ for(it = list.begin(); it != list.end(); ++it) { \ delete m_map[(*it).id()]; \ m_map[(*it).id()] = new T(*it); \ @@ -86,13 +86,13 @@ void MyMoneyObjectContainer::preload##a(const T& obj) \ } #define objectAccessMethod(a, T) \ -const T& MyMoneyObjectContainer::a(const QString& id) \ +const T& MyMoneyObjectContainer::a(const TQString& id) \ { \ static T nullElement; \ if(id.isEmpty()) \ return nullElement; \ - QMap::const_iterator it; \ - it = m_map.find(id); \ + TQMap::const_iterator it; \ + it = m_map.tqfind(id); \ if(it == m_map.end()) { \ /* not found, need to load from engine */ \ T x = m_storage->a(id); \ @@ -102,9 +102,9 @@ const T& MyMoneyObjectContainer::a(const QString& id) \ return dynamic_cast(*(*it)); \ } -void MyMoneyObjectContainer::account(QValueList& list) +void MyMoneyObjectContainer::account(TQValueList& list) { - QMap::const_iterator it; + TQMap::const_iterator it; for(it = m_map.begin(); it != m_map.end(); ++it) { const MyMoneyAccount* node = dynamic_cast(*it); if(node) { @@ -114,13 +114,13 @@ void MyMoneyObjectContainer::account(QValueList& list) } } -const MyMoneyAccount& MyMoneyObjectContainer::account(const QString& id) +const MyMoneyAccount& MyMoneyObjectContainer::account(const TQString& id) { static MyMoneyAccount nullElement; if(id.isEmpty()) return nullElement; - QMap::iterator it; - it = m_map.find(id); + TQMap::iterator it; + it = m_map.tqfind(id); if(it == m_map.end()) { /* not found, need to load from engine */ MyMoneyAccount x = m_storage->account(id); @@ -141,10 +141,10 @@ void MyMoneyObjectContainer::assignFraction(MyMoneyAccount* acc) } } -const MyMoneyAccount& MyMoneyObjectContainer::accountByName(const QString& name) const +const MyMoneyAccount& MyMoneyObjectContainer::accountByName(const TQString& name) const { static MyMoneyAccount nullElement; - QMap::const_iterator it; + TQMap::const_iterator it; for(it = m_map.begin(); it != m_map.end(); ++it) { const MyMoneyAccount* node = dynamic_cast(*it); if(node) { @@ -155,13 +155,13 @@ const MyMoneyAccount& MyMoneyObjectContainer::accountByName(const QString& name) return nullElement; } -void MyMoneyObjectContainer::refresh(const QString& id) +void MyMoneyObjectContainer::refresh(const TQString& id) { if(id.isEmpty()) return; - QMap::const_iterator it; - it = m_map.find(id); + TQMap::const_iterator it; + it = m_map.tqfind(id); if(it != m_map.end()) { const MyMoneyAccount* account = dynamic_cast(*it); const MyMoneyPayee* payee = dynamic_cast(*it); -- cgit v1.2.1