From 7e51b6d5ddc01fc3bc69f30bc5d3933a7709dbf2 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/widgets/kaccounttemplateselector.cpp | 4 +- kmymoney2/widgets/kbudgetvalues.cpp | 2 +- kmymoney2/widgets/kguiutils.cpp | 2 +- kmymoney2/widgets/klistviewsearchline.cpp | 8 ++-- kmymoney2/widgets/kmymoneyaccountcombo.cpp | 4 +- kmymoney2/widgets/kmymoneyaccountcompletion.cpp | 2 +- kmymoney2/widgets/kmymoneyaccountselector.cpp | 50 ++++++++++++------------- kmymoney2/widgets/kmymoneyaccountselector.h | 4 +- kmymoney2/widgets/kmymoneyaccounttreebase.cpp | 2 +- kmymoney2/widgets/kmymoneycalculator.cpp | 24 ++++++------ kmymoney2/widgets/kmymoneycombo.cpp | 8 ++-- kmymoney2/widgets/kmymoneyedit.cpp | 38 +++++++++---------- kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp | 6 +-- kmymoney2/widgets/kmymoneyselector.cpp | 8 ++-- kmymoney2/widgets/kmymoneyselector.h | 4 +- kmymoney2/widgets/register.cpp | 6 +-- kmymoney2/widgets/register.h | 4 +- kmymoney2/widgets/stdtransactionmatched.cpp | 2 +- kmymoney2/widgets/transaction.cpp | 26 ++++++------- kmymoney2/widgets/transactionform.cpp | 4 +- kmymoney2/widgets/transactionsortoption.ui.h | 6 +-- 21 files changed, 107 insertions(+), 107 deletions(-) (limited to 'kmymoney2/widgets') diff --git a/kmymoney2/widgets/kaccounttemplateselector.cpp b/kmymoney2/widgets/kaccounttemplateselector.cpp index 1816fab..2fd689b 100644 --- a/kmymoney2/widgets/kaccounttemplateselector.cpp +++ b/kmymoney2/widgets/kaccounttemplateselector.cpp @@ -84,7 +84,7 @@ class KAccountTemplateSelector::Private #ifndef KMM_DESIGNER TQListViewItem* KAccountTemplateSelector::Private::hierarchyItem(const TQString& tqparent, const TQString& name) { - if(!m_templateHierarchy.tqcontains(tqparent) + if(!m_templateHierarchy.contains(tqparent) || m_templateHierarchy[tqparent] == 0) { TQRegExp exp("(.*):(.*)"); if(exp.search(tqparent) != -1) @@ -197,7 +197,7 @@ void KAccountTemplateSelector::slotLoadTemplateList(void) if(country.isEmpty()) country = exp.cap(2); TQString lang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1)); - if(d->countries.tqcontains(country)) { + if(d->countries.contains(country)) { if(d->countries[country] != *it_d) { TQString oName = d->countries[country]; exp.search(oName); diff --git a/kmymoney2/widgets/kbudgetvalues.cpp b/kmymoney2/widgets/kbudgetvalues.cpp index 994eac6..afb3170 100644 --- a/kmymoney2/widgets/kbudgetvalues.cpp +++ b/kmymoney2/widgets/kbudgetvalues.cpp @@ -166,7 +166,7 @@ void KBudgetValues::slotChangePeriod(int id) return; inside = true; - TQWidget *tab = m_periodGroup->tqfind(id); + TQWidget *tab = m_periodGroup->find(id); fillMonthLabels(); MyMoneyMoney newValue; diff --git a/kmymoney2/widgets/kguiutils.cpp b/kmymoney2/widgets/kguiutils.cpp index f0e1d91..1b17ac6 100644 --- a/kmymoney2/widgets/kguiutils.cpp +++ b/kmymoney2/widgets/kguiutils.cpp @@ -50,7 +50,7 @@ void kMandatoryFieldGroup::add(TQWidget *widget) { - if (!widgets.tqcontains(widget)) { + if (!widgets.contains(widget)) { if (widget->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) connect((TQCheckBox*)widget->qt_cast(TQCHECKBOX_OBJECT_NAME_STRING), TQT_SIGNAL(clicked()), diff --git a/kmymoney2/widgets/klistviewsearchline.cpp b/kmymoney2/widgets/klistviewsearchline.cpp index a89c45e..ec411d4 100644 --- a/kmymoney2/widgets/klistviewsearchline.cpp +++ b/kmymoney2/widgets/klistviewsearchline.cpp @@ -220,14 +220,14 @@ bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString TQValueList::ConstIterator it = d->searchColumns.begin(); for(; it != d->searchColumns.end(); ++it) { if(*it < item->listView()->columns() && - item->text(*it).tqfind(s, 0, d->caseSensitive) >= 0) + item->text(*it).find(s, 0, d->caseSensitive) >= 0) return true; } } else { for(int i = 0; i < item->listView()->columns(); i++) { if(item->listView()->columnWidth(i) > 0 && - item->text(i).tqfind(s, 0, d->caseSensitive) >= 0) + item->text(i).find(s, 0, d->caseSensitive) >= 0) { return true; } @@ -266,7 +266,7 @@ TQPopupMenu *KListViewSearchLine::createPopupMenu() columnText = i18n("Column number %1","Column No. %1").tqarg(visiblePosition); } subMenu->insertItem(columnText, visibleColumns); - if(d->searchColumns.isEmpty() || d->searchColumns.tqfind(i) != d->searchColumns.end()) + if(d->searchColumns.isEmpty() || d->searchColumns.find(i) != d->searchColumns.end()) subMenu->setItemChecked(visibleColumns, true); else allColumnsAreSearchColumns = false; @@ -326,7 +326,7 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id) d->searchColumns.clear(); } else { - if(d->searchColumns.tqfind(id) != d->searchColumns.end()) + if(d->searchColumns.find(id) != d->searchColumns.end()) d->searchColumns.remove(id); else { if(d->searchColumns.isEmpty()) { diff --git a/kmymoney2/widgets/kmymoneyaccountcombo.cpp b/kmymoney2/widgets/kmymoneyaccountcombo.cpp index 67a416f..6865c29 100644 --- a/kmymoney2/widgets/kmymoneyaccountcombo.cpp +++ b/kmymoney2/widgets/kmymoneyaccountcombo.cpp @@ -165,7 +165,7 @@ void KMyMoneyAccountCombo::mousePressEvent(TQMouseEvent *e) e->ignore(); return; } - bool hit = TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ); + bool hit = TQT_TQRECT_OBJECT(rect()).contains( e->pos() ); if ( hit ) { // mouse press on button m_mlbDown = TRUE; // left mouse button down emit pressed(); @@ -182,7 +182,7 @@ void KMyMoneyAccountCombo::mouseReleaseEvent(TQMouseEvent *e) return; m_mlbDown = FALSE; // left mouse button up emit released(); - if ( TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ) ) { // mouse release on button + if ( TQT_TQRECT_OBJECT(rect()).contains( e->pos() ) ) { // mouse release on button emit clicked(); } } diff --git a/kmymoney2/widgets/kmymoneyaccountcompletion.cpp b/kmymoney2/widgets/kmymoneyaccountcompletion.cpp index 6de78e5..26dcedf 100644 --- a/kmymoney2/widgets/kmymoneyaccountcompletion.cpp +++ b/kmymoney2/widgets/kmymoneyaccountcompletion.cpp @@ -68,7 +68,7 @@ void kMyMoneyAccountCompletion::slotMakeCompletion(const TQString& txt) // return; int cnt = 0; - if(txt.tqcontains(MyMoneyFile::AccountSeperator) == 0) { + if(txt.contains(MyMoneyFile::AccountSeperator) == 0) { m_lastCompletion = TQRegExp(TQRegExp::escape(txt.stripWhiteSpace()), false); cnt = selector()->slotMakeCompletion(m_lastCompletion); } else { diff --git a/kmymoney2/widgets/kmymoneyaccountselector.cpp b/kmymoney2/widgets/kmymoneyaccountselector.cpp index 762591f..234fa16 100644 --- a/kmymoney2/widgets/kmymoneyaccountselector.cpp +++ b/kmymoney2/widgets/kmymoneyaccountselector.cpp @@ -136,14 +136,14 @@ TQStringList kMyMoneyAccountSelector::accountList(const TQValueList(it_v); if(it_c->type() == TQCheckListItem::CheckBox) { MyMoneyAccount acc = MyMoneyFile::instance()->account(it_c->id()); - it_f = filterList.tqfind(acc.accountType()); + it_f = filterList.find(acc.accountType()); if(filterList.count() == 0 || it_f != filterList.end()) list << it_c->id(); } } else if(it_v->rtti() == 0) { KMyMoneyListViewItem* it_c = dynamic_cast(it_v); MyMoneyAccount acc = MyMoneyFile::instance()->account(it_c->id()); - it_f = filterList.tqfind(acc.accountType()); + it_f = filterList.find(acc.accountType()); if(filterList.count() == 0 || it_f != filterList.end()) list << it_c->id(); } @@ -169,7 +169,7 @@ bool kMyMoneyAccountSelector::match(const TQRegExp& exp, TQListViewItem* item) c return exp.search(it_l->key(1, true)) != -1; } -bool kMyMoneyAccountSelector::tqcontains(const TQString& txt) const +bool kMyMoneyAccountSelector::contains(const TQString& txt) const { TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); TQListViewItem* it_v; @@ -288,7 +288,7 @@ void AccountSet::addAccountType(MyMoneyAccount::accountTypeE type) void AccountSet::removeAccountType(MyMoneyAccount::accountTypeE type) { TQValueList::iterator it; - it = m_typeList.tqfind(type); + it = m_typeList.find(type); if(it != m_typeList.end()) { m_typeList.remove(it); } @@ -313,30 +313,30 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) if(list.count() > 0) currentId = list.first(); } - if((m_typeList.tqcontains(MyMoneyAccount::Checkings) - + m_typeList.tqcontains(MyMoneyAccount::Savings) - + m_typeList.tqcontains(MyMoneyAccount::Cash) - + m_typeList.tqcontains(MyMoneyAccount::AssetLoan) - + m_typeList.tqcontains(MyMoneyAccount::CertificateDep) - + m_typeList.tqcontains(MyMoneyAccount::Investment) - + m_typeList.tqcontains(MyMoneyAccount::Stock) - + m_typeList.tqcontains(MyMoneyAccount::MoneyMarket) - + m_typeList.tqcontains(MyMoneyAccount::Asset) - + m_typeList.tqcontains(MyMoneyAccount::Currency)) > 0) + if((m_typeList.contains(MyMoneyAccount::Checkings) + + m_typeList.contains(MyMoneyAccount::Savings) + + m_typeList.contains(MyMoneyAccount::Cash) + + m_typeList.contains(MyMoneyAccount::AssetLoan) + + m_typeList.contains(MyMoneyAccount::CertificateDep) + + m_typeList.contains(MyMoneyAccount::Investment) + + m_typeList.contains(MyMoneyAccount::Stock) + + m_typeList.contains(MyMoneyAccount::MoneyMarket) + + m_typeList.contains(MyMoneyAccount::Asset) + + m_typeList.contains(MyMoneyAccount::Currency)) > 0) typeMask |= KMyMoneyUtils::asset; - if((m_typeList.tqcontains(MyMoneyAccount::CreditCard) - + m_typeList.tqcontains(MyMoneyAccount::Loan) - + m_typeList.tqcontains(MyMoneyAccount::Liability)) > 0) + if((m_typeList.contains(MyMoneyAccount::CreditCard) + + m_typeList.contains(MyMoneyAccount::Loan) + + m_typeList.contains(MyMoneyAccount::Liability)) > 0) typeMask |= KMyMoneyUtils::liability; - if((m_typeList.tqcontains(MyMoneyAccount::Income)) > 0) + if((m_typeList.contains(MyMoneyAccount::Income)) > 0) typeMask |= KMyMoneyUtils::income; - if((m_typeList.tqcontains(MyMoneyAccount::Expense)) > 0) + if((m_typeList.contains(MyMoneyAccount::Expense)) > 0) typeMask |= KMyMoneyUtils::expense; - if((m_typeList.tqcontains(MyMoneyAccount::Equity)) > 0) + if((m_typeList.contains(MyMoneyAccount::Equity)) > 0) typeMask |= KMyMoneyUtils::equity; selector->clear(); @@ -409,7 +409,7 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) tmpKey = key + MyMoneyFile::AccountSeperator + acc.name(); TQListViewItem* subItem = selector->newItem(item, acc.name(), tmpKey, acc.id()); if(acc.value("PreferredAccount") == "Yes" - && m_typeList.tqcontains(acc.accountType())) { + && m_typeList.contains(acc.accountType())) { selector->newItem(m_favorites, acc.name(), tmpKey, acc.id()); } if(acc.accountList().count() > 0) { @@ -418,7 +418,7 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) } //disable the item if it has been added only because a subaccount matches the type - if( !m_typeList.tqcontains(acc.accountType()) ) { + if( !m_typeList.contains(acc.accountType()) ) { subItem->setEnabled(false); } } @@ -505,7 +505,7 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewIte ++m_count; TQListViewItem* item = selector->newItem(tqparent, acc.name(), tmpKey, acc.id()); if(acc.value("PreferredAccount") == "Yes" - && m_typeList.tqcontains(acc.accountType())) { + && m_typeList.contains(acc.accountType())) { selector->newItem(m_favorites, acc.name(), tmpKey, acc.id()); } if(acc.accountList().count() > 0) { @@ -514,7 +514,7 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewIte } //disable the item if it has been added only because a subaccount matches the type - if( !m_typeList.tqcontains(acc.accountType()) ) { + if( !m_typeList.contains(acc.accountType()) ) { item->setEnabled(false); } } @@ -524,7 +524,7 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewIte bool AccountSet::includeAccount(const MyMoneyAccount& acc) { - if( m_typeList.tqcontains(acc.accountType()) ) + if( m_typeList.contains(acc.accountType()) ) return true; TQStringList accounts = acc.accountList(); diff --git a/kmymoney2/widgets/kmymoneyaccountselector.h b/kmymoney2/widgets/kmymoneyaccountselector.h index 632cdc5..dc03ceb 100644 --- a/kmymoney2/widgets/kmymoneyaccountselector.h +++ b/kmymoney2/widgets/kmymoneyaccountselector.h @@ -90,14 +90,14 @@ public: virtual bool match(const TQRegExp& exp, TQListViewItem* item) const; /** - * This method returns, if any of the items in the selector tqcontains + * This method returns, if any of the items in the selector contains * the text @a txt. * * @param txt const reference to string to be looked for * @retval true exact match found * @retval false no match found */ - virtual bool tqcontains(const TQString& txt) const; + virtual bool contains(const TQString& txt) const; /** * This method removes all the buttons of the widget diff --git a/kmymoney2/widgets/kmymoneyaccounttreebase.cpp b/kmymoney2/widgets/kmymoneyaccounttreebase.cpp index 6d8b026..3491afc 100644 --- a/kmymoney2/widgets/kmymoneyaccounttreebase.cpp +++ b/kmymoney2/widgets/kmymoneyaccounttreebase.cpp @@ -454,7 +454,7 @@ void KMyMoneyAccountTreeBase::contentsDragMoveEvent(TQDragMoveEvent* e) } } } - if ( !inside_margin.tqcontains(vp) ) { + if ( !inside_margin.contains(vp) ) { slotStartAutoScroll(); e->accept(TQRect(0,0,0,0)); // Keep sending move events m_autoopenTimer.stop(); diff --git a/kmymoney2/widgets/kmymoneycalculator.cpp b/kmymoney2/widgets/kmymoneycalculator.cpp index 8e1cbdd..e202b80 100644 --- a/kmymoney2/widgets/kmymoneycalculator.cpp +++ b/kmymoney2/widgets/kmymoneycalculator.cpp @@ -160,7 +160,7 @@ void kMyMoneyCalculator::commaClicked(void) { if(operand.length() == 0) operand = "0"; - if(operand.tqcontains('.', FALSE) == 0) + if(operand.contains('.', FALSE) == 0) operand.append('.'); if(operand.length() > 16) @@ -174,8 +174,8 @@ void kMyMoneyCalculator::plusminusClicked(void) operand = m_result; if(operand.length() > 0) { - if(operand.tqfind('-') != -1) - operand.tqreplace('-', TQString()); + if(operand.find('-') != -1) + operand.replace('-', TQString()); else operand.prepend('-'); changeDisplay(operand); @@ -318,7 +318,7 @@ void kMyMoneyCalculator::percentClicked(void) const TQString kMyMoneyCalculator::result(void) const { TQString txt = m_result; - txt.tqreplace(TQRegExp("\\."), m_comma); + txt.replace(TQRegExp("\\."), m_comma); if(txt[0] == '-') { txt = txt.mid(1); // get rid of the minus sign TQString tqmask; @@ -345,7 +345,7 @@ const TQString kMyMoneyCalculator::result(void) const void kMyMoneyCalculator::changeDisplay(const TQString& str) { TQString txt = str; - txt.tqreplace(TQRegExp("\\."), m_comma); + txt.replace(TQRegExp("\\."), m_comma); display->setText("" + txt + ""); } @@ -419,16 +419,16 @@ void kMyMoneyCalculator::setInitialValues(const TQString& value, TQKeyEvent* ev) bool negative = false; // setup operand operand = value; - operand.tqreplace(TQRegExp(TQString("\\")+KGlobal::locale()->thousandsSeparator()), TQString()); - operand.tqreplace(TQRegExp(TQString("\\")+m_comma), "."); - if(operand.tqcontains('(')) { + operand.replace(TQRegExp(TQString("\\")+KGlobal::locale()->thousandsSeparator()), TQString()); + operand.replace(TQRegExp(TQString("\\")+m_comma), "."); + if(operand.contains('(')) { negative = true; - operand.tqreplace("(", TQString()); - operand.tqreplace(")", TQString()); + operand.replace("(", TQString()); + operand.replace(")", TQString()); } - if(operand.tqcontains('-')) { + if(operand.contains('-')) { negative = true; - operand.tqreplace("-", TQString()); + operand.replace("-", TQString()); } if(operand.isEmpty()) operand = "0"; diff --git a/kmymoney2/widgets/kmymoneycombo.cpp b/kmymoney2/widgets/kmymoneycombo.cpp index ad2c1f7..7471de7 100644 --- a/kmymoney2/widgets/kmymoneycombo.cpp +++ b/kmymoney2/widgets/kmymoneycombo.cpp @@ -192,7 +192,7 @@ bool KMyMoneyCombo::isInArrowArea(const TQPoint& pos) const if(!editable()) arrowRect = rect(); - return arrowRect.tqcontains(mapFromGlobal(pos)); + return arrowRect.contains(mapFromGlobal(pos)); } void KMyMoneyCombo::keyPressEvent(TQKeyEvent* e) @@ -233,7 +233,7 @@ void KMyMoneyCombo::focusOutEvent(TQFocusEvent* e) m_inFocusOutEvent = true; if(editable() && !currentText().isEmpty()) { if(m_canCreateObjects) { - if(!m_completion->selector()->tqcontains(currentText())) { + if(!m_completion->selector()->contains(currentText())) { TQString id; // annouce that we go into a possible dialog to create an object // This can be used by upstream widgets to disable filters etc. @@ -254,7 +254,7 @@ void KMyMoneyCombo::focusOutEvent(TQFocusEvent* e) // else if we cannot create objects, and the current text is not // in the list, then we clear the text and the selection. - } else if(!m_completion->selector()->tqcontains(currentText())) { + } else if(!m_completion->selector()->contains(currentText())) { setCurrentText(TQString()); } } @@ -575,7 +575,7 @@ public: int itemId(const TQString& s) const { TQMap::const_iterator it; - it = m_strings.tqfind(s); + it = m_strings.find(s); if(it != m_strings.end()) return *it; return -1; diff --git a/kmymoney2/widgets/kmymoneyedit.cpp b/kmymoney2/widgets/kmymoneyedit.cpp index 2e59e32..ad51606 100644 --- a/kmymoney2/widgets/kmymoneyedit.cpp +++ b/kmymoney2/widgets/kmymoneyedit.cpp @@ -73,30 +73,30 @@ TQValidator::State kMyMoneyMoneyValidator::validate( TQString & input, int & _p t = l->monetaryThousandsSeparator(); // first, delete p's and t's: if ( !p.isEmpty() ) - for ( int idx = s.tqfind( p ) ; idx >= 0 ; idx = s.tqfind( p, idx ) ) + for ( int idx = s.find( p ) ; idx >= 0 ; idx = s.find( p, idx ) ) s.remove( idx, p.length() ); if ( !t.isEmpty() ) - for ( int idx = s.tqfind( t ) ; idx >= 0 ; idx = s.tqfind( t, idx ) ) + for ( int idx = s.find( t ) ; idx >= 0 ; idx = s.find( t, idx ) ) s.remove( idx, t.length() ); // then, replace the d's and n's - if ( ( !n.isEmpty() && n.tqfind('.') != -1 ) || - ( !d.isEmpty() && d.tqfind('-') != -1 ) ) { + if ( ( !n.isEmpty() && n.find('.') != -1 ) || + ( !d.isEmpty() && d.find('-') != -1 ) ) { // make sure we don't replace something twice: - kdWarning() << "KDoubleValidator: decimal symbol tqcontains '-' or " - "negative sign tqcontains '.' -> improve algorithm" << endl; + kdWarning() << "KDoubleValidator: decimal symbol contains '-' or " + "negative sign contains '.' -> improve algorithm" << endl; return Invalid; } if ( !d.isEmpty() && d != "." ) - for ( int idx = s.tqfind( d ) ; idx >= 0 ; idx = s.tqfind( d, idx + 1 ) ) - s.tqreplace( idx, d.length(), "."); + for ( int idx = s.find( d ) ; idx >= 0 ; idx = s.find( d, idx + 1 ) ) + s.replace( idx, d.length(), "."); if ( !n.isEmpty() && n != "-" ) - for ( int idx = s.tqfind( n ) ; idx >= 0 ; idx = s.tqfind( n, idx + 1 ) ) - s.tqreplace( idx, n.length(), "-" ); + for ( int idx = s.find( n ) ; idx >= 0 ; idx = s.find( n, idx + 1 ) ) + s.replace( idx, n.length(), "-" ); // Take care of monetary parens around the value if selected via // the locale settings. @@ -105,24 +105,24 @@ TQValidator::State kMyMoneyMoneyValidator::validate( TQString & input, int & _p if(l->negativeMonetarySignPosition() == KLocale::ParensAround || l->positiveMonetarySignPosition() == KLocale::ParensAround) { TQRegExp regExp("^(\\()?([\\d-\\.]*)(\\))?$"); - if(s.tqfind(regExp) != -1) { + if(s.find(regExp) != -1) { s = regExp.cap(2); } } // check for non numeric values (TQDoubleValidator allows an 'e', we don't) TQRegExp nonNumeric("[^\\d-\\.]+"); - if(s.tqfind(nonNumeric) != -1) + if(s.find(nonNumeric) != -1) return Invalid; // check for minus sign trailing the number TQRegExp trailingMinus("^([^-]*)\\w*-$"); - if(s.tqfind(trailingMinus) != -1) { + if(s.find(trailingMinus) != -1) { s = TQString("-%1").tqarg(trailingMinus.cap(1)); } // check for the maximum allowed number of decimal places - int decPos = s.tqfind('.'); + int decPos = s.find('.'); if(decPos != -1) { if(decimals() == 0) return Invalid; @@ -144,7 +144,7 @@ TQValidator::State kMyMoneyMoneyValidator::validate( TQString & input, int & _p // only, if the locale settings have it enabled. if(l->negativeMonetarySignPosition() == KLocale::ParensAround || l->positiveMonetarySignPosition() == KLocale::ParensAround) { - int tmp = input.tqcontains('(') - input.tqcontains(')'); + int tmp = input.contains('(') - input.contains(')'); if(tmp > 0) rc = Intermediate; else if(tmp < 0) @@ -369,19 +369,19 @@ void kMyMoneyEdit::ensureFractionalPart(TQString& s) const // followed by the required number of 0s if (!s.isEmpty()) { if(m_prec > 0) { - if (!s.tqcontains(decimalSymbol)) { + if (!s.contains(decimalSymbol)) { s += decimalSymbol; for (int i=0; i < m_prec; i++) s += "0"; } } else if(m_prec == 0) { - while(s.tqcontains(decimalSymbol)) { - int pos = s.tqfindRev(decimalSymbol); + while(s.contains(decimalSymbol)) { + int pos = s.findRev(decimalSymbol); if(pos != -1) { s.truncate(pos); } } - } else if(s.tqcontains(decimalSymbol)) { // m_prec == -1 && fraction + } else if(s.contains(decimalSymbol)) { // m_prec == -1 && fraction // no trailing zeroes while(s.endsWith("0")) { s.truncate(s.length()-1); diff --git a/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp b/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp index 6704c9c..5016716 100644 --- a/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp +++ b/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp @@ -104,7 +104,7 @@ void kMyMoneyOnlineQuoteConfig::loadList(const bool updateResetList) m_quoteSourceList->setSelected(first, true); slotLoadWidgets(first); - m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); } void kMyMoneyOnlineQuoteConfig::resetConfig(void) @@ -185,7 +185,7 @@ void kMyMoneyOnlineQuoteConfig::slotNewEntry(void) WebPriceQuoteSource newSource(i18n("New Quote Source")); newSource.write(); loadList(); - TQListViewItem* item = m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0); + TQListViewItem* item = m_quoteSourceList->findItem(i18n("New Quote Source"), 0); if(item) { m_quoteSourceList->setSelected(item, true); slotLoadWidgets(item); @@ -208,7 +208,7 @@ void kMyMoneyOnlineQuoteConfig::slotEntryRenamed(TQListViewItem* item, const TQS } else { item->setText(0, m_currentItem.m_name); } - m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); } #include "kmymoneyonlinequoteconfig.moc" diff --git a/kmymoney2/widgets/kmymoneyselector.cpp b/kmymoney2/widgets/kmymoneyselector.cpp index 5e16bf1..b4af52f 100644 --- a/kmymoney2/widgets/kmymoneyselector.cpp +++ b/kmymoney2/widgets/kmymoneyselector.cpp @@ -357,7 +357,7 @@ void KMyMoneySelector::selectItems(const TQStringList& itemList, const bool stat for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast(it_v); - if(it_c->type() == TQCheckListItem::CheckBox && itemList.tqcontains(it_c->id())) { + if(it_c->type() == TQCheckListItem::CheckBox && itemList.contains(it_c->id())) { it_c->setOn(state); } selectSubItems(it_v, itemList, state); @@ -373,7 +373,7 @@ void KMyMoneySelector::selectSubItems(TQListViewItem* item, const TQStringList& for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast(it_v); - if(it_c->type() == TQCheckListItem::CheckBox && itemList.tqcontains(it_c->id())) { + if(it_c->type() == TQCheckListItem::CheckBox && itemList.contains(it_c->id())) { it_c->setOn(state); } selectSubItems(it_v, itemList, state); @@ -634,7 +634,7 @@ int KMyMoneySelector::slotMakeCompletion(const TQRegExp& exp) return cnt; } -bool KMyMoneySelector::tqcontains(const TQString& txt) const +bool KMyMoneySelector::contains(const TQString& txt) const { TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); TQListViewItem* it_v; @@ -684,7 +684,7 @@ void KMyMoneySelector::slotListRightMouse(TQListViewItem* it_v, const TQPoint& p p.rx() -= xdepth; // copy ends around here - if ( r.tqcontains( p ) ) { + if ( r.contains( p ) ) { // we get down here, if we have a right click onto the checkbox selectAllSubItems(it_c, it_c->isOn()); } diff --git a/kmymoney2/widgets/kmymoneyselector.h b/kmymoney2/widgets/kmymoneyselector.h index c55ac47..a0facf0 100644 --- a/kmymoney2/widgets/kmymoneyselector.h +++ b/kmymoney2/widgets/kmymoneyselector.h @@ -262,14 +262,14 @@ public: TQListViewItem* item(const TQString& id) const; /** - * This method returns, if any of the items in the selector tqcontains + * This method returns, if any of the items in the selector contains * the text @a txt. * * @param txt const reference to string to be looked for * @retval true exact match found * @retval false no match found */ - virtual bool tqcontains(const TQString& txt) const; + virtual bool contains(const TQString& txt) const; /** * Clears all items of the selector and the associated listview. diff --git a/kmymoney2/widgets/register.cpp b/kmymoney2/widgets/register.cpp index 98303b1..e448fe4 100644 --- a/kmymoney2/widgets/register.cpp +++ b/kmymoney2/widgets/register.cpp @@ -1888,7 +1888,7 @@ TQWidget* Register::cellWidget(int row, int col) const TQPair idx = tqMakePair(row, col); TQMap, TQWidget*>::const_iterator it_w; - it_w = m_cellWidgets.tqfind(idx); + it_w = m_cellWidgets.find(idx); if(it_w != m_cellWidgets.end()) w = *it_w; return w; @@ -1915,7 +1915,7 @@ void Register::clearCellWidget(int row, int col) TQPair idx = tqMakePair(row, col); TQMap, TQWidget*>::iterator it_w; - it_w = m_cellWidgets.tqfind(idx); + it_w = m_cellWidgets.find(idx); if(it_w != m_cellWidgets.end()) { (*it_w)->deleteLater(); m_cellWidgets.remove(it_w); @@ -1931,7 +1931,7 @@ void Register::setCellContentFromEditor(int /*row*/, int /*col*/) { } -void Register::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*tqreplace*/) +void Register::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*replace*/) { } diff --git a/kmymoney2/widgets/register.h b/kmymoney2/widgets/register.h index a244c85..c155fc7 100644 --- a/kmymoney2/widgets/register.h +++ b/kmymoney2/widgets/register.h @@ -92,7 +92,7 @@ public: TQWidget* haveWidget(const TQString& name) const { TQWidgetContainer::const_iterator it_w; - it_w = tqfind(name); + it_w = find(name); if(it_w != end()) return *it_w; return 0; @@ -294,7 +294,7 @@ public: TQWidget* createEditor(int row, int col, bool initFromCell) const; void setCellContentFromEditor(int row, int col); TQWidget* cellWidget(int row, int col) const; - void endEdit(int row, int col, bool accept, bool tqreplace); + void endEdit(int row, int col, bool accept, bool replace); void paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); void resizeData(int) {} diff --git a/kmymoney2/widgets/stdtransactionmatched.cpp b/kmymoney2/widgets/stdtransactionmatched.cpp index b24ed88..ff5ccc3 100644 --- a/kmymoney2/widgets/stdtransactionmatched.cpp +++ b/kmymoney2/widgets/stdtransactionmatched.cpp @@ -174,7 +174,7 @@ void StdTransactionMatched::registerCellText(TQString& txt, int& align, int row, } memo = m_split.memo(); if(!matchedSplit.memo().isEmpty() && memo != matchedSplit.memo()) { - int pos = memo.tqfindRev(matchedSplit.memo()); + int pos = memo.findRev(matchedSplit.memo()); if(pos != -1) { memo = memo.left(pos); if(memo.endsWith("\n")) diff --git a/kmymoney2/widgets/transaction.cpp b/kmymoney2/widgets/transaction.cpp index 3a077d7..dc5e5a2 100644 --- a/kmymoney2/widgets/transaction.cpp +++ b/kmymoney2/widgets/transaction.cpp @@ -661,8 +661,8 @@ bool Transaction::maybeTip(const TQPoint& cpos, int row, int col, TQRect& r, TQS // qDebug("r is %d,%d,%d,%d", r.x(), r.y(), r.width(), r.height()); r.setBottomLeft(TQPoint(r.x() + (r.width() - h), r.y() + h)); // qDebug("r is %d,%d,%d,%d", r.x(), r.y(), r.width(), r.height()); - // qDebug("p is in r = %d", r.tqcontains(cpos)); - if(r.tqcontains(cpos) && m_erronous) { + // qDebug("p is in r = %d", r.contains(cpos)); + if(r.contains(cpos) && m_erronous) { if(m_transaction.splits().count() < 2) { msg = TQString("%1").tqarg(i18n("Transaction is missing a category assignment.")); } else { @@ -674,7 +674,7 @@ bool Transaction::maybeTip(const TQPoint& cpos, int row, int col, TQRect& r, TQS // check for detail column in row 1 of the transaction for a possible exclamation mark r = m_parent->cellGeometry(m_startRow + 1, col); - if(row == 1 && r.tqcontains(cpos) && m_transaction.splitCount() > 2) { + if(row == 1 && r.contains(cpos) && m_transaction.splitCount() > 2) { MyMoneyFile* file = MyMoneyFile::instance(); TQValueList::const_iterator it_s; TQString txt; @@ -729,9 +729,9 @@ void Transaction::singleLineMemo(TQString& txt, const MyMoneySplit& split) const { txt = split.memo(); // remove empty lines - txt.tqreplace("\n\n", "\n"); - // tqreplace '\n' with ", " - txt.tqreplace('\n', ", "); + txt.replace("\n\n", "\n"); + // replace '\n' with ", " + txt.replace('\n', ", "); } int Transaction::rowHeightHint(void) const @@ -747,34 +747,34 @@ bool Transaction::matches(const TQString& txt) const MyMoneyFile* file = MyMoneyFile::instance(); TQString s(txt); - s.tqreplace(MyMoneyMoney::thousandSeparator(), TQString()); + s.replace(MyMoneyMoney::thousandSeparator(), TQString()); const TQValueList&list = m_transaction.splits(); TQValueList::const_iterator it_s; for(it_s = list.begin(); it_s != list.end(); ++it_s) { // check if the text is contained in one of the fields // memo, number, payee, account - if((*it_s).memo().tqcontains(txt, false) - || (*it_s).number().tqcontains(txt, false)) + if((*it_s).memo().contains(txt, false) + || (*it_s).number().contains(txt, false)) return true; if(!(*it_s).payeeId().isEmpty()) { const MyMoneyPayee& payee = file->payee((*it_s).payeeId()); - if(payee.name().tqcontains(txt, false)) + if(payee.name().contains(txt, false)) return true; } const MyMoneyAccount& acc = file->account((*it_s).accountId()); - if(acc.name().tqcontains(txt, false)) + if(acc.name().contains(txt, false)) return true; if(!s.isEmpty()) { // check if any of the value field matches if a value has been entered TQString r = (*it_s).value().formatMoney(m_account.fraction(), false); - if(r.tqcontains(s, false)) + if(r.contains(s, false)) return true; const MyMoneyAccount& acc = file->account((*it_s).accountId()); r = (*it_s).shares().formatMoney(acc.fraction(), false); - if(r.tqcontains(s, false)) + if(r.contains(s, false)) return true; } } diff --git a/kmymoney2/widgets/transactionform.cpp b/kmymoney2/widgets/transactionform.cpp index 7ace9ba..8e56571 100644 --- a/kmymoney2/widgets/transactionform.cpp +++ b/kmymoney2/widgets/transactionform.cpp @@ -64,7 +64,7 @@ TabBar::SignalEmissionE TabBar::setSignalEmission(TabBar::SignalEmissionE type) int TabBar::currentTab(void) const { TQMap::const_iterator it; - it = m_idMap.tqfind(TQTabBar::currentTab()); + it = m_idMap.find(TQTabBar::currentTab()); if(it != m_idMap.end()) return *it; return -1; @@ -128,7 +128,7 @@ void TransactionForm::enableTabBar(bool b) void TabBar::slotTabSelected(int id) { TQMap::const_iterator it; - it = m_idMap.tqfind(id); + it = m_idMap.find(id); if(it != m_idMap.end()) emit tabSelected(*it); else diff --git a/kmymoney2/widgets/transactionsortoption.ui.h b/kmymoney2/widgets/transactionsortoption.ui.h index fe01eb2..636a6a7 100644 --- a/kmymoney2/widgets/transactionsortoption.ui.h +++ b/kmymoney2/widgets/transactionsortoption.ui.h @@ -82,8 +82,8 @@ void TransactionSortOption::setSettings(const TQString& settings) } // make sure to create EntryOrderSort if missing but required - if(selectedMap.tqfind(static_cast(KMyMoneyRegister::EntryDateSort)) != selectedMap.end() - && selectedMap.tqfind(static_cast(KMyMoneyRegister::EntryOrderSort)) == selectedMap.end()) { + if(selectedMap.find(static_cast(KMyMoneyRegister::EntryDateSort)) != selectedMap.end() + && selectedMap.find(static_cast(KMyMoneyRegister::EntryOrderSort)) == selectedMap.end()) { int val = dateSign * static_cast(KMyMoneyRegister::EntryOrderSort); selectedMap[static_cast(KMyMoneyRegister::EntryOrderSort)] = true; last = addEntry(m_selectedList, last, val); @@ -97,7 +97,7 @@ void TransactionSortOption::setSettings(const TQString& settings) if(i == static_cast(KMyMoneyRegister::EntryDateSort)) continue; // Only add those, that are not present in the list of selected items - if(selectedMap.tqfind(i) == selectedMap.end()) { + if(selectedMap.find(i) == selectedMap.end()) { int val = i; if(i == static_cast(KMyMoneyRegister::ValueSort)) val = -val; -- cgit v1.2.1