summaryrefslogtreecommitdiffstats
path: root/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp')
-rw-r--r--kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
index d24f9a4..eac5079 100644
--- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
+++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
@@ -22,13 +22,13 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qtextbrowser.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qcheckbox.h>
-#include <qtabwidget.h>
+#include <tqtextbrowser.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqcheckbox.h>
+#include <tqtabwidget.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -54,12 +54,12 @@
class KOnlineBankingSetupWizard::Private
{
public:
- QFile m_fpTrace;
- QTextStream m_trace;
+ TQFile m_fpTrace;
+ TQTextStream m_trace;
};
-KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(QWidget *parent, const char *name):
- KOnlineBankingSetupDecl(parent,name),
+KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(TQWidget *tqparent, const char *name):
+ KOnlineBankingSetupDecl(tqparent,name),
d(new Private),
m_fDone(false),
m_fInit(false),
@@ -79,8 +79,8 @@ KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(QWidget *parent, const char
tabLayout->insertWidget(0, new KListViewSearchLineWidget(m_listFi, tab, 0));
OfxPartner::setDirectory(locateLocal("appdata", ""));
- QStringList banks = OfxPartner::BankNames();
- QStringList::const_iterator it_bank = banks.begin();
+ TQStringList banks = OfxPartner::BankNames();
+ TQStringList::const_iterator it_bank = banks.begin();
while (it_bank != banks.end())
{
new KListViewItem( m_listFi, (*it_bank));
@@ -129,28 +129,28 @@ bool KOnlineBankingSetupWizard::finishFiPage(void)
if(m_selectionTab->currentPageIndex() == 0) {
// Get the fipids for the selected bank
- QListViewItem* item = m_listFi->currentItem();
+ TQListViewItem* item = m_listFi->currentItem();
if ( item )
{
- QString bank = item->text(0);
+ TQString bank = item->text(0);
m_textDetails->clear();
- m_textDetails->append(QString("<p>Details for %1:</p>").arg(bank));
- QStringList fipids = OfxPartner::FipidForBank(bank);
- QStringList::const_iterator it_fipid = fipids.begin();
+ m_textDetails->append(TQString("<p>Details for %1:</p>").tqarg(bank));
+ TQStringList fipids = OfxPartner::FipidForBank(bank);
+ TQStringList::const_iterator it_fipid = fipids.begin();
while ( it_fipid != fipids.end() )
{
// For each fipid, get the connection details
info = OfxPartner::ServiceInfo(*it_fipid);
// Print them to the text browser
- QString message = QString("<p>Fipid: %1<br>").arg(*it_fipid);
+ TQString message = TQString("<p>Fipid: %1<br>").tqarg(*it_fipid);
// If the bank supports retrieving statements
if ( info.accountlist )
{
m_bankInfo.push_back(info);
- message += QString("URL: %1<br>Org: %2<br>Fid: %3<br>").arg(info.url,info.org,info.fid);
+ message += TQString("URL: %1<br>Org: %2<br>Fid: %3<br>").tqarg(info.url,info.org,info.fid);
if ( info.statements )
message += i18n("Supports online statements<br>");
if ( info.investments )
@@ -180,12 +180,12 @@ bool KOnlineBankingSetupWizard::finishFiPage(void)
}
m_textDetails->clear();
- m_textDetails->append(QString("<p>Details for %1:</p>").arg(m_bankName->text()));
+ m_textDetails->append(TQString("<p>Details for %1:</p>").tqarg(m_bankName->text()));
memset(&info, 0, sizeof(OfxFiServiceInfo));
- strncpy(info.fid, m_fid->text().data(), OFX_FID_LENGTH-1);
+ strncpy(info.fid, m_fid->text().ascii(), OFX_FID_LENGTH-1);
strncpy(info.org, m_bankName->text().latin1(), OFX_ORG_LENGTH-1);
- strncpy(info.url, m_url->url().data(), OFX_URL_LENGTH-1);
+ strncpy(info.url, m_url->url().ascii(), OFX_URL_LENGTH-1);
info.accountlist = 1;
info.statements = 1;
info.billpay = 1;
@@ -193,8 +193,8 @@ bool KOnlineBankingSetupWizard::finishFiPage(void)
m_bankInfo.push_back(info);
- QString message;
- message += QString("URL: %1<br>Org: %2<br>Fid: %3<br>").arg(info.url,info.org,info.fid);
+ TQString message;
+ message += TQString("URL: %1<br>Org: %2<br>Fid: %3<br>").tqarg(info.url,info.org,info.fid);
if ( info.statements )
message += i18n("Supports online statements<br>");
if ( info.investments )
@@ -211,8 +211,8 @@ bool KOnlineBankingSetupWizard::finishLoginPage(void)
{
bool result = true;
- QString username = m_editUsername->text();
- QString password = m_editPassword->text();
+ TQString username = m_editUsername->text();
+ TQString password = m_editPassword->text();
m_listAccount->clear();
@@ -231,27 +231,27 @@ bool KOnlineBankingSetupWizard::finishLoginPage(void)
// pretend we're Quicken 2008
// http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-intuit-products/
// http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-microsoft-money/
- QString appId = m_appId->appId();
- QRegExp exp("(.*):(.*)");
+ TQString appId = m_appId->appId();
+ TQRegExp exp("(.*):(.*)");
if(exp.search(appId) != -1) {
strncpy(fi.appid, exp.cap(1).latin1(), OFX_APPID_LENGTH-1);
strncpy(fi.appver, exp.cap(2).latin1(), OFX_APPVER_LENGTH-1);
} else {
- strncpy(fi.appid, "QWIN", OFX_APPID_LENGTH-1);
+ strncpy(fi.appid, "TQWIN", OFX_APPID_LENGTH-1);
strncpy(fi.appver, "1700", OFX_APPVER_LENGTH-1);
}
- QString hver = m_headerVersion->headerVersion();
+ TQString hver = m_headerVersion->headerVersion();
strncpy(fi.header_version, hver.latin1(), OFX_HEADERVERSION_LENGTH-1);
#endif
// who owns this memory?!?!
char* request = libofx_request_accountinfo( &fi );
- KURL filename(QString("%1response.ofx").arg(locateLocal("appdata", "")));
- QByteArray req;
+ KURL filename(TQString("%1response.ofx").tqarg(locateLocal("appdata", "")));
+ TQByteArray req;
req.setRawData(request, strlen(request));
- OfxHttpsRequest("POST", (*m_it_info).url, req, QMap<QString, QString>(), filename, true);
+ OfxHttpsRequest("POST", (*m_it_info).url, req, TQMap<TQString, TQString>(), filename, true);
req.resetRawData(request, strlen(request));
LibofxContextPtr ctx = libofx_get_new_context();
@@ -296,7 +296,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo
if ( data.account_type_valid )
{
- QString type;
+ TQString type;
switch ( data.account_type )
{
case OfxAccountData::OFX_CHECKING: /**< A standard checking account */
@@ -348,7 +348,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo
kvps.setValue("fid",(*(pthis->m_it_info)).fid);
kvps.setValue("org",(*(pthis->m_it_info)).org);
kvps.setValue("fipid","");
- QListViewItem* item = pthis->m_listFi->currentItem();
+ TQListViewItem* item = pthis->m_listFi->currentItem();
if ( item )
kvps.setValue("bankname",item->text(0));
@@ -360,7 +360,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo
if(/* !kvps.value("bankid").isEmpty()
&& */ !kvps.value("uniqueId").isEmpty()) {
- kvps.setValue("kmmofx-acc-ref", QString("%1-%2").arg(kvps.value("bankid"), kvps.value("uniqueId")));
+ kvps.setValue("kmmofx-acc-ref", TQString("%1-%2").tqarg(kvps.value("bankid"), kvps.value("uniqueId")));
} else {
qDebug("Cannot setup kmmofx-acc-ref for '%s'", kvps.value("bankname").data());
}
@@ -375,15 +375,15 @@ int KOnlineBankingSetupWizard::ofxStatusCallback(struct OfxStatusData data, void
{
KOnlineBankingSetupWizard* pthis = reinterpret_cast<KOnlineBankingSetupWizard*>(pv);
- QString message;
+ TQString message;
if(data.code_valid==true)
{
- message += QString("#%1 %2: \"%3\"\n").arg(data.code).arg(data.name,data.description);
+ message += TQString("#%1 %2: \"%3\"\n").tqarg(data.code).tqarg(data.name,data.description);
}
if(data.server_message_valid==true){
- message += i18n("Server message: %1\n").arg(data.server_message);
+ message += i18n("Server message: %1\n").tqarg(data.server_message);
}
if(data.severity_valid==true){
@@ -391,10 +391,10 @@ int KOnlineBankingSetupWizard::ofxStatusCallback(struct OfxStatusData data, void
case OfxStatusData::INFO :
break;
case OfxStatusData::WARN :
- KMessageBox::detailedError( pthis, i18n("Your bank returned warnings when signing on"), i18n("WARNING %1").arg(message) );
+ KMessageBox::detailedError( pthis, i18n("Your bank returned warnings when signing on"), i18n("WARNING %1").tqarg(message) );
break;
case OfxStatusData::ERROR :
- KMessageBox::detailedError( pthis, i18n("Error signing onto your bank"), i18n("ERROR %1").arg(message) );
+ KMessageBox::detailedError( pthis, i18n("Error signing onto your bank"), i18n("ERROR %1").tqarg(message) );
break;
default:
break;
@@ -409,17 +409,17 @@ bool KOnlineBankingSetupWizard::chosenSettings( MyMoneyKeyValueContainer& settin
if ( m_fDone )
{
- QListViewItem* qitem = m_listAccount->currentItem();
+ TQListViewItem* qitem = m_listAccount->currentItem();
ListViewItem* item = dynamic_cast<ListViewItem*>(qitem);
if ( item )
{
settings = *item;
settings.deletePair("appId");
settings.deletePair("kmmofx-headerVersion");
- QString appId = m_appId->appId();
+ TQString appId = m_appId->appId();
if(!appId.isEmpty())
settings.setValue("appId", appId);
- QString hVer = m_headerVersion->headerVersion();
+ TQString hVer = m_headerVersion->headerVersion();
if(!hVer.isEmpty())
settings.setValue("kmmofx-headerVersion", hVer);
result = true;
@@ -429,8 +429,8 @@ bool KOnlineBankingSetupWizard::chosenSettings( MyMoneyKeyValueContainer& settin
return result;
}
-KOnlineBankingSetupWizard::ListViewItem::ListViewItem( QListView* parent, const MyMoneyKeyValueContainer& kvps ):
- MyMoneyKeyValueContainer( kvps ), QListViewItem( parent )
+KOnlineBankingSetupWizard::ListViewItem::ListViewItem( TQListView* tqparent, const MyMoneyKeyValueContainer& kvps ):
+ MyMoneyKeyValueContainer( kvps ), TQListViewItem( tqparent )
{
setText( 0, value("accountid") );
setText( 1, value("type") );