diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:31:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:31:01 -0600 |
commit | 252fce5a2a5384702fbcc1c9987284d7bd2e6943 (patch) | |
tree | d5768ff1e9065f29bec60c94d31880b38b4e82f2 /kmymoney2/converter/mymoneyqifreader.cpp | |
parent | 69ef6c4beaa37474a2170d0bfe842de647f53102 (diff) | |
download | kmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.tar.gz kmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmymoney2/converter/mymoneyqifreader.cpp')
-rw-r--r-- | kmymoney2/converter/mymoneyqifreader.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/kmymoney2/converter/mymoneyqifreader.cpp b/kmymoney2/converter/mymoneyqifreader.cpp index 809d71c..76e71d2 100644 --- a/kmymoney2/converter/mymoneyqifreader.cpp +++ b/kmymoney2/converter/mymoneyqifreader.cpp @@ -29,7 +29,7 @@ #include <tqfile.h> #include <tqstringlist.h> #include <tqtimer.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqregexp.h> #include <tqbuffer.h> @@ -202,7 +202,7 @@ TQString MyMoneyQifReader::Private::typeToAccountName(const TQString& type) cons if(type == "sell" || type == "buy") return i18n("Category name", "Investment fees"); - return i18n("Unknown TQIF type %1").tqarg(type); + return i18n("Unknown TQIF type %1").arg(type); } bool MyMoneyQifReader::Private::isTransfer(TQString& tmp, const TQString& leftDelim, const TQString& rightDelim) @@ -213,7 +213,7 @@ bool MyMoneyQifReader::Private::isTransfer(TQString& tmp, const TQString& leftDe // S[Mehrwertsteuer]/_VATCode_N_I // // so extracting is a bit more complex and we use a regexp for it - TQRegExp exp(TQString("\\%1(.*)\\%2(.*)").tqarg(leftDelim, rightDelim)); + TQRegExp exp(TQString("\\%1(.*)\\%2(.*)").arg(leftDelim, rightDelim)); bool rc; if((rc = (exp.search(tmp) != -1)) == true) { @@ -404,7 +404,7 @@ bool MyMoneyQifReader::startImport(void) if(!KIO::NetAccess::download(m_url, m_filename, NULL)) { KMessageBox::detailedError(0, - i18n("Error while loading file '%1'!").tqarg(m_url.prettyURL()), + i18n("Error while loading file '%1'!").arg(m_url.prettyURL()), KIO::NetAccess::lastErrorString(), i18n("File access error")); return false; @@ -460,7 +460,7 @@ bool MyMoneyQifReader::finishImport(void) // remove the Don't ask again entries KConfig* config = KGlobal::config(); - config->setGroup(TQString::tqfromLatin1("Notification Messages")); + config->setGroup(TQString::fromLatin1("Notification Messages")); TQStringList::ConstIterator it; for(it = m_dontAskAgain.begin(); it != m_dontAskAgain.end(); ++it) { @@ -480,7 +480,7 @@ bool MyMoneyQifReader::finishImport(void) // remove the Don't ask again entries KConfig* config = KGlobal::config(); - config->setGroup(TQString::tqfromLatin1("Notification Messages")); + config->setGroup(TQString::fromLatin1("Notification Messages")); TQStringList::ConstIterator it; for(it = m_dontAskAgain.begin(); it != m_dontAskAgain.end(); ++it) { @@ -531,7 +531,7 @@ bool MyMoneyQifReader::finishImport(void) ft.commit(); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to add transactions"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); delete e; rc = false; } @@ -773,7 +773,7 @@ void MyMoneyQifReader::processMSAccountEntry(const MyMoneyAccount::accountTypeE const MyMoneySecurity& sec = file->security(m_account.currencyId()); if ( KMessageBox::questionYesNo( tqApp->mainWidget(), - i18n("The %1 account currently has an opening balance of %2. This TQIF file reports an opening balance of %3. Would you like to overwrite the current balance with the one from the TQIF file?").tqarg(m_account.name(), split.shares().formatMoney(m_account, sec),balance.formatMoney(m_account, sec)), + i18n("The %1 account currently has an opening balance of %2. This TQIF file reports an opening balance of %3. Would you like to overwrite the current balance with the one from the TQIF file?").arg(m_account.name(), split.shares().formatMoney(m_account, sec),balance.formatMoney(m_account, sec)), i18n("Overwrite opening balance"), KStdGuiItem::yes(), KStdGuiItem::no(), @@ -897,9 +897,9 @@ TQString MyMoneyQifReader::transferAccount(TQString name, bool useBrokerage) MyMoneyAccount tmpAccount = m_account; m_qifEntry.clear(); // and construct a temp entry to create/search the account - m_qifEntry << TQString("N%1").tqarg(name); + m_qifEntry << TQString("N%1").arg(name); m_qifEntry << TQString("Tunknown"); - m_qifEntry << TQString("D%1").tqarg(i18n("Autogenerated by TQIF importer")); + m_qifEntry << TQString("D%1").arg(i18n("Autogenerated by TQIF importer")); accountId = processAccountEntry(false); // in case we found a reference to an investment account, we need @@ -908,9 +908,9 @@ TQString MyMoneyQifReader::transferAccount(TQString name, bool useBrokerage) if(useBrokerage && (acc.accountType() == MyMoneyAccount::Investment)) { name = acc.brokerageName(); m_qifEntry.clear(); // and construct a temp entry to create/search the account - m_qifEntry << TQString("N%1").tqarg(name); + m_qifEntry << TQString("N%1").arg(name); m_qifEntry << TQString("Tunknown"); - m_qifEntry << TQString("D%1").tqarg(i18n("Autogenerated by TQIF importer")); + m_qifEntry << TQString("D%1").arg(i18n("Autogenerated by TQIF importer")); accountId = processAccountEntry(false); } m_qifEntry = tmpEntry; // restore local copies @@ -932,9 +932,9 @@ void MyMoneyQifReader::createOpeningBalance(MyMoneyAccount::_accountTypeE accTyp d->isTransfer(name, m_qifProfile.accountDelimiter().left(1), m_qifProfile.accountDelimiter().mid(1,1)); TQStringList entry = m_qifEntry; // keep a temp copy m_qifEntry.clear(); // and construct a temp entry to create/search the account - m_qifEntry << TQString("N%1").tqarg(name); - m_qifEntry << TQString("T%1").tqarg(d->accountTypeToQif(accType)); - m_qifEntry << TQString("D%1").tqarg(i18n("Autogenerated by TQIF importer")); + m_qifEntry << TQString("N%1").arg(name); + m_qifEntry << TQString("T%1").arg(d->accountTypeToQif(accType)); + m_qifEntry << TQString("D%1").arg(i18n("Autogenerated by TQIF importer")); processAccountEntry(); m_qifEntry = entry; // restore local copy } @@ -960,7 +960,7 @@ void MyMoneyQifReader::createOpeningBalance(MyMoneyAccount::_accountTypeE accTyp } if(needCreate) { // in case we create it anyway, we issue a warning to the user to check it manually - KMessageBox::sorry(0, TQString("<qt>%1</qt>").tqarg(i18n("KMyMoney has imported a second opening balance transaction into account <b>%1</b> which differs from the one found already on file. Please correct this manually once the import is done.").tqarg(acc.name())), i18n("Opening balance problem")); + KMessageBox::sorry(0, TQString("<qt>%1</qt>").arg(i18n("KMyMoney has imported a second opening balance transaction into account <b>%1</b> which differs from the one found already on file. Please correct this manually once the import is done.").arg(acc.name())), i18n("Opening balance problem")); } } @@ -984,7 +984,7 @@ void MyMoneyQifReader::createOpeningBalance(MyMoneyAccount::_accountTypeE accTyp } catch(MyMoneyException* e) { KMessageBox::detailedError(0, i18n("Error while creating opening balance transaction"), - TQString("%1(%2):%3").tqarg(e->file()).tqarg(e->line()).tqarg(e->what()), + TQString("%1(%2):%3").arg(e->file()).arg(e->line()).arg(e->what()), i18n("File access error")); delete e; } @@ -1017,7 +1017,7 @@ void MyMoneyQifReader::processTransactionEntry(void) int idx = 1; TQString hash; for(;;) { - hash = TQString("%1-%2").tqarg(hashBase).tqarg(idx); + hash = TQString("%1-%2").arg(hashBase).arg(idx); TQMap<TQString, bool>::const_iterator it; it = d->m_hashMap.find(hash); if(it == d->m_hashMap.end()) { @@ -1054,11 +1054,11 @@ void MyMoneyQifReader::processTransactionEntry(void) "assign todays date to the transaction. Pressing \"Cancel\" will abort " "the import operation. You can then restart the import and select a different " "TQIF profile or create a new one.") - .tqarg(extractLine('D')).tqarg(m_qifProfile.inputDateFormat()), + .arg(extractLine('D')).arg(m_qifProfile.inputDateFormat()), i18n("Invalid date format")); switch(rc) { case KMessageBox::Continue: - tr.m_datePosted = (TQDate::tqcurrentDate()); + tr.m_datePosted = (TQDate::currentDate()); break; case KMessageBox::Cancel: @@ -1085,7 +1085,7 @@ void MyMoneyQifReader::processTransactionEntry(void) tmp = extractLine('#'); if(!tmp.isEmpty()) { - tr.m_strBankID = TQString("ID %1").tqarg(tmp); + tr.m_strBankID = TQString("ID %1").arg(tmp); } #if 0 @@ -1301,11 +1301,11 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) "assign todays date to the transaction. Pressing \"Cancel\" will abort " "the import operation. You can then restart the import and select a different " "TQIF profile or create a new one.") - .tqarg(extractLine('D')).tqarg(m_qifProfile.inputDateFormat()), + .arg(extractLine('D')).arg(m_qifProfile.inputDateFormat()), i18n("Invalid date format")); switch(rc) { case KMessageBox::Continue: - tr.m_datePosted = TQDate::tqcurrentDate(); + tr.m_datePosted = TQDate::currentDate(); break; case KMessageBox::Cancel: @@ -1327,7 +1327,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) int idx = 1; TQString hash; for(;;) { - hash = TQString("%1-%2").tqarg(hashBase).tqarg(idx); + hash = TQString("%1-%2").arg(hashBase).arg(idx); TQMap<TQString, bool>::const_iterator it; it = d->m_hashMap.find(hash); if(it == d->m_hashMap.end()) { @@ -1341,7 +1341,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) // '#' field: BankID TQString tmp = extractLine('#'); if ( ! tmp.isEmpty() ) - tr.m_strBankID = TQString("ID %1").tqarg(tmp); + tr.m_strBankID = TQString("ID %1").arg(tmp); // Reconciliation flag tr.m_reconcile = d->reconcileState(extractLine('C')); @@ -1434,9 +1434,9 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) // If the security is not known, notify the user // TODO (Ace) A "SelectOrCreateAccount" interface for investments KMessageBox::information(0, i18n("This investment account does not contain the \"%1\" security. " - "Transactions involving this security will be ignored.").tqarg(securityname), + "Transactions involving this security will be ignored.").arg(securityname), i18n("Security not found"), - TQString("MissingSecurity%1").tqarg(securityname.stripWhiteSpace())); + TQString("MissingSecurity%1").arg(securityname.stripWhiteSpace())); return; } #endif @@ -1538,7 +1538,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) tr.m_amount = -(amount - tr.m_fees); if(tr.m_strMemo.isEmpty()) - tr.m_strMemo = (TQString("%1 %2").tqarg(extractLine('Y')).tqarg(d->typeToAccountName(action))).stripWhiteSpace(); + tr.m_strMemo = (TQString("%1 %2").arg(extractLine('Y')).arg(d->typeToAccountName(action))).stripWhiteSpace(); } else if (action == "xin" || action == "xout") { @@ -2041,7 +2041,7 @@ TQString MyMoneyQifReader::processAccountEntry(bool resetAccountId) MyMoneyMoney balance; // in case it's a stock account, we need to setup a fix investment account if(account.isInvest()) { - acc.setName(i18n("%1 (Investment)").tqarg(account.name())); // use the same name for the investment account + acc.setName(i18n("%1 (Investment)").arg(account.name())); // use the same name for the investment account acc.setDescription(i18n("Autogenerated by TQIF importer from type Mutual account entry")); acc.setAccountType(MyMoneyAccount::Investment); parentAccount = file->asset(); @@ -2130,7 +2130,7 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone return; } catch (MyMoneyException *e) { - TQString message(i18n("Account \"%1\" disappeared: ").tqarg(account.name())); + TQString message(i18n("Account \"%1\" disappeared: ").arg(account.name())); message += e->what(); KMessageBox::error(0, message); delete e; @@ -2152,7 +2152,7 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone } else { switch(KMessageBox::questionYesNo(0, i18n("The %1 '%2' does not exist. Do you " - "want to create it?").tqarg(typeStr).tqarg(account.name()))) { + "want to create it?").arg(typeStr).arg(account.name()))) { case KMessageBox::Yes: break; case KMessageBox::No: @@ -2160,25 +2160,25 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone } } } else { - accountSelect.setHeader(i18n("Select %1").tqarg(typeStr)); + accountSelect.setHeader(i18n("Select %1").arg(typeStr)); if(!accountId.isEmpty()) { msg = i18n("The %1 <b>%2</b> currently exists. Do you want " "to import transactions to this account?") - .tqarg(typeStr).tqarg(account.name()); + .arg(typeStr).arg(account.name()); } else { msg = i18n("The %1 <b>%2</b> currently does not exist. You can " "create a new %3 by pressing the <b>Create</b> button " "or select another %4 manually from the selection box.") - .tqarg(typeStr).tqarg(account.name()).tqarg(typeStr).tqarg(typeStr); + .arg(typeStr).arg(account.name()).arg(typeStr).arg(typeStr); } } } else { - accountSelect.setHeader(i18n("Import transactions to %1").tqarg(typeStr)); + accountSelect.setHeader(i18n("Import transactions to %1").arg(typeStr)); msg = i18n("No %1 information has been found in the selected TQIF file. " "Please select an account using the selection box in the dialog or " "create a new %2 by pressing the <b>Create</b> button.") - .tqarg(typeStr).tqarg(typeStr); + .arg(typeStr).arg(typeStr); } accountSelect.setDescription(msg); @@ -2223,7 +2223,7 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone const MyMoneySecurity& sec = file->security(account.currencyId()); if ( KMessageBox::questionYesNo( tqApp->mainWidget(), - i18n("The %1 account currently has an opening balance of %2. This TQIF file reports an opening balance of %3. Would you like to overwrite the current balance with the one from the TQIF file?").tqarg(account.name(), split.shares().formatMoney(account, sec), balance.formatMoney(account, sec)), + i18n("The %1 account currently has an opening balance of %2. This TQIF file reports an opening balance of %3. Would you like to overwrite the current balance with the one from the TQIF file?").arg(account.name(), split.shares().formatMoney(account, sec), balance.formatMoney(account, sec)), i18n("Overwrite opening balance"), KStdGuiItem::yes(), KStdGuiItem::no(), |