summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter/webpricequote.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/converter/webpricequote.cpp')
-rw-r--r--kmymoney2/converter/webpricequote.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kmymoney2/converter/webpricequote.cpp b/kmymoney2/converter/webpricequote.cpp
index 0fab2b9..7f43686 100644
--- a/kmymoney2/converter/webpricequote.cpp
+++ b/kmymoney2/converter/webpricequote.cpp
@@ -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,11 +377,11 @@ 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()));
+ // 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;
}