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/mymoneycategory.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/mymoneycategory.cpp')
-rw-r--r-- | kmymoney2/mymoney/mymoneycategory.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kmymoney2/mymoney/mymoneycategory.cpp b/kmymoney2/mymoney/mymoneycategory.cpp index 5bf55ab..8717237 100644 --- a/kmymoney2/mymoney/mymoneycategory.cpp +++ b/kmymoney2/mymoney/mymoneycategory.cpp @@ -21,13 +21,13 @@ MyMoneyCategory::MyMoneyCategory() m_income = true; } -MyMoneyCategory::MyMoneyCategory(const bool income, const QString name) +MyMoneyCategory::MyMoneyCategory(const bool income, const TQString name) { m_income = income; m_name = name; } -MyMoneyCategory::MyMoneyCategory(const bool income, const QString name, QStringList minors) +MyMoneyCategory::MyMoneyCategory(const bool income, const TQString name, TQStringList minors) { m_income = income; m_name = name; @@ -39,12 +39,12 @@ MyMoneyCategory::~MyMoneyCategory() } // Functions use the find method to search the list -bool MyMoneyCategory::addMinorCategory(const QString val) +bool MyMoneyCategory::addMinorCategory(const TQString val) { if (val.isEmpty() || val.isNull()) return false; - if (m_minorCategories.find(val) == m_minorCategories.end()) { + if (m_minorCategories.tqfind(val) == m_minorCategories.end()) { m_minorCategories.append(val); return true; } @@ -52,12 +52,12 @@ bool MyMoneyCategory::addMinorCategory(const QString val) return false; } -bool MyMoneyCategory::removeMinorCategory(const QString val) +bool MyMoneyCategory::removeMinorCategory(const TQString val) { if (val.isEmpty() || val.isNull()) return false; - if (m_minorCategories.find(val) != m_minorCategories.end()) { + if (m_minorCategories.tqfind(val) != m_minorCategories.end()) { m_minorCategories.remove(val); return true; } @@ -65,13 +65,13 @@ bool MyMoneyCategory::removeMinorCategory(const QString val) return false; } -bool MyMoneyCategory::renameMinorCategory(const QString oldVal, const QString newVal) +bool MyMoneyCategory::renameMinorCategory(const TQString oldVal, const TQString newVal) { if (oldVal.isEmpty() || oldVal.isNull() || newVal.isEmpty() || newVal.isNull()) return false; - if (m_minorCategories.find(oldVal) != m_minorCategories.end() && - m_minorCategories.find(newVal) == m_minorCategories.end() ) { + if (m_minorCategories.tqfind(oldVal) != m_minorCategories.end() && + m_minorCategories.tqfind(newVal) == m_minorCategories.end() ) { m_minorCategories.remove(oldVal); return addMinorCategory(newVal); @@ -80,16 +80,16 @@ bool MyMoneyCategory::renameMinorCategory(const QString oldVal, const QString ne return false; } -bool MyMoneyCategory::addMinorCategory(QStringList values) +bool MyMoneyCategory::addMinorCategory(TQStringList values) { - for (QStringList::Iterator it = values.begin(); it!=values.end(); ++it) { + for (TQStringList::Iterator it = values.begin(); it!=values.end(); ++it) { addMinorCategory(*it); } return true; } -bool MyMoneyCategory::setMinorCategories(QStringList values) +bool MyMoneyCategory::setMinorCategories(TQStringList values) { m_minorCategories.clear(); return addMinorCategory(values); @@ -101,7 +101,7 @@ bool MyMoneyCategory::removeAllMinors(void) return true; } -QString MyMoneyCategory::firstMinor(void) +TQString MyMoneyCategory::firstMinor(void) { return m_minorCategories.first(); } @@ -123,26 +123,26 @@ MyMoneyCategory& MyMoneyCategory::operator = (const MyMoneyCategory& right) return *this; } -QDataStream &operator<<(QDataStream &s, MyMoneyCategory &category) +TQDataStream &operator<<(TQDataStream &s, MyMoneyCategory &category) { if (category.m_income) - s << (Q_INT32)1; + s << (TQ_INT32)1; else - s << (Q_INT32)0; + s << (TQ_INT32)0; s << category.m_name; - s << (Q_UINT32)category.m_minorCategories.count(); - for (QStringList::Iterator it = category.m_minorCategories.begin(); it!=category.m_minorCategories.end(); ++it) { + s << (TQ_UINT32)category.m_minorCategories.count(); + for (TQStringList::Iterator it = category.m_minorCategories.begin(); it!=category.m_minorCategories.end(); ++it) { s << (*it); } return s; } -QDataStream &operator>>(QDataStream &s, MyMoneyCategory &category) +TQDataStream &operator>>(TQDataStream &s, MyMoneyCategory &category) { - Q_INT32 inc; + TQ_INT32 inc; s >> inc; if (inc==0) category.m_income = false; @@ -151,8 +151,8 @@ QDataStream &operator>>(QDataStream &s, MyMoneyCategory &category) s >> category.m_name; - Q_UINT32 minorCount; - QString buffer; + TQ_UINT32 minorCount; + TQString buffer; s >> minorCount; category.m_minorCategories.clear(); |