summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:31:01 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:31:01 -0600
commit252fce5a2a5384702fbcc1c9987284d7bd2e6943 (patch)
treed5768ff1e9065f29bec60c94d31880b38b4e82f2 /kmymoney2/converter
parent69ef6c4beaa37474a2170d0bfe842de647f53102 (diff)
downloadkmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.tar.gz
kmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmymoney2/converter')
-rw-r--r--kmymoney2/converter/convertertest.cpp20
-rw-r--r--kmymoney2/converter/mymoneygncreader.cpp60
-rw-r--r--kmymoney2/converter/mymoneygncreader.h2
-rw-r--r--kmymoney2/converter/mymoneyqifprofile.cpp2
-rw-r--r--kmymoney2/converter/mymoneyqifreader.cpp74
-rw-r--r--kmymoney2/converter/mymoneyqifwriter.cpp6
-rw-r--r--kmymoney2/converter/mymoneystatementreader.cpp50
-rw-r--r--kmymoney2/converter/mymoneytemplate.cpp24
-rw-r--r--kmymoney2/converter/webpricequote.cpp62
-rw-r--r--kmymoney2/converter/webpricequote.h4
10 files changed, 152 insertions, 152 deletions
diff --git a/kmymoney2/converter/convertertest.cpp b/kmymoney2/converter/convertertest.cpp
index 739c6f3..bbe0ec4 100644
--- a/kmymoney2/converter/convertertest.cpp
+++ b/kmymoney2/converter/convertertest.cpp
@@ -112,8 +112,8 @@ void ConverterTest::testWebQuotes()
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
// Quote date should be within the last week, or something bad is going on.
- CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate());
- CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::currentDate());
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::currentDate().addDays(-7));
// Quote value should at least be positive
CPPUNIT_ASSERT(qr.m_price.isPositive());
@@ -123,8 +123,8 @@ void ConverterTest::testWebQuotes()
// kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl;
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
- CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1));
- CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::currentDate().addDays(1));
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::currentDate().addDays(-7));
CPPUNIT_ASSERT(qr.m_price.isPositive());
q.launch("EUR > USD","Yahoo Currency");
@@ -132,8 +132,8 @@ void ConverterTest::testWebQuotes()
// kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl;
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
- CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1));
- CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::currentDate().addDays(1));
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::currentDate().addDays(-7));
CPPUNIT_ASSERT(qr.m_price.isPositive());
q.launch("50492","Globe & Mail");
@@ -141,8 +141,8 @@ void ConverterTest::testWebQuotes()
// kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl;
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
- CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1));
- CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::currentDate().addDays(1));
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::currentDate().addDays(-7));
CPPUNIT_ASSERT(qr.m_price.isPositive());
q.launch("TDB647","MSN.CA");
@@ -150,8 +150,8 @@ void ConverterTest::testWebQuotes()
// kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl;
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
- CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1));
- CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::currentDate().addDays(1));
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::currentDate().addDays(-7));
CPPUNIT_ASSERT(qr.m_price.isPositive());
}
diff --git a/kmymoney2/converter/mymoneygncreader.cpp b/kmymoney2/converter/mymoneygncreader.cpp
index bfd6911..7fe9a28 100644
--- a/kmymoney2/converter/mymoneygncreader.cpp
+++ b/kmymoney2/converter/mymoneygncreader.cpp
@@ -58,7 +58,7 @@ email : mte@users.sourceforge.net
#define PASS } catch (MyMoneyException *e) { throw e; }
#else
#include "mymoneymoney.h"
- #include <tqtextedit.h>
+ #include <textedit.h>
#define i18n TQObject::tr
#define TRY
#define CATCH
@@ -117,7 +117,7 @@ void GncObject::checkVersion (const TQString& elName, const TQXmlAttributes& elA
if (map.contains(elName)) { // if it's not in the map, there's nothing to check
if (!map[elName].contains(elAttrs.value("version"))) {
TQString em = i18n("%1: Sorry. This importer cannot handle version %2 of element %3")
- .tqarg(__func__).tqarg(elAttrs.value("version")).tqarg(elName);
+ .arg(__func__).arg(elAttrs.value("version")).arg(elName);
throw new MYMONEYEXCEPTION (em);
}
}
@@ -190,11 +190,11 @@ TQString GncObject::hide (TQString data, unsigned int anonClass) {
switch (anonClass) {
case ASIS: break; // this is not personal data
case SUPPRESS: result = ""; break; // this is personal and is not essential
- case NXTACC: result = i18n("Account%1").tqarg(++nextAccount, -6); break; // generate account name
+ case NXTACC: result = i18n("Account%1").arg(++nextAccount, -6); break; // generate account name
case NXTEQU: // generate/return an equity name
it = anonStocks.find (data);
if (it == anonStocks.end()) {
- result = i18n("Stock%1").tqarg(++nextEquity, -6);
+ result = i18n("Stock%1").arg(++nextEquity, -6);
anonStocks.insert (data, result);
} else {
result = (*it);
@@ -203,13 +203,13 @@ TQString GncObject::hide (TQString data, unsigned int anonClass) {
case NXTPAY: // genearet/return a payee name
it = anonPayees.find (data);
if (it == anonPayees.end()) {
- result = i18n("Payee%1").tqarg(++nextPayee, -6);
+ result = i18n("Payee%1").arg(++nextPayee, -6);
anonPayees.insert (data, result);
} else {
result = (*it);
}
break;
- case NXTSCHD: result = i18n("Schedule%1").tqarg(++nextSched, -6); break; // generate a schedule name
+ case NXTSCHD: result = i18n("Schedule%1").arg(++nextSched, -6); break; // generate a schedule name
case MONEY1:
in = MyMoneyMoney(data);
if (data == "-1/0") in = MyMoneyMoney (0); // spurious gnucash data - causes a crash sometimes
@@ -934,7 +934,7 @@ bool XmlReader::startElement (const TQString&, const TQString&, const TQString&
} catch (MyMoneyException *e) {
#ifndef _GNCFILEANON
// we can't pass on exceptions here coz the XML reader won't catch them and we just abort
- KMessageBox::error(0, i18n("Import failed:\n\n%1").tqarg(e->what()), PACKAGE);
+ KMessageBox::error(0, i18n("Import failed:\n\n%1").arg(e->what()), PACKAGE);
qFatal ("%s", e->what().latin1());
#else
qFatal ("%s", e->latin1());
@@ -969,7 +969,7 @@ bool XmlReader::endElement( const TQString&, const TQString&, const TQString&elN
} catch (MyMoneyException *e) {
#ifndef _GNCFILEANON
// we can't pass on exceptions here coz the XML reader won't catch them and we just abort
- KMessageBox::error(0, i18n("Import failed:\n\n%1").tqarg(e->what()), PACKAGE);
+ KMessageBox::error(0, i18n("Import failed:\n\n%1").arg(e->what()), PACKAGE);
qFatal ("%s", e->what().latin1());
#else
qFatal ("%s", e->latin1());
@@ -1059,7 +1059,7 @@ void MyMoneyGncReader::readFile(TQIODevice* pDevice, IMyMoneySerialize* storage)
terminate (); // do all the wind-up things
ft.commit();
} catch (MyMoneyException *e) {
- KMessageBox::error(0, i18n("Import failed:\n\n%1").tqarg(e->what()), PACKAGE);
+ KMessageBox::error(0, i18n("Import failed:\n\n%1").arg(e->what()), PACKAGE);
qFatal ("%s", e->what().latin1());
} // end catch
signalProgress (0, 1, i18n("Import complete")); // switch off progress bar
@@ -1121,7 +1121,7 @@ void MyMoneyGncReader::setFileHideFactor () {
i18n ("Each monetary value on your file will be multiplied by a random number between 0.01 and 1.99\n"
"with a different value used for each transaction. In addition, to further disguise the true\n"
"values, you may enter a number between %1 and %2 which will be applied to all values.\n"
- "These numbers will not be stored in the file.").tqarg(MINFILEHIDEF).tqarg(MAXFILEHIDEF),
+ "These numbers will not be stored in the file.").arg(MINFILEHIDEF).arg(MAXFILEHIDEF),
(1.0 + (int)(1000.0 * rand() / (RAND_MAX + 1.0))) / 100.0,
MINFILEHIDEF, MAXFILEHIDEF, 2);
}
@@ -1192,10 +1192,10 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
acc.setDescription(gac->desc());
- TQDate tqcurrentDate = TQDate::tqcurrentDate();
- acc.setOpeningDate(tqcurrentDate);
- acc.setLastModified(tqcurrentDate);
- acc.setLastReconciliationDate(tqcurrentDate);
+ TQDate currentDate = TQDate::currentDate();
+ acc.setOpeningDate(currentDate);
+ acc.setLastModified(currentDate);
+ acc.setLastReconciliationDate(currentDate);
if (gac->commodity()->isCurrency()) {
acc.setCurrencyId (gac->commodity()->id().utf8());
m_currencyCount[gac->commodity()->id()]++;
@@ -1248,7 +1248,7 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
acc.setAccountType(MyMoneyAccount::MoneyMarket);
} else { // we have here an account type we can't currently handle
TQString em =
- i18n("Current importer does not recognize GnuCash account type %1").tqarg(gac->type());
+ i18n("Current importer does not recognize GnuCash account type %1").arg(gac->type());
throw new MYMONEYEXCEPTION (em);
}
// if no parent account is present, assign to one of our standard accounts
@@ -1406,7 +1406,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) {
// payee id
split.setPayeeId (m_txPayeeId.utf8());
// reconciled state and date
- switch (gsp->recon().tqat(0).latin1()) {
+ switch (gsp->recon().at(0).latin1()) {
case 'n':
split.setReconcileFlag(MyMoneySplit::NotReconciled); break;
case 'c':
@@ -1717,7 +1717,7 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) {
MyMoneyTransaction tx;
m_suspectSchedule = false;
TQDate startDate, nextDate, lastDate, endDate; // for date calculations
- TQDate today = TQDate::tqcurrentDate();
+ TQDate today = TQDate::currentDate();
int numOccurs, remOccurs;
if (m_scheduleCount == 0) signalProgress (0, m_gncScheduleCount, i18n("Loading schedules..."));
@@ -1732,7 +1732,7 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) {
++itt;
}
if (itt == 0) {
- throw new MYMONEYEXCEPTION (i18n("Can't find template transaction for schedule %1").tqarg(sc.name()));
+ throw new MYMONEYEXCEPTION (i18n("Can't find template transaction for schedule %1").arg(sc.name()));
} else {
tx = convertTemplateTransaction (sc.name(), *itt);
}
@@ -1783,8 +1783,8 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) {
unknownOccurs = true;
} else {
const GncRecurrence *gre = gsc->m_vpRecurrence.first();
- //qDebug (TQString("Sched %1, pt %2, mu %3, sd %4").tqarg(gsc->name()).tqarg(gre->periodType())
- // .tqarg(gre->mult()).tqarg(gre->startDate().toString(Qt::ISODate)));
+ //qDebug (TQString("Sched %1, pt %2, mu %3, sd %4").arg(gsc->name()).arg(gre->periodType())
+ // .arg(gre->mult()).arg(gre->startDate().toString(Qt::ISODate)));
frequency = gre->getFrequency();
schedEnabled = gsc->enabled();
}
@@ -1853,9 +1853,9 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) {
sc.setPaymentType((MyMoneySchedule::paymentTypeE)MyMoneySchedule::STYPE_OTHER);
sc.setFixed (!m_suspectSchedule); // if any probs were found, set it as variable so user will always be prompted
// we don't currently have a 'disable' option, but just make sure auto-enter is off if not enabled
- //qDebug(TQString("%1 and %2").tqarg(gsc->autoCreate()).tqarg(schedEnabled));
+ //qDebug(TQString("%1 and %2").arg(gsc->autoCreate()).arg(schedEnabled));
sc.setAutoEnter ((gsc->autoCreate() == "y") && (schedEnabled == "y"));
- //qDebug(TQString("autoEnter set to %1").tqarg(sc.autoEnter()));
+ //qDebug(TQString("autoEnter set to %1").arg(sc.autoEnter()));
// type
TQString actionType = tx.splits().first().action();
if (actionType == MyMoneySplit::ActionDeposit) {
@@ -1971,7 +1971,7 @@ void MyMoneyGncReader::terminate () {
since for Yes, the id is 3 and the index is 0, whereas the No button will return 4 or 1. So we test for either Yes case */
/* and now it seems to have changed again, returning 259 for a Yes??? so use KMessagebox */
TQString question = i18n("Your main currency seems to be %1 (%2); do you want to set this as your base currency?")
- .tqarg(mainCurrency).tqarg(m_storage->currency(mainCurrency.utf8()).name());
+ .arg(mainCurrency).arg(m_storage->currency(mainCurrency.utf8()).name());
if(KMessageBox::questionYesNo(0, question, PACKAGE) == KMessageBox::Yes) {
m_storage->setValue ("kmm-baseCurrency", mainCurrency);
}
@@ -2015,7 +2015,7 @@ void MyMoneyGncReader::terminate () {
for (i = 0; i < m_suspectList.count(); i++) {
MyMoneySchedule sc = m_storage->schedule(m_suspectList[i]);
KEditScheduleDlg *s;
- switch(KMessageBox::warningYesNo(0, i18n("Problems were encountered in converting schedule '%1'.\nDo you want to review or edit it now?").tqarg(sc.name()), PACKAGE)) {
+ switch(KMessageBox::warningYesNo(0, i18n("Problems were encountered in converting schedule '%1'.\nDo you want to review or edit it now?").arg(sc.name()), PACKAGE)) {
case KMessageBox::Yes:
s = new KEditScheduleDlg (sc);
// FIXME: connect newCategory to something useful, so that we
@@ -2077,7 +2077,7 @@ TQString MyMoneyGncReader::buildReportSection (const TQString& source) {
GncMessageArgs *m = m_messageList.at(i);
if (m->source == source) {
if (gncdebug) qDebug("%s", TQString("build text source %1, code %2, argcount %3")
- .tqarg(m->source).tqarg(m->code).tqarg(m->args.count()).data());
+ .arg(m->source).arg(m->code).arg(m->args.count()).data());
TQString ss = GncMessages::text (m->source, m->code);
// add variable args. the .arg function seems always to replace the
// lowest numbered placeholder it finds, so translating messages
@@ -2139,7 +2139,7 @@ TQString MyMoneyGncReader::createOrphanAccount (const TQString& gncName) {
acc.setName ("orphan_" + gncName);
acc.setDescription (i18n("Orphan created from unknown gnucash account"));
- TQDate today = TQDate::tqcurrentDate();
+ TQDate today = TQDate::currentDate();
acc.setOpeningDate (today);
acc.setLastModified (today);
@@ -2267,7 +2267,7 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
bool ok = false;
while (!ok) { // keep going till we have a valid investment parent
TQString invAccName = TQInputDialog::getItem (
- PACKAGE, i18n("Select parent investment account or enter new name. Stock %1").tqarg(stockAcc.name ()),
+ PACKAGE, i18n("Select parent investment account or enter new name. Stock %1").arg(stockAcc.name ()),
accList, lastSelected, true, &ok);
if (ok) {
lastSelected = accList.findIndex (invAccName); // preserve selection for next time
@@ -2290,7 +2290,7 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
// this code is probably not going to be implemented coz we can't change account types (??)
#if 0
TQMessageBox mb (PACKAGE,
- i18n ("%1 is not an Investment Account. Do you wish to make it one?").tqarg(invAcc.name()),
+ i18n ("%1 is not an Investment Account. Do you wish to make it one?").arg(invAcc.name()),
TQMessageBox::Question,
TQMessageBox::Yes | TQMessageBox::Default,
TQMessageBox::No | TQMessageBox::Escape,
@@ -2305,7 +2305,7 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
break;
}
#endif
- switch(KMessageBox::questionYesNo(0, i18n ("%1 is not an Investment Account. Do you wish to make it one?").tqarg(invAcc.name(), PACKAGE))) {
+ switch(KMessageBox::questionYesNo(0, i18n ("%1 is not an Investment Account. Do you wish to make it one?").arg(invAcc.name(), PACKAGE))) {
case KMessageBox::Yes:
// convert it - but what if it has splits???
qFatal ("Not yet implemented");
@@ -2395,7 +2395,7 @@ void MyMoneyGncReader::postMessage (const TQString& source, const unsigned int c
const unsigned int argCount = GncMessages::argCount (source, code);
if ((gncdebug) && (argCount != argList.count()))
qDebug("%s", TQString("MyMoneyGncReader::postMessage debug: Message %1, code %2, requires %3 arguments, got %4")
- .tqarg(source).tqarg(code).tqarg(argCount).tqarg(argList.count()).data());
+ .arg(source).arg(code).arg(argCount).arg(argList.count()).data());
// store the arguments
for (i = 0; i < argCount; i++) {
if (i > argList.count()) m->args.append(TQString());
diff --git a/kmymoney2/converter/mymoneygncreader.h b/kmymoney2/converter/mymoneygncreader.h
index b34abf7..e66114a 100644
--- a/kmymoney2/converter/mymoneygncreader.h
+++ b/kmymoney2/converter/mymoneygncreader.h
@@ -157,7 +157,7 @@ class TQIODevice;
#include <tqptrstack.h>
#include <tqxml.h>
#include <tqdatetime.h>
-#include <tqtextcodec.h>
+#include <textcodec.h>
// ----------------------------------------------------------------------------
// Project Includes
diff --git a/kmymoney2/converter/mymoneyqifprofile.cpp b/kmymoney2/converter/mymoneyqifprofile.cpp
index f9854f9..52ef770 100644
--- a/kmymoney2/converter/mymoneyqifprofile.cpp
+++ b/kmymoney2/converter/mymoneyqifprofile.cpp
@@ -649,7 +649,7 @@ const TQDate MyMoneyQifProfile::date(const TQString& datein) const
}
} else {
msg = TQString("Length of year (%1) does not match expected length (%2).")
- .tqarg(scannedParts[i].length()).tqarg(formatParts[i].length());
+ .arg(scannedParts[i].length()).arg(formatParts[i].length());
}
break;
}
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(),
diff --git a/kmymoney2/converter/mymoneyqifwriter.cpp b/kmymoney2/converter/mymoneyqifwriter.cpp
index d84e325..1032d95 100644
--- a/kmymoney2/converter/mymoneyqifwriter.cpp
+++ b/kmymoney2/converter/mymoneyqifwriter.cpp
@@ -23,7 +23,7 @@
// QT Headers
#include <tqfile.h>
-#include <tqtextstream.h>
+#include <textstream.h>
// ----------------------------------------------------------------------------
// KDE Headers
@@ -69,7 +69,7 @@ void MyMoneyQifWriter::write(const TQString& filename, const TQString& profile,
} catch(MyMoneyException *e) {
TQString errMsg = i18n("Unexpected exception '%1' thrown in %2, line %3 "
"caught in MyMoneyQifWriter::write()")
- .tqarg(e->what()).tqarg(e->file()).tqarg(e->line());
+ .arg(e->what()).arg(e->file()).arg(e->line());
KMessageBox::error(0, errMsg);
delete e;
@@ -77,7 +77,7 @@ void MyMoneyQifWriter::write(const TQString& filename, const TQString& profile,
qifFile.close();
} else {
- KMessageBox::error(0, i18n("Unable to open file '%1' for writing").tqarg(filename));
+ KMessageBox::error(0, i18n("Unable to open file '%1' for writing").arg(filename));
}
}
diff --git a/kmymoney2/converter/mymoneystatementreader.cpp b/kmymoney2/converter/mymoneystatementreader.cpp
index f25eed4..e7b81e5 100644
--- a/kmymoney2/converter/mymoneystatementreader.cpp
+++ b/kmymoney2/converter/mymoneystatementreader.cpp
@@ -29,7 +29,7 @@
#include <tqfile.h>
#include <tqstringlist.h>
#include <tqtimer.h>
-#include <tqtextedit.h>
+#include <textedit.h>
// ----------------------------------------------------------------------------
// KDE Headers
@@ -171,7 +171,7 @@ void MyMoneyStatementReader::Private::assignUniqueBankID(MyMoneySplit& s, const
uniqIds[hash] = true;
break;
}
- hash = TQString("%1-%2").tqarg(base).tqarg(idx);
+ hash = TQString("%1-%2").arg(base).arg(idx);
++idx;
}
@@ -291,7 +291,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
if(!m_account.name().isEmpty())
- messages += i18n("Importing statement for account %1").tqarg(m_account.name());
+ messages += i18n("Importing statement for account %1").arg(m_account.name());
else if(s.m_listTransactions.count() == 0)
messages += i18n("Importing statement without transactions");
@@ -389,20 +389,20 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
if(s.m_closingBalance.isAutoCalc()) {
messages += i18n(" Statement balance is not contained in statement.");
} else {
- messages += i18n(" Statement balance on %1 is reported to be %2").tqarg(s.m_dateEnd.toString(Qt::ISODate)).tqarg(s.m_closingBalance.formatMoney("",2));
+ messages += i18n(" Statement balance on %1 is reported to be %2").arg(s.m_dateEnd.toString(Qt::ISODate)).arg(s.m_closingBalance.formatMoney("",2));
}
messages += i18n(" Transactions");
- messages += i18n(" %1 processed").tqarg(d->transactionsCount);
- messages += i18n(" %1 added").tqarg(d->transactionsAdded);
- messages += i18n(" %1 matched").tqarg(d->transactionsMatched);
- messages += i18n(" %1 duplicates").tqarg(d->transactionsDuplicate);
+ messages += i18n(" %1 processed").arg(d->transactionsCount);
+ messages += i18n(" %1 added").arg(d->transactionsAdded);
+ messages += i18n(" %1 matched").arg(d->transactionsMatched);
+ messages += i18n(" %1 duplicates").arg(d->transactionsDuplicate);
messages += i18n(" Payees");
- messages += i18n(" %1 created").tqarg(payeeCount);
+ messages += i18n(" %1 created").arg(payeeCount);
messages += TQString();
// 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) {
@@ -485,7 +485,7 @@ void MyMoneyStatementReader::processSecurityEntry(const MyMoneyStatement::Securi
ft.commit();
kdDebug(0) << "Created " << security.name() << " with id " << security.id() << endl;
} catch(MyMoneyException *e) {
- KMessageBox::error(0, i18n("Error creating security record: %1").tqarg(e->what()), i18n("Error"));
+ KMessageBox::error(0, i18n("Error creating security record: %1").arg(e->what()), i18n("Error"));
}
} else {
kdDebug(0) << "Found " << security.name() << " with id " << security.id() << endl;
@@ -500,7 +500,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
#if 0
TQString dbgMsg;
- dbgMsg = TQString("Process %1, '%3', %2").tqarg(t_in.m_datePosted.toString(Qt::ISODate)).tqarg(t_in.m_amount.formatMoney("", 2)).tqarg(t_in.m_strBankID);
+ dbgMsg = TQString("Process %1, '%3', %2").arg(t_in.m_datePosted.toString(Qt::ISODate)).arg(t_in.m_amount.formatMoney("", 2)).arg(t_in.m_strBankID);
qDebug("%s", dbgMsg.data());
#endif
@@ -614,7 +614,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
if ( t_in.m_strSecurity.isEmpty() )
{
- KMessageBox::information(0, i18n("This imported statement contains investment transactions with no security. These transactions will be ignored.").tqarg(t_in.m_strSecurity),i18n("Security not found"),TQString("BlankSecurity"));
+ KMessageBox::information(0, i18n("This imported statement contains investment transactions with no security. These transactions will be ignored.").arg(t_in.m_strSecurity),i18n("Security not found"),TQString("BlankSecurity"));
return;
}
else
@@ -646,7 +646,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
// This should be rare. A statement should have a security entry for any
// of the securities referred to in the transactions. The only way to get
// here is if that's NOT the case.
- KMessageBox::information(0, i18n("This investment account does not contain the \"%1\" security. Transactions involving this security will be ignored.").tqarg(t_in.m_strSecurity),i18n("Security not found"),TQString("MissingSecurity%1").tqarg(t_in.m_strSecurity.stripWhiteSpace()));
+ KMessageBox::information(0, i18n("This investment account does not contain the \"%1\" security. Transactions involving this security will be ignored.").arg(t_in.m_strSecurity),i18n("Security not found"),TQString("MissingSecurity%1").arg(t_in.m_strSecurity.stripWhiteSpace()));
return;
}
}
@@ -840,7 +840,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
break;
case MyMoneyPayee::matchName:
- keys << TQString("%1").tqarg(TQRegExp::escape((*it_p).name()));
+ keys << TQString("%1").arg(TQRegExp::escape((*it_p).name()));
// tricky fall through here
case MyMoneyPayee::matchKey:
@@ -882,13 +882,13 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
if(m_autoCreatePayee == false) {
// Ask the user if that is what he intended to do?
- TQString msg = i18n("Do you want to add \"%1\" as payee/receiver?\n\n").tqarg(payeename);
+ TQString msg = i18n("Do you want to add \"%1\" as payee/receiver?\n\n").arg(payeename);
msg += i18n("Selecting \"Yes\" will create the payee, \"No\" will skip "
"creation of a payee record and remove the payee information "
"from this transaction. Selecting \"Cancel\" aborts the import "
"operation.\n\nIf you select \"No\" here and mark the \"Don't ask "
"again\" checkbox, the payee information for all following transactions "
- "referencing \"%1\" will be removed.").tqarg(payeename);
+ "referencing \"%1\" will be removed.").arg(payeename);
TQString askKey = TQString("Statement-Import-Payee-")+payeename;
if(!m_dontAskAgain.contains(askKey)) {
@@ -928,7 +928,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
//add in caption? and account combo here
TQLabel *label1 = new TQLabel( topcontents);
- label1->setText(i18n("Please select a default category for payee '%1':").tqarg(payee.name()));
+ label1->setText(i18n("Please select a default category for payee '%1':").arg(payee.name()));
TQGuardedPtr<KMyMoneyAccountCombo> accountCombo = new KMyMoneyAccountCombo(topcontents);
dialog->setMainWidget(topcontents);
@@ -961,7 +961,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
} catch(MyMoneyException *e) {
KMessageBox::detailedSorry(0, i18n("Unable to add payee/receiver"),
- (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line()));
+ (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line()));
delete e;
}
@@ -1164,7 +1164,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
// to enter the schedule and match it agains the new transaction. Otherwise, we
// just leave the transaction as imported.
MyMoneySchedule schedule(*(dynamic_cast<const MyMoneySchedule*>(o)));
- if(KMessageBox::questionYesNo(0, TQString("<qt>%1</qt>").tqarg(i18n("KMyMoney has found a scheduled transaction named <b>%1</b> which matches an imported transaction. Do you want KMyMoney to enter this schedule now so that the transaction can be matched? ").tqarg(schedule.name())), i18n("Schedule found")) == KMessageBox::Yes) {
+ if(KMessageBox::questionYesNo(0, TQString("<qt>%1</qt>").arg(i18n("KMyMoney has found a scheduled transaction named <b>%1</b> which matches an imported transaction. Do you want KMyMoney to enter this schedule now so that the transaction can be matched? ").arg(schedule.name())), i18n("Schedule found")) == KMessageBox::Yes) {
KEnterScheduleDlg dlg(0, schedule);
TransactionEditor* editor = dlg.startEdit();
if(editor) {
@@ -1221,7 +1221,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
}
delete o;
} catch (MyMoneyException *e) {
- TQString message(i18n("Problem adding or matching imported transaction with id '%1': %2").tqarg(t_in.m_strBankID).tqarg(e->what()));
+ TQString message(i18n("Problem adding or matching imported transaction with id '%1': %2").arg(t_in.m_strBankID).arg(e->what()));
qDebug("%s", message.data());
delete e;
@@ -1271,9 +1271,9 @@ bool MyMoneyStatementReader::selectOrCreateAccount(const SelectCreateMode /*mode
}
TQString msg = i18n("<b>You have downloaded a statement for the following account:</b><br><br>");
- msg += i18n(" - Account Name: %1").tqarg(account.name()) + "<br>";
- msg += i18n(" - Account Type: %1").tqarg(KMyMoneyUtils::accountTypeToString(account.accountType())) + "<br>";
- msg += i18n(" - Account Number: %1").tqarg(account.number()) + "<br>";
+ msg += i18n(" - Account Name: %1").arg(account.name()) + "<br>";
+ msg += i18n(" - Account Type: %1").arg(KMyMoneyUtils::accountTypeToString(account.accountType())) + "<br>";
+ msg += i18n(" - Account Number: %1").arg(account.number()) + "<br>";
msg += "<br>";
TQString header;
@@ -1332,7 +1332,7 @@ bool MyMoneyStatementReader::selectOrCreateAccount(const SelectCreateMode /*mode
//throw new MYMONEYEXCEPTION("USERABORT");
done = true;
else
- KMessageBox::error(0, TQString("<qt>%1</qt>").tqarg(i18n("You must select an account, create a new one, or press the <b>Abort</b> button.")));
+ KMessageBox::error(0, TQString("<qt>%1</qt>").arg(i18n("You must select an account, create a new one, or press the <b>Abort</b> button.")));
}
}
return result;
diff --git a/kmymoney2/converter/mymoneytemplate.cpp b/kmymoney2/converter/mymoneytemplate.cpp
index bf70d0a..1bbd7c6 100644
--- a/kmymoney2/converter/mymoneytemplate.cpp
+++ b/kmymoney2/converter/mymoneytemplate.cpp
@@ -70,7 +70,7 @@ bool MyMoneyTemplate::loadTemplate(const KURL& url)
rc = KIO::NetAccess::download(url, filename, tqApp->mainWidget());
if(!rc) {
KMessageBox::detailedError(tqApp->mainWidget(),
- i18n("Error while loading file '%1'!").tqarg(url.url()),
+ i18n("Error while loading file '%1'!").arg(url.url()),
KIO::NetAccess::lastErrorString(),
i18n("File access error"));
return false;
@@ -81,7 +81,7 @@ bool MyMoneyTemplate::loadTemplate(const KURL& url)
TQFile file(filename);
TQFileInfo info(file);
if(!info.isFile()) {
- TQString msg=i18n("<b>%1</b> is not a template file.").tqarg(filename);
+ TQString msg=i18n("<b>%1</b> is not a template file.").arg(filename);
KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+msg, i18n("Filetype Error"));
return false;
}
@@ -90,7 +90,7 @@ bool MyMoneyTemplate::loadTemplate(const KURL& url)
TQString errMsg;
int errLine, errColumn;
if(!m_doc.setContent(&file, &errMsg, &errLine, &errColumn)) {
- TQString msg=i18n("Error while reading template file <b>%1</b> in line %2, column %3").tqarg(filename).tqarg(errLine).tqarg(errColumn);
+ TQString msg=i18n("Error while reading template file <b>%1</b> in line %2, column %3").arg(filename).arg(errLine).arg(errColumn);
KMessageBox::detailedError(tqApp->mainWidget(), TQString("<p>")+msg, errMsg, i18n("Template Error"));
rc = false;
} else {
@@ -98,7 +98,7 @@ bool MyMoneyTemplate::loadTemplate(const KURL& url)
}
file.close();
} else {
- KMessageBox::sorry(tqApp->mainWidget(), i18n("File '%1' not found!").tqarg(filename));
+ KMessageBox::sorry(tqApp->mainWidget(), i18n("File '%1' not found!").arg(filename));
rc = false;
}
@@ -139,7 +139,7 @@ bool MyMoneyTemplate::loadDescription(void)
m_longDesc = childElement.text();
validMask |= validLong;
} else {
- KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+i18n("Invalid tag <b>%1</b> in template file <b>%2</b>!").tqarg(childElement.tagName()).tqarg(m_source.prettyURL()));
+ KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+i18n("Invalid tag <b>%1</b> in template file <b>%2</b>!").arg(childElement.tagName()).arg(m_source.prettyURL()));
validMask |= invalid;
}
child = child.nextSibling();
@@ -155,7 +155,7 @@ bool MyMoneyTemplate::hierarchy(TQMap<TQString, TQListViewItem*>& list, const TQ
if(account.isElement()) {
TQDomElement accountElement = account.toElement();
if(accountElement.tagName() == "account") {
- TQString name = TQString("%1:%2").tqarg(parent).tqarg(accountElement.attribute("name"));
+ TQString name = TQString("%1:%2").arg(parent).arg(accountElement.attribute("name"));
list[name] = 0;
hierarchy(list, name, account.firstChild());
}
@@ -211,7 +211,7 @@ bool MyMoneyTemplate::importTemplate(void(*callback)(int, int, const TQString&))
m_progressCallback = callback;
bool rc = !m_accounts.isNull();
MyMoneyFile* file = MyMoneyFile::instance();
- signalProgress(0, m_doc.elementsByTagName("account").count(), i18n("Loading template %1").tqarg(m_source.url()));
+ signalProgress(0, m_doc.elementsByTagName("account").count(), i18n("Loading template %1").arg(m_source.url()));
m_accountsRead = 0;
while(rc == true && !m_accounts.isNull() && m_accounts.isElement()) {
@@ -238,7 +238,7 @@ bool MyMoneyTemplate::importTemplate(void(*callback)(int, int, const TQString&))
break;
default:
- KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+i18n("Invalid top-level account type <b>%1</b> in template file <b>%2</b>!").tqarg(childElement.attribute("type")).tqarg(m_source.prettyURL()));
+ KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+i18n("Invalid top-level account type <b>%1</b> in template file <b>%2</b>!").arg(childElement.attribute("type")).arg(m_source.prettyURL()));
rc = false;
}
@@ -306,7 +306,7 @@ bool MyMoneyTemplate::setFlags(MyMoneyAccount& acc, TQDomNode flags)
if(value == "Tax") {
acc.setValue(value.latin1(), "Yes");
} else {
- KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+i18n("Invalid flag type <b>%1</b> for account <b>%3</b> in template file <b>%2</b>!").tqarg(flagElement.attribute("name")).tqarg(m_source.prettyURL()).tqarg(acc.name()));
+ KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+i18n("Invalid flag type <b>%1</b> for account <b>%3</b> in template file <b>%2</b>!").arg(flagElement.attribute("name")).arg(m_source.prettyURL()).arg(acc.name()));
rc = false;
}
}
@@ -395,16 +395,16 @@ bool MyMoneyTemplate::saveTemplate(const KURL& url)
if(qfile.status() == 0) {
saveToLocalFile(qfile.file());
if(!qfile.close()) {
- throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename));
+ throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename));
}
} else {
- throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename));
+ throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename));
}
} else {
KTempFile tmpfile;
saveToLocalFile(tmpfile.file());
if(!KIO::NetAccess::upload(tmpfile.name(), url, NULL))
- throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").tqarg(url.url()));
+ throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").arg(url.url()));
tmpfile.unlink();
}
return true;
diff --git a/kmymoney2/converter/webpricequote.cpp b/kmymoney2/converter/webpricequote.cpp
index 7732e54..5fdc032 100644
--- a/kmymoney2/converter/webpricequote.cpp
+++ b/kmymoney2/converter/webpricequote.cpp
@@ -20,7 +20,7 @@
#include <tqfile.h>
#include <tqregexp.h>
-#include <tqtextstream.h>
+#include <textstream.h>
#include <tqprocess.h>
// ----------------------------------------------------------------------------
@@ -77,7 +77,7 @@ bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id,
m_symbol = _symbol;
m_id = _id;
-// emit status(TQString("(Debug) symbol=%1 id=%2...").tqarg(_symbol,_id));
+// emit status(TQString("(Debug) symbol=%1 id=%2...").arg(_symbol,_id));
// if we're running normally, with a UI, we can just get these the normal way,
// from the config file
@@ -90,7 +90,7 @@ bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id,
if ( quoteSources().contains(sourcename) )
m_source = WebPriceQuoteSource(sourcename);
else
- emit error(TQString("Source <%1> does not exist.").tqarg(sourcename));
+ emit error(TQString("Source <%1> does not exist.").arg(sourcename));
}
// otherwise, if we have no kapp, we have no config. so we just get them from
// the defaults
@@ -113,13 +113,13 @@ bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id,
// if we've truly found 2 symbols delimited this way...
if ( splitrx.search(m_symbol) != -1 )
- url = KURL::fromPathOrURL(m_source.m_url.tqarg(splitrx.cap(1),splitrx.cap(2)));
+ url = KURL::fromPathOrURL(m_source.m_url.arg(splitrx.cap(1),splitrx.cap(2)));
else
kdDebug(2) << "WebPriceQuote::launch() did not find 2 symbols" << endl;
}
else
// a regular one-symbol quote
- url = KURL::fromPathOrURL(m_source.m_url.tqarg(m_symbol));
+ url = KURL::fromPathOrURL(m_source.m_url.arg(m_symbol));
// If we're running a non-interactive session (with no UI), we can't
// use KIO::NetAccess, so we have to get our web data the old-fashioned
@@ -133,7 +133,7 @@ bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id,
if ( url.isLocalFile() )
{
- emit status(TQString("Executing %1...").tqarg(url.path()));
+ emit status(TQString("Executing %1...").arg(url.path()));
m_filter.clearArguments();
m_filter << TQStringList::split(" ",url.path());
@@ -152,13 +152,13 @@ bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id,
}
else
{
- emit error(TQString("Unable to launch: %1").tqarg(url.path()));
+ emit error(TQString("Unable to launch: %1").arg(url.path()));
slotParseQuote(TQString());
}
}
else
{
- emit status(TQString("Fetching URL %1...").tqarg(url.prettyURL()));
+ emit status(TQString("Fetching URL %1...").arg(url.prettyURL()));
TQString tmpFile;
if( download( url, tmpFile, NULL ) )
@@ -268,14 +268,14 @@ bool WebPriceQuote::launchFinanceQuote ( const TQString& _symbol, const TQString
"[^,]*,([^,]*),.*", // date regexp
"%y-%m-%d"); // date format
- //emit status(TQString("(Debug) symbol=%1 id=%2...").tqarg(_symbol,_id));
+ //emit status(TQString("(Debug) symbol=%1 id=%2...").arg(_symbol,_id));
m_filter.clearArguments();
m_filter << "perl" << m_financeQuoteScriptPath << FTQSource << KProcess::quote(_symbol);
m_filter.setUseShell(true);
m_filter.setSymbol(m_symbol);
- emit status(TQString("Executing %1 %2 %3...").tqarg(m_financeQuoteScriptPath).tqarg(FTQSource).tqarg(_symbol));
+ emit status(TQString("Executing %1 %2 %3...").arg(m_financeQuoteScriptPath).arg(FTQSource).arg(_symbol));
// if we're running non-interactive, we'll need to block.
// otherwise, just let us know when it's done.
@@ -290,7 +290,7 @@ bool WebPriceQuote::launchFinanceQuote ( const TQString& _symbol, const TQString
}
else
{
- emit error(TQString("Unable to launch: %1").tqarg(m_financeQuoteScriptPath));
+ emit error(TQString("Unable to launch: %1").arg(m_financeQuoteScriptPath));
slotParseQuote(TQString());
}
@@ -337,7 +337,7 @@ void WebPriceQuote::slotParseQuote(const TQString& _quotedata)
TQRegExp priceRegExp(m_source.m_price);
if( symbolRegExp.search(quotedata) > -1)
- emit status(i18n("Symbol found: %1").tqarg(symbolRegExp.cap(1)));
+ emit status(i18n("Symbol found: %1").arg(symbolRegExp.cap(1)));
if(priceRegExp.search(quotedata)> -1)
{
@@ -365,7 +365,7 @@ void WebPriceQuote::slotParseQuote(const TQString& _quotedata)
}
m_price = pricestr.toDouble();
- emit status(i18n("Price found: %1 (%2)").tqarg(pricestr).tqarg(m_price));
+ emit status(i18n("Price found: %1 (%2)").arg(pricestr).arg(m_price));
}
if(dateRegExp.search(quotedata) > -1)
@@ -377,12 +377,12 @@ void WebPriceQuote::slotParseQuote(const TQString& _quotedata)
{
m_date = dateparse.convertString( datestr,false /*strict*/ );
gotdate = true;
- emit status(i18n("Date found: %1").tqarg(m_date.toString()));;
+ emit status(i18n("Date found: %1").arg(m_date.toString()));;
}
catch (MyMoneyException* e)
{
- // emit error(i18n("Unable to parse date %1 using format %2: %3").tqarg(datestr,dateparse.format(),e->what()));
- m_date = TQDate::tqcurrentDate();
+ // emit error(i18n("Unable to parse date %1 using format %2: %3").arg(datestr,dateparse.format(),e->what()));
+ m_date = TQDate::currentDate();
gotdate = true;
delete e;
}
@@ -394,13 +394,13 @@ void WebPriceQuote::slotParseQuote(const TQString& _quotedata)
}
else
{
- emit error(i18n("Unable to update price for %1").tqarg(m_symbol));
+ emit error(i18n("Unable to update price for %1").arg(m_symbol));
emit failed( m_id, m_symbol );
}
}
else
{
- emit error(i18n("Unable to update price for %1").tqarg(m_symbol));
+ emit error(i18n("Unable to update price for %1").arg(m_symbol));
emit failed( m_id, m_symbol );
}
}
@@ -624,7 +624,7 @@ TQStringList WebPriceQuote::quoteSourcesNative()
kconfig->deleteGroup("Online Quotes Options");
groups += "Old Source";
- kconfig->setGroup(TQString("Online-Quote-Source-%1").tqarg("Old Source"));
+ kconfig->setGroup(TQString("Online-Quote-Source-%1").arg("Old Source"));
kconfig->writeEntry("URL", url);
kconfig->writeEntry("SymbolRegex", symbolRegExp);
kconfig->writeEntry("PriceRegex",priceRegExp);
@@ -684,7 +684,7 @@ WebPriceQuoteSource::WebPriceQuoteSource(const TQString& name)
{
m_name = name;
KConfig *kconfig = KGlobal::config();
- kconfig->setGroup(TQString("Online-Quote-Source-%1").tqarg(m_name));
+ kconfig->setGroup(TQString("Online-Quote-Source-%1").arg(m_name));
m_sym = kconfig->readEntry("SymbolRegex");
m_date = kconfig->readEntry("DateRegex");
m_dateformat = kconfig->readEntry("DateFormatRegex","%m %d %y");
@@ -696,7 +696,7 @@ WebPriceQuoteSource::WebPriceQuoteSource(const TQString& name)
void WebPriceQuoteSource::write(void) const
{
KConfig *kconfig = KGlobal::config();
- kconfig->setGroup(TQString("Online-Quote-Source-%1").tqarg(m_name));
+ kconfig->setGroup(TQString("Online-Quote-Source-%1").arg(m_name));
kconfig->writeEntry("URL", m_url);
kconfig->writeEntry("PriceRegex", m_price);
kconfig->writeEntry("DateRegex", m_date);
@@ -718,7 +718,7 @@ void WebPriceQuoteSource::rename(const TQString& name)
void WebPriceQuoteSource::remove(void) const
{
KConfig *kconfig = KGlobal::config();
- kconfig->deleteGroup(TQString("Online-Quote-Source-%1").tqarg(m_name));
+ kconfig->deleteGroup(TQString("Online-Quote-Source-%1").arg(m_name));
}
//
@@ -907,7 +907,7 @@ TQDate MyMoneyDateFormat::convertString(const TQString& _in, bool _strict, unsig
// strict mode means we must enforce the delimiters as specified in the
// format. non-strict allows any delimiters
if ( _strict )
- inputrex.setPattern(TQString("(\\w+)%1(\\w+)%2(\\w+)").tqarg(formatDelimiters[0],formatDelimiters[1]));
+ inputrex.setPattern(TQString("(\\w+)%1(\\w+)%2(\\w+)").arg(formatDelimiters[0],formatDelimiters[1]));
else
inputrex.setPattern("(\\w+)\\W+(\\w+)\\W+(\\w+)");
@@ -940,7 +940,7 @@ TQDate MyMoneyDateFormat::convertString(const TQString& _in, bool _strict, unsig
if ( digitrex.search(*it_scanned) != -1 )
day = digitrex.cap(1).toUInt(&ok);
if ( !ok || day > 31 )
- throw new MYMONEYEXCEPTION(TQString("Invalid day entry: %1").tqarg(*it_scanned));
+ throw new MYMONEYEXCEPTION(TQString("Invalid day entry: %1").arg(*it_scanned));
break;
case 'm':
month = (*it_scanned).toUInt(&ok);
@@ -958,18 +958,18 @@ TQDate MyMoneyDateFormat::convertString(const TQString& _in, bool _strict, unsig
}
if ( month < 1 || month > 12 )
- throw new MYMONEYEXCEPTION(TQString("Invalid month entry: %1").tqarg(*it_scanned));
+ throw new MYMONEYEXCEPTION(TQString("Invalid month entry: %1").arg(*it_scanned));
break;
case 'y':
if ( _strict && (*it_scanned).length() != (*it_format).length())
throw new MYMONEYEXCEPTION(TQString("Length of year (%1) does not match expected length (%2).")
- .tqarg(*it_scanned,*it_format));
+ .arg(*it_scanned,*it_format));
year = (*it_scanned).toUInt(&ok);
if (!ok)
- throw new MYMONEYEXCEPTION(TQString("Invalid year entry: %1").tqarg(*it_scanned));
+ throw new MYMONEYEXCEPTION(TQString("Invalid year entry: %1").arg(*it_scanned));
//
// 2-digit year case
@@ -988,7 +988,7 @@ TQDate MyMoneyDateFormat::convertString(const TQString& _in, bool _strict, unsig
}
if ( year < 1900 )
- throw new MYMONEYEXCEPTION(TQString("Invalid year (%1)").tqarg(year));
+ throw new MYMONEYEXCEPTION(TQString("Invalid year (%1)").arg(year));
break;
default:
@@ -1001,7 +1001,7 @@ TQDate MyMoneyDateFormat::convertString(const TQString& _in, bool _strict, unsig
TQDate result(year,month,day);
if ( ! result.isValid() )
- throw new MYMONEYEXCEPTION(TQString("Invalid date (yr%1 mo%2 dy%3)").tqarg(year).tqarg(month).tqarg(day));
+ throw new MYMONEYEXCEPTION(TQString("Invalid date (yr%1 mo%2 dy%3)").arg(year).arg(month).arg(day));
return result;
}
@@ -1016,7 +1016,7 @@ convertertest::QuoteReceiver::QuoteReceiver(WebPriceQuote* q, TQObject* parent,
connect(q,TQT_SIGNAL(quote(const TQString&,const TQDate&, const double&)),
this,TQT_SLOT(slotGetQuote(const TQString&,const TQDate&, const double&)));
connect(q,TQT_SIGNAL(status(const TQString&)),
- this,TQT_SLOT(slottqStatus(const TQString&)));
+ this,TQT_SLOT(slotStatus(const TQString&)));
connect(q,TQT_SIGNAL(error(const TQString&)),
this,TQT_SLOT(slotError(const TQString&)));
}
@@ -1032,7 +1032,7 @@ void convertertest::QuoteReceiver::slotGetQuote(const TQString&,const TQDate& d,
m_price = MyMoneyMoney(m);
m_date = d;
}
-void convertertest::QuoteReceiver::slottqStatus(const TQString& msg)
+void convertertest::QuoteReceiver::slotStatus(const TQString& msg)
{
// kdDebug(2) << "test::QuoteReceiver::slotStatus( " << msg << " )" << endl;
diff --git a/kmymoney2/converter/webpricequote.h b/kmymoney2/converter/webpricequote.h
index ada7684..377ba8d 100644
--- a/kmymoney2/converter/webpricequote.h
+++ b/kmymoney2/converter/webpricequote.h
@@ -217,7 +217,7 @@ class MyMoneyDateFormat
public:
MyMoneyDateFormat(const TQString& _format): m_format(_format) {}
TQString convertDate(const TQDate& _in) const;
- TQDate convertString(const TQString& _in, bool _strict=true, unsigned _centurymidpoint = TQDate::tqcurrentDate().year() ) const;
+ TQDate convertString(const TQString& _in, bool _strict=true, unsigned _centurymidpoint = TQDate::currentDate().year() ) const;
const TQString& format(void) const { return m_format; }
private:
TQString m_format;
@@ -239,7 +239,7 @@ public:
~QuoteReceiver();
public slots:
void slotGetQuote(const TQString&,const TQDate&, const double&);
- void slottqStatus(const TQString&);
+ void slotStatus(const TQString&);
void slotError(const TQString&);
public:
TQStringList m_statuses;