diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
commit | fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch) | |
tree | 6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/mymoney/mymoneyobjectcontainer.cpp | |
parent | dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff) | |
download | kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip |
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
Diffstat (limited to 'kmymoney2/mymoney/mymoneyobjectcontainer.cpp')
-rw-r--r-- | kmymoney2/mymoney/mymoneyobjectcontainer.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
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<QString, MyMoneyObject const *>::const_iterator it; + TQMap<TQString, MyMoneyObject const *>::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<QString, MyMoneyObject const *>::iterator it; - it = m_map.find(id); + TQMap<TQString, MyMoneyObject const *>::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<T>& list) \ +void MyMoneyObjectContainer::a(TQValueList<T>& list) \ { \ - QMap<QString, const MyMoneyObject*>::const_iterator it; \ + TQMap<TQString, const MyMoneyObject*>::const_iterator it; \ for(it = m_map.begin(); it != m_map.end(); ++it) { \ const T* node = dynamic_cast<const T*>(*it); \ if(node) { \ @@ -69,9 +69,9 @@ void MyMoneyObjectContainer::a(QValueList<T>& list) \ } #define preloadListMethod(a, T) \ -void MyMoneyObjectContainer::preload##a(const QValueList<T>& list) \ +void MyMoneyObjectContainer::preload##a(const TQValueList<T>& list) \ { \ - QValueList<T>::const_iterator it; \ + TQValueList<T>::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<QString, MyMoneyObject const *>::const_iterator it; \ - it = m_map.find(id); \ + TQMap<TQString, MyMoneyObject const *>::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<const T&>(*(*it)); \ } -void MyMoneyObjectContainer::account(QValueList<MyMoneyAccount>& list) +void MyMoneyObjectContainer::account(TQValueList<MyMoneyAccount>& list) { - QMap<QString, const MyMoneyObject*>::const_iterator it; + TQMap<TQString, const MyMoneyObject*>::const_iterator it; for(it = m_map.begin(); it != m_map.end(); ++it) { const MyMoneyAccount* node = dynamic_cast<const MyMoneyAccount*>(*it); if(node) { @@ -114,13 +114,13 @@ void MyMoneyObjectContainer::account(QValueList<MyMoneyAccount>& list) } } -const MyMoneyAccount& MyMoneyObjectContainer::account(const QString& id) +const MyMoneyAccount& MyMoneyObjectContainer::account(const TQString& id) { static MyMoneyAccount nullElement; if(id.isEmpty()) return nullElement; - QMap<QString, MyMoneyObject const *>::iterator it; - it = m_map.find(id); + TQMap<TQString, MyMoneyObject const *>::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<QString, MyMoneyObject const *>::const_iterator it; + TQMap<TQString, MyMoneyObject const *>::const_iterator it; for(it = m_map.begin(); it != m_map.end(); ++it) { const MyMoneyAccount* node = dynamic_cast<const MyMoneyAccount *>(*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<QString, MyMoneyObject const *>::const_iterator it; - it = m_map.find(id); + TQMap<TQString, MyMoneyObject const *>::const_iterator it; + it = m_map.tqfind(id); if(it != m_map.end()) { const MyMoneyAccount* account = dynamic_cast<const MyMoneyAccount *>(*it); const MyMoneyPayee* payee = dynamic_cast<const MyMoneyPayee *>(*it); |