From 38f46e7137a77df91eb38133921f6536d847ba81 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 17 Oct 2018 23:25:55 +0900 Subject: [PATCH] Removed obsolete Qt2's TQList/TQListIterator classes and replaced with TQt3's TQPtrList/TQPtrListIterator ones. Signed-off-by: Michele Calgaro --- kmymoney2/dialogs/kreconciledlg.cpp | 12 ++++++------ kmymoney2/dialogs/kreconciledlg.h | 6 +++--- kmymoney2/mymoney/storage/mymoneystoragesql.cpp | 2 -- libkdchart/KDChartGlobal.h | 2 -- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/kmymoney2/dialogs/kreconciledlg.cpp b/kmymoney2/dialogs/kreconciledlg.cpp index c66f495..fd677b5 100644 --- a/kmymoney2/dialogs/kreconciledlg.cpp +++ b/kmymoney2/dialogs/kreconciledlg.cpp @@ -155,12 +155,12 @@ void KReconcileDlg::insertTransactions(void) creditListView->clear(); debitListView->clear(); - TQListIterator it(m_debitsTQList); + TQPtrListIterator it(m_debitsTQList); for ( ; it.current(); ++it) { (void) new KReconcileListItem(debitListView, it.current()); } - TQListIterator it2(m_creditsTQList); + TQPtrListIterator it2(m_creditsTQList); for ( ; it2.current(); ++it2) { (void) new KReconcileListItem(creditListView, it2.current()); } @@ -370,14 +370,14 @@ void KReconcileDlg::reloadLists() } - TQListIterator it(m_debitsTQList); + TQPtrListIterator it(m_debitsTQList); for ( ; it.current(); ++it) { bool transactionFound = inTransactions(it.current()); if(transactionFound == false) m_debitsTQList.remove(it.current()); } - TQListIterator it2(m_creditsTQList); + TQPtrListIterator it2(m_creditsTQList); for ( ; it2.current(); ++it2) { bool transactionFound = inTransactions(it2.current()); if(transactionFound == false) @@ -404,7 +404,7 @@ bool KReconcileDlg::inTransactions(MyMoneyTransaction * /*credittrans */) /* Not used (yet?) bool KReconcileDlg::inCredits(MyMoneyTransaction *transaction) { - TQListIterator it(m_creditsTQList); + TQPtrListIterator it(m_creditsTQList); for ( ; it.current(); ++it) { if(transaction == it.current()) return true; @@ -418,7 +418,7 @@ bool KReconcileDlg::inCredits(MyMoneyTransaction *transaction) /* Not used (yet?) bool KReconcileDlg::inDebits(MyMoneyTransaction *transaction) { - TQListIterator it(m_debitsTQList); + TQPtrListIterator it(m_debitsTQList); for ( ; it.current(); ++it) { if(transaction == it.current()) return true; diff --git a/kmymoney2/dialogs/kreconciledlg.h b/kmymoney2/dialogs/kreconciledlg.h index 89c4529..a1cee39 100644 --- a/kmymoney2/dialogs/kreconciledlg.h +++ b/kmymoney2/dialogs/kreconciledlg.h @@ -62,9 +62,9 @@ private: //MyMoneyBank m_bankIndex; MyMoneyAccount *m_accountIndex; - TQList m_debitsTQList; - TQList m_creditsTQList; - TQList m_reconciledTransactions; + TQPtrList m_debitsTQList; + TQPtrList m_creditsTQList; + TQPtrList m_reconciledTransactions; bool m_balanced; // true when the account is balanced (determined by doDifference) diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp index 17ac410..fd4abe6 100644 --- a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp +++ b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp @@ -4156,8 +4156,6 @@ const TQString MyMoneyDbDef::generateSQL (const TQString& driver) const { MyMoneyDbTable::field_iterator act; // do the following in reverse so the 'formatted' fields are // correctly handled. - // Hmm, how does one use a TQValueListIterator in reverse - // It'll be okay in TQt4 with TQListIterator for (act = ac.end(), --act; act != ac.begin(); --act) { TQString toReplace = (*act)->name(); toReplace.prepend(':'); diff --git a/libkdchart/KDChartGlobal.h b/libkdchart/KDChartGlobal.h index ab7750e..5629caa 100644 --- a/libkdchart/KDChartGlobal.h +++ b/libkdchart/KDChartGlobal.h @@ -101,8 +101,6 @@ #endif // Q_OS_TEMP #endif // TQT_NO_COMPAT -#define TQPtrList TQList -#define TQPtrListIterator TQListIterator #define TQPtrVector TQVector #define TQMemArray TQArray