summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter/mymoneyqifprofile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/converter/mymoneyqifprofile.cpp')
-rw-r--r--kmymoney2/converter/mymoneyqifprofile.cpp266
1 files changed, 133 insertions, 133 deletions
diff --git a/kmymoney2/converter/mymoneyqifprofile.cpp b/kmymoney2/converter/mymoneyqifprofile.cpp
index b8fe97c..3093941 100644
--- a/kmymoney2/converter/mymoneyqifprofile.cpp
+++ b/kmymoney2/converter/mymoneyqifprofile.cpp
@@ -18,8 +18,8 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qregexp.h>
-#include <qvaluevector.h>
+#include <tqregexp.h>
+#include <tqvaluevector.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -58,17 +58,17 @@ class MyMoneyQifProfile::Private {
}
void getThirdPosition(void);
- void dissectDate(QValueVector<QString>& parts, const QString& txt) const;
+ void dissectDate(TQValueVector<TQString>& parts, const TQString& txt) const;
- QValueVector<int> m_changeCount;
- QValueVector<int> m_lastValue;
- QValueVector<int> m_largestValue;
- QMap<QChar, int> m_partPos;
+ TQValueVector<int> m_changeCount;
+ TQValueVector<int> m_lastValue;
+ TQValueVector<int> m_largestValue;
+ TQMap<TQChar, int> m_partPos;
};
-void MyMoneyQifProfile::Private::dissectDate(QValueVector<QString>& parts, const QString& txt) const
+void MyMoneyQifProfile::Private::dissectDate(TQValueVector<TQString>& parts, const TQString& txt) const
{
- QRegExp nonDelimChars("[ 0-9a-zA-Z]");
+ TQRegExp nonDelimChars("[ 0-9a-zA-Z]");
int part = 0; // the current part we scan
unsigned int pos; // the current scan position
unsigned int maxPartSize = txt.length() > 6 ? 4 : 2;
@@ -114,12 +114,12 @@ void MyMoneyQifProfile::Private::getThirdPosition(void)
{
// if we have detected two parts we can calculate the third and its position
if(m_partPos.count() == 2) {
- QValueList<QChar> partsPresent = m_partPos.keys();
- QStringList partsAvail = QStringList::split(",", "d,m,y");
+ TQValueList<TQChar> partsPresent = m_partPos.keys();
+ TQStringList partsAvail = TQStringList::split(",", "d,m,y");
int missingIndex = -1;
int value = 0;
for(int i = 0; i < 3; ++i) {
- if(!partsPresent.contains(partsAvail[i][0])) {
+ if(!partsPresent.tqcontains(partsAvail[i][0])) {
missingIndex = i;
} else {
value += m_partPos[partsAvail[i][0]];
@@ -138,7 +138,7 @@ MyMoneyQifProfile::MyMoneyQifProfile() :
clear();
}
-MyMoneyQifProfile::MyMoneyQifProfile(const QString& name) :
+MyMoneyQifProfile::MyMoneyQifProfile(const TQString& name) :
d(new Private),
m_isDirty(false)
{
@@ -184,7 +184,7 @@ void MyMoneyQifProfile::clear(void)
m_attemptMatchDuplicates = true;
}
-void MyMoneyQifProfile::loadProfile(const QString& name)
+void MyMoneyQifProfile::loadProfile(const TQString& name)
{
KConfig* config = KGlobal::config();
config->setGroup(name);
@@ -208,7 +208,7 @@ void MyMoneyQifProfile::loadProfile(const QString& name)
// make sure, we remove any old stuff for now
config->deleteEntry("FilterScript");
- QString tmp = QString(m_decimal['Q']) + m_decimal['T'] + m_decimal['I'] +
+ TQString tmp = TQString(m_decimal['Q']) + m_decimal['T'] + m_decimal['I'] +
m_decimal['$'] + m_decimal['O'];
tmp = config->readEntry("Decimal", tmp);
m_decimal['Q'] = tmp[0];
@@ -217,7 +217,7 @@ void MyMoneyQifProfile::loadProfile(const QString& name)
m_decimal['$'] = tmp[3];
m_decimal['O'] = tmp[4];
- tmp = QString(m_thousands['Q']) + m_thousands['T'] + m_thousands['I'] +
+ tmp = TQString(m_thousands['Q']) + m_thousands['T'] + m_thousands['I'] +
m_thousands['$'] + m_thousands['O'];
tmp = config->readEntry("Thousand", tmp);
m_thousands['Q'] = tmp[0];
@@ -247,19 +247,19 @@ void MyMoneyQifProfile::saveProfile(void)
config->writeEntry("FilterFileType", m_filterFileType);
config->writeEntry("AttemptMatchDuplicates", m_attemptMatchDuplicates);
- QString tmp;
+ TQString tmp;
- tmp = QString(m_decimal['Q']) + m_decimal['T'] + m_decimal['I'] +
+ tmp = TQString(m_decimal['Q']) + m_decimal['T'] + m_decimal['I'] +
m_decimal['$'] + m_decimal['O'];
config->writeEntry("Decimal", tmp);
- tmp = QString(m_thousands['Q']) + m_thousands['T'] + m_thousands['I'] +
+ tmp = TQString(m_thousands['Q']) + m_thousands['T'] + m_thousands['I'] +
m_thousands['$'] + m_thousands['O'];
config->writeEntry("Thousand", tmp);
}
m_isDirty = false;
}
-void MyMoneyQifProfile::setProfileName(const QString& name)
+void MyMoneyQifProfile::setProfileName(const TQString& name)
{
if(m_profileName != name)
m_isDirty = true;
@@ -267,7 +267,7 @@ void MyMoneyQifProfile::setProfileName(const QString& name)
m_profileName = name;
}
-void MyMoneyQifProfile::setProfileDescription(const QString& desc)
+void MyMoneyQifProfile::setProfileDescription(const TQString& desc)
{
if(m_profileDescription != desc)
m_isDirty = true;
@@ -275,14 +275,14 @@ void MyMoneyQifProfile::setProfileDescription(const QString& desc)
m_profileDescription = desc;
}
-void MyMoneyQifProfile::setProfileType(const QString& type)
+void MyMoneyQifProfile::setProfileType(const TQString& type)
{
if(m_profileType != type)
m_isDirty = true;
m_profileType = type;
}
-void MyMoneyQifProfile::setOutputDateFormat(const QString& dateFormat)
+void MyMoneyQifProfile::setOutputDateFormat(const TQString& dateFormat)
{
if(m_dateFormat != dateFormat)
m_isDirty = true;
@@ -290,7 +290,7 @@ void MyMoneyQifProfile::setOutputDateFormat(const QString& dateFormat)
m_dateFormat = dateFormat;
}
-void MyMoneyQifProfile::setInputDateFormat(const QString& dateFormat)
+void MyMoneyQifProfile::setInputDateFormat(const TQString& dateFormat)
{
int j = -1;
if(dateFormat.length() > 0) {
@@ -302,7 +302,7 @@ void MyMoneyQifProfile::setInputDateFormat(const QString& dateFormat)
}
}
-void MyMoneyQifProfile::setApostropheFormat(const QString& apostropheFormat)
+void MyMoneyQifProfile::setApostropheFormat(const TQString& apostropheFormat)
{
if(m_apostropheFormat != apostropheFormat)
m_isDirty = true;
@@ -310,10 +310,10 @@ void MyMoneyQifProfile::setApostropheFormat(const QString& apostropheFormat)
m_apostropheFormat = apostropheFormat;
}
-void MyMoneyQifProfile::setAmountDecimal(const QChar& def, const QChar& chr)
+void MyMoneyQifProfile::setAmountDecimal(const TQChar& def, const TQChar& chr)
{
- QChar ch(chr);
- if(ch == QChar())
+ TQChar ch(chr);
+ if(ch == TQChar())
ch = ' ';
if(m_decimal[def] != ch)
@@ -322,10 +322,10 @@ void MyMoneyQifProfile::setAmountDecimal(const QChar& def, const QChar& chr)
m_decimal[def] = ch;
}
-void MyMoneyQifProfile::setAmountThousands(const QChar& def, const QChar& chr)
+void MyMoneyQifProfile::setAmountThousands(const TQChar& def, const TQChar& chr)
{
- QChar ch(chr);
- if(ch == QChar())
+ TQChar ch(chr);
+ if(ch == TQChar())
ch = ' ';
if(m_thousands[def] != ch)
@@ -334,21 +334,21 @@ void MyMoneyQifProfile::setAmountThousands(const QChar& def, const QChar& chr)
m_thousands[def] = ch;
}
-QChar MyMoneyQifProfile::amountDecimal(const QChar& def) const
+TQChar MyMoneyQifProfile::amountDecimal(const TQChar& def) const
{
- QChar chr = m_decimal[def];
+ TQChar chr = m_decimal[def];
return chr;
}
-QChar MyMoneyQifProfile::amountThousands(const QChar& def) const
+TQChar MyMoneyQifProfile::amountThousands(const TQChar& def) const
{
- QChar chr = m_thousands[def];
+ TQChar chr = m_thousands[def];
return chr;
}
-void MyMoneyQifProfile::setAccountDelimiter(const QString& delim)
+void MyMoneyQifProfile::setAccountDelimiter(const TQString& delim)
{
- QString txt(delim);
+ TQString txt(delim);
if(txt.isEmpty())
txt = " ";
@@ -360,23 +360,23 @@ void MyMoneyQifProfile::setAccountDelimiter(const QString& delim)
m_accountDelimiter = txt[0];
}
-void MyMoneyQifProfile::setOpeningBalanceText(const QString& txt)
+void MyMoneyQifProfile::setOpeningBalanceText(const TQString& txt)
{
if(m_openingBalanceText != txt)
m_isDirty = true;
m_openingBalanceText = txt;
}
-void MyMoneyQifProfile::setVoidMark(const QString& txt)
+void MyMoneyQifProfile::setVoidMark(const TQString& txt)
{
if(m_voidMark != txt)
m_isDirty = true;
m_voidMark = txt;
}
-QString MyMoneyQifProfile::accountDelimiter(void) const
+TQString MyMoneyQifProfile::accountDelimiter(void) const
{
- QString rc;
+ TQString rc;
switch(m_accountDelimiter[0]) {
case ' ':
@@ -389,47 +389,47 @@ QString MyMoneyQifProfile::accountDelimiter(void) const
return rc;
}
-QString MyMoneyQifProfile::date(const QDate& datein) const
+TQString MyMoneyQifProfile::date(const TQDate& datein) const
{
const char* format = m_dateFormat.latin1();
- QString buffer;
- QChar delim;
- int maskLen;
- char maskChar;
+ TQString buffer;
+ TQChar delim;
+ int tqmaskLen;
+ char tqmaskChar;
while(*format) {
switch(*format) {
case '%':
- maskLen = 0;
- maskChar = *++format;
- while(*format && *format == maskChar) {
- ++maskLen;
+ tqmaskLen = 0;
+ tqmaskChar = *++format;
+ while(*format && *format == tqmaskChar) {
+ ++tqmaskLen;
++format;
}
- switch(maskChar) {
+ switch(tqmaskChar) {
case 'd':
if(delim)
buffer += delim;
- buffer += QString::number(datein.day()).rightJustify(2, '0');
+ buffer += TQString::number(datein.day()).rightJustify(2, '0');
break;
case 'm':
if(delim)
buffer += delim;
- if(maskLen == 3)
+ if(tqmaskLen == 3)
buffer += KGlobal::locale()->calendar()->monthName(datein.month(), datein.year(), true);
else
- buffer += QString::number(datein.month()).rightJustify(2, '0');
+ buffer += TQString::number(datein.month()).rightJustify(2, '0');
break;
case 'y':
- if(maskLen == 2) {
+ if(tqmaskLen == 2) {
buffer += twoDigitYear(delim, datein.year());
} else {
if(delim)
buffer += delim;
- buffer += QString::number(datein.year());
+ buffer += TQString::number(datein.year());
}
break;
default:
@@ -449,13 +449,13 @@ QString MyMoneyQifProfile::date(const QDate& datein) const
return buffer;
}
-const QDate MyMoneyQifProfile::date(const QString& datein) const
+const TQDate MyMoneyQifProfile::date(const TQString& datein) const
{
// in case we don't know the format, we return an invalid date
if(d->m_partPos.count() != 3)
- return QDate();
+ return TQDate();
- QValueVector<QString> scannedParts(3);
+ TQValueVector<TQString> scannedParts(3);
d->dissectDate(scannedParts, datein);
int yr, mon, day;
@@ -463,7 +463,7 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
yr = scannedParts[d->m_partPos['y']].toInt();
mon = scannedParts[d->m_partPos['m']].toInt(&ok);
if(!ok) {
- QStringList monthNames = QStringList::split(",", "jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec");
+ TQStringList monthNames = TQStringList::split(",", "jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec");
int j;
for(j = 1; j <= 12; ++j) {
if((KGlobal::locale()->calendar()->monthName(j, 2000, true).lower() == scannedParts[d->m_partPos['m']].lower())
@@ -474,7 +474,7 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
}
if(j == 13) {
qWarning("Unknown month '%s'", scannedParts[d->m_partPos['m']].data());
- return QDate();
+ return TQDate();
}
}
@@ -485,12 +485,12 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
else
yr += 1900;
}
- return QDate(yr, mon, day);
+ return TQDate(yr, mon, day);
#if 0
- QString scannedDelim[2];
- QString formatParts[3];
- QString formatDelim[2];
+ TQString scannedDelim[2];
+ TQString formatParts[3];
+ TQString formatDelim[2];
int part;
int delim;
unsigned int i,j;
@@ -501,8 +501,8 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
if(m_dateFormat[i] == '%') {
++part;
if(part == 3) {
- qWarning("MyMoneyQifProfile::date(const QString& datein) Too many parts in date format");
- return QDate();
+ qWarning("MyMoneyQifProfile::date(const TQString& datein) Too many parts in date format");
+ return TQDate();
}
++i;
}
@@ -517,15 +517,15 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
case '.':
case '\'':
if(delim == 2) {
- qWarning("MyMoneyQifProfile::date(const QString& datein) Too many delimiters in date format");
- return QDate();
+ qWarning("MyMoneyQifProfile::date(const TQString& datein) Too many delimiters in date format");
+ return TQDate();
}
formatDelim[delim] = m_dateFormat[i];
++delim;
break;
default:
- qWarning("MyMoneyQifProfile::date(const QString& datein) Invalid char in date format");
- return QDate();
+ qWarning("MyMoneyQifProfile::date(const TQString& datein) Invalid char in date format");
+ return TQDate();
}
}
@@ -540,8 +540,8 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
case '-':
case '\'':
if(delim == 2) {
- qWarning("MyMoneyQifProfile::date(const QString& datein) Too many delimiters in date field");
- return QDate();
+ qWarning("MyMoneyQifProfile::date(const TQString& datein) Too many delimiters in date field");
+ return TQDate();
}
scannedDelim[delim] = datein[i];
++delim;
@@ -557,7 +557,7 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
if(datein[i].isLetter())
prevWasChar = true;
// replace blank with 0
- scannedParts[part] += (datein[i] == ' ') ? QChar('0') : datein[i];
+ scannedParts[part] += (datein[i] == ' ') ? TQChar('0') : datein[i];
break;
}
}
@@ -568,14 +568,14 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
bool ok = false;
for(i = 0; i < 2; ++i) {
if(scannedDelim[i] != formatDelim[i]
- && scannedDelim[i] != QChar('\'')) {
- qWarning("MyMoneyQifProfile::date(const QString& datein) Invalid delimiter '%s' when '%s' was expected",
+ && scannedDelim[i] != TQChar('\'')) {
+ qWarning("MyMoneyQifProfile::date(const TQString& datein) Invalid delimiter '%s' when '%s' was expected",
scannedDelim[i].latin1(), formatDelim[i].latin1());
- return QDate();
+ return TQDate();
}
}
- QString msg;
+ TQString msg;
for(i = 0; i < 3; ++i) {
switch(formatParts[i][0].latin1()) {
case 'd':
@@ -610,7 +610,7 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
if(yr < 100) { // two digit year info
if(i > 1) {
ok = true;
- if(scannedDelim[i-1] == QChar('\'')) {
+ if(scannedDelim[i-1] == TQChar('\'')) {
if(m_apostropheFormat == "1900-1949") {
if(yr < 50)
yr += 1900;
@@ -648,24 +648,24 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const
ok = true;
}
} else {
- msg = QString("Length of year (%1) does not match expected length (%2).")
- .arg(scannedParts[i].length()).arg(formatParts[i].length());
+ msg = TQString("Length of year (%1) does not match expected length (%2).")
+ .tqarg(scannedParts[i].length()).tqarg(formatParts[i].length());
}
break;
}
if(!msg.isEmpty()) {
- qWarning("MyMoneyQifProfile::date(const QString& datein) %s",msg.latin1());
- return QDate();
+ qWarning("MyMoneyQifProfile::date(const TQString& datein) %s",msg.latin1());
+ return TQDate();
}
}
- return QDate(yr, mon, day);
+ return TQDate(yr, mon, day);
#endif
}
-QString MyMoneyQifProfile::twoDigitYear(const QChar delim, int yr) const
+TQString MyMoneyQifProfile::twoDigitYear(const TQChar delim, int yr) const
{
- QChar realDelim = delim;
- QString buffer;
+ TQChar realDelim = delim;
+ TQString buffer;
if(delim) {
if((m_apostropheFormat == "1900-1949" && yr <= 1949)
@@ -681,15 +681,15 @@ QString MyMoneyQifProfile::twoDigitYear(const QChar delim, int yr) const
if(yr < 10)
buffer += "0";
- buffer += QString::number(yr);
+ buffer += TQString::number(yr);
return buffer;
}
-QString MyMoneyQifProfile::value(const QChar& def, const MyMoneyMoney& valuein) const
+TQString MyMoneyQifProfile::value(const TQChar& def, const MyMoneyMoney& valuein) const
{
unsigned char _decimalSeparator;
unsigned char _thousandsSeparator;
- QString res;
+ TQString res;
_decimalSeparator = MyMoneyMoney::decimalSeparator();
_thousandsSeparator = MyMoneyMoney::thousandSeparator();
@@ -708,7 +708,7 @@ QString MyMoneyQifProfile::value(const QChar& def, const MyMoneyMoney& valuein)
return res;
}
-MyMoneyMoney MyMoneyQifProfile::value(const QChar& def, const QString& valuein) const
+MyMoneyMoney MyMoneyQifProfile::value(const TQChar& def, const TQString& valuein) const
{
unsigned char _decimalSeparator;
unsigned char _thousandsSeparator;
@@ -731,7 +731,7 @@ MyMoneyMoney MyMoneyQifProfile::value(const QChar& def, const QString& valuein)
return res;
}
-void MyMoneyQifProfile::setFilterScriptImport(const QString& script)
+void MyMoneyQifProfile::setFilterScriptImport(const TQString& script)
{
if(m_filterScriptImport != script)
m_isDirty = true;
@@ -739,7 +739,7 @@ void MyMoneyQifProfile::setFilterScriptImport(const QString& script)
m_filterScriptImport = script;
}
-void MyMoneyQifProfile::setFilterScriptExport(const QString& script)
+void MyMoneyQifProfile::setFilterScriptExport(const TQString& script)
{
if(m_filterScriptExport != script)
m_isDirty = true;
@@ -747,7 +747,7 @@ void MyMoneyQifProfile::setFilterScriptExport(const QString& script)
m_filterScriptExport = script;
}
-void MyMoneyQifProfile::setFilterFileType(const QString& txt)
+void MyMoneyQifProfile::setFilterFileType(const TQString& txt)
{
if(m_filterFileType != txt)
m_isDirty = true;
@@ -763,25 +763,25 @@ void MyMoneyQifProfile::setAttemptMatchDuplicates(bool f)
m_attemptMatchDuplicates = f;
}
-QString MyMoneyQifProfile::inputDateFormat(void) const
+TQString MyMoneyQifProfile::inputDateFormat(void) const
{
- QStringList list;
+ TQStringList list;
possibleDateFormats(list);
if(list.count() == 1)
return list.first();
- return QString();
+ return TQString();
}
-void MyMoneyQifProfile::possibleDateFormats(QStringList& list) const
+void MyMoneyQifProfile::possibleDateFormats(TQStringList& list) const
{
- QStringList defaultList = QStringList::split(":", "y,m,d:y,d,m:m,d,y:m,y,d:d,m,y:d,y,m");
+ TQStringList defaultList = TQStringList::split(":", "y,m,d:y,d,m:m,d,y:m,y,d:d,m,y:d,y,m");
list.clear();
- QStringList::const_iterator it_d;
+ TQStringList::const_iterator it_d;
for(it_d = defaultList.begin(); it_d != defaultList.end(); ++it_d) {
- QStringList parts = QStringList::split(",", *it_d);
+ TQStringList parts = TQStringList::split(",", *it_d);
int i;
for(i = 0; i < 3; ++i) {
- if(d->m_partPos.contains(parts[i][0])) {
+ if(d->m_partPos.tqcontains(parts[i][0])) {
if(d->m_partPos[parts[i][0]] != i)
break;
}
@@ -794,11 +794,11 @@ void MyMoneyQifProfile::possibleDateFormats(QStringList& list) const
}
// matches all tests
if(i == 3) {
- QString format = *it_d;
- format.replace('y', "%y");
- format.replace('m', "%m");
- format.replace('d', "%d");
- format.replace(',', " ");
+ TQString format = *it_d;
+ format.tqreplace('y', "%y");
+ format.tqreplace('m', "%m");
+ format.tqreplace('d', "%d");
+ format.tqreplace(',', " ");
list << format;
}
}
@@ -806,26 +806,26 @@ void MyMoneyQifProfile::possibleDateFormats(QStringList& list) const
// in this case, we present the full list and let the user decide
if(list.count() == 0) {
for(it_d = defaultList.begin(); it_d != defaultList.end(); ++it_d) {
- QString format = *it_d;
- format.replace('y', "%y");
- format.replace('m', "%m");
- format.replace('d', "%d");
- format.replace(',', " ");
+ TQString format = *it_d;
+ format.tqreplace('y', "%y");
+ format.tqreplace('m', "%m");
+ format.tqreplace('d', "%d");
+ format.tqreplace(',', " ");
list << format;
}
}
}
-void MyMoneyQifProfile::autoDetect(const QStringList& lines)
+void MyMoneyQifProfile::autoDetect(const TQStringList& lines)
{
- m_dateFormat = QString();
+ m_dateFormat = TQString();
m_decimal.clear();
m_thousands.clear();
- QString numericRecords = "BT$OIQ";
- QStringList::const_iterator it;
+ TQString numericRecords = "BT$OIQ";
+ TQStringList::const_iterator it;
int datesScanned = 0;
- // section: used to switch between different QIF sections,
+ // section: used to switch between different TQIF sections,
// because the Record identifiers are ambigous between sections
// eg. in transaction records, T identifies a total amount, in
// account sections it's the type.
@@ -835,11 +835,11 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines)
// 2 - transactions
// 3 - prices
int section = 0;
- QRegExp price("\"(.*)\",(.*),\"(.*)\"");
+ TQRegExp price("\"(.*)\",(.*),\"(.*)\"");
for(it = lines.begin(); it != lines.end(); ++it) {
- QChar c((*it)[0]);
+ TQChar c((*it)[0]);
if(c == '!') {
- QString sname = (*it).lower();
+ TQString sname = (*it).lower();
section = 0;
if(sname.startsWith("!account"))
section = 1;
@@ -863,7 +863,7 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines)
}
break;
case 2:
- if(numericRecords.contains(c)) {
+ if(numericRecords.tqcontains(c)) {
scanNumeric((*it).mid(1), m_decimal[c], m_thousands[c]);
} else if((c == 'D') && (m_dateFormat.isEmpty())) {
if(d->m_partPos.count() != 3) {
@@ -891,9 +891,9 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines)
// results are inaccurate which leads to a reduced number of
// date formats presented to choose from.
if(d->m_partPos.count() != 3 && datesScanned > 20) {
- QMap<int, int> sortedPos;
+ TQMap<int, int> sortedPos;
// make sure to reset the known parts for the following algorithm
- if(d->m_partPos.contains('y')) {
+ if(d->m_partPos.tqcontains('y')) {
d->m_changeCount[d->m_partPos['y']] = -1;
for(int i = 0; i < 3; ++i) {
if(d->m_partPos['y'] == i)
@@ -904,9 +904,9 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines)
}
}
}
- if(d->m_partPos.contains('d'))
+ if(d->m_partPos.tqcontains('d'))
d->m_changeCount[d->m_partPos['d']] = -1;
- if(d->m_partPos.contains('m'))
+ if(d->m_partPos.tqcontains('m'))
d->m_changeCount[d->m_partPos['m']] = -1;
for(int i = 0; i < 3; ++i) {
@@ -915,8 +915,8 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines)
}
}
- QMap<int, int>::const_iterator it_a;
- QMap<int, int>::const_iterator it_b;
+ TQMap<int, int>::const_iterator it_a;
+ TQMap<int, int>::const_iterator it_b;
switch(sortedPos.count()) {
case 1: // all the same
// let the user decide, we can't figure it out
@@ -962,10 +962,10 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines)
}
}
-void MyMoneyQifProfile::scanNumeric(const QString& txt, QChar& decimal, QChar& thousands) const
+void MyMoneyQifProfile::scanNumeric(const TQString& txt, TQChar& decimal, TQChar& thousands) const
{
- QChar first, second;
- QRegExp numericChars("[0-9-()]");
+ TQChar first, second;
+ TQRegExp numericChars("[0-9-()]");
for(unsigned int i = 0; i < txt.length(); ++i) {
if(numericChars.search(txt[i]) == -1) {
first = second;
@@ -978,10 +978,10 @@ void MyMoneyQifProfile::scanNumeric(const QString& txt, QChar& decimal, QChar& t
thousands = first;
}
-void MyMoneyQifProfile::scanDate(const QString& txt) const
+void MyMoneyQifProfile::scanDate(const TQString& txt) const
{
// extract the parts from the txt
- QValueVector<QString> parts(3); // the various parts of the date
+ TQValueVector<TQString> parts(3); // the various parts of the date
d->dissectDate(parts, txt);
// now analyse the parts
@@ -1003,7 +1003,7 @@ void MyMoneyQifProfile::scanDate(const QString& txt) const
}
// and if it's in between 12 and 32 and we already identified the
// position for the year it must be days
- if((value > 12) && (value < 32) && d->m_partPos.contains('y')) {
+ if((value > 12) && (value < 32) && d->m_partPos.tqcontains('y')) {
d->m_partPos['d'] = i;
}
}