diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
commit | fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch) | |
tree | 6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp | |
parent | dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff) | |
download | kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip |
TQt4 port kmymoney
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp')
-rw-r--r-- | kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp index 3db8fbc..9248854 100644 --- a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp @@ -22,10 +22,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qdir.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqlabel.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqtextstream.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -51,11 +51,11 @@ class KOfxDirectConnectDlg::Private { public: - QFile m_fpTrace; + TQFile m_fpTrace; }; -KOfxDirectConnectDlg::KOfxDirectConnectDlg(const MyMoneyAccount& account, QWidget *parent, const char *name) : - KOfxDirectConnectDlgDecl(parent, name), +KOfxDirectConnectDlg::KOfxDirectConnectDlg(const MyMoneyAccount& account, TQWidget *tqparent, const char *name) : + KOfxDirectConnectDlgDecl(tqparent, name), d(new Private), m_tmpfile(NULL), m_connector(account), @@ -76,19 +76,19 @@ void KOfxDirectConnectDlg::init(void) { show(); - QByteArray request = m_connector.statementRequest(); + TQByteArray request = m_connector.statementRequest(); // For debugging, dump out the request #if 0 - QFile g( "request.ofx" ); + TQFile g( "request.ofx" ); g.open( IO_WriteOnly ); - QTextStream(&g) << m_connector.url() << "\n" << QString(request); + TQTextStream(&g) << m_connector.url() << "\n" << TQString(request); g.close(); #endif - QDir homeDir(QDir::home()); + TQDir homeDir(TQDir::home()); if(homeDir.exists("ofxlog.txt")) { - d->m_fpTrace.setName(QString("%1/ofxlog.txt").arg(QDir::homeDirPath())); + d->m_fpTrace.setName(TQString("%1/ofxlog.txt").tqarg(TQDir::homeDirPath())); d->m_fpTrace.open(IO_WriteOnly | IO_Append); } @@ -98,7 +98,7 @@ void KOfxDirectConnectDlg::init(void) true ); if(d->m_fpTrace.isOpen()) { - QByteArray data = m_connector.url().utf8(); + TQByteArray data = m_connector.url().utf8(); d->m_fpTrace.writeBlock("url: ", 5); d->m_fpTrace.writeBlock(data, strlen(data)); d->m_fpTrace.writeBlock("\n", 1); @@ -109,22 +109,22 @@ void KOfxDirectConnectDlg::init(void) } m_job->addMetaData("content-type", "Content-type: application/x-ofx" ); - connect(m_job,SIGNAL(result(KIO::Job*)),this,SLOT(slotOfxFinished(KIO::Job*))); - connect(m_job,SIGNAL(data(KIO::Job*, const QByteArray&)),this,SLOT(slotOfxData(KIO::Job*,const QByteArray&))); - connect(m_job,SIGNAL(connected(KIO::Job*)),this,SLOT(slotOfxConnected(KIO::Job*))); + connect(m_job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotOfxFinished(KIO::Job*))); + connect(m_job,TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),this,TQT_SLOT(slotOfxData(KIO::Job*,const TQByteArray&))); + connect(m_job,TQT_SIGNAL(connected(KIO::Job*)),this,TQT_SLOT(slotOfxConnected(KIO::Job*))); - setStatus(QString("Contacting %1...").arg(m_connector.url())); + settqStatus(TQString("Contacting %1...").tqarg(m_connector.url())); kProgress1->setTotalSteps(3); kProgress1->setProgress(1); } -void KOfxDirectConnectDlg::setStatus(const QString& _status) +void KOfxDirectConnectDlg::settqStatus(const TQString& _status) { textLabel1->setText(_status); kdDebug(2) << "STATUS: " << _status << endl; } -void KOfxDirectConnectDlg::setDetails(const QString& _details) +void KOfxDirectConnectDlg::setDetails(const TQString& _details) { kdDebug(2) << "DETAILS: " << _details << endl; } @@ -133,34 +133,34 @@ void KOfxDirectConnectDlg::slotOfxConnected(KIO::Job*) { if ( m_tmpfile ) { -// throw new MYMONEYEXCEPTION(QString("Already connected, using %1.").arg(m_tmpfile->name())); +// throw new MYMONEYEXCEPTION(TQString("Already connected, using %1.").tqarg(m_tmpfile->name())); kdDebug(2) << "Already connected, using " << m_tmpfile->name() << endl; delete m_tmpfile; //delete otherwise we mem leak } m_tmpfile = new KTempFile(); - setStatus("Connection established, retrieving data..."); - setDetails(QString("Downloading data to %1...").arg(m_tmpfile->name())); + settqStatus("Connection established, retrieving data..."); + setDetails(TQString("Downloading data to %1...").tqarg(m_tmpfile->name())); kProgress1->advance(1); } -void KOfxDirectConnectDlg::slotOfxData(KIO::Job*,const QByteArray& _ba) +void KOfxDirectConnectDlg::slotOfxData(KIO::Job*,const TQByteArray& _ba) { if ( !m_tmpfile ) // throw new MYMONEYEXCEPTION("Not currently connected!!"); kdDebug(2) << "void ofxdcon::slotOfxData():: Not currently connected!" << endl; - *(m_tmpfile->textStream()) << QString(_ba); + *(m_tmpfile->textStream()) << TQString(_ba); if(d->m_fpTrace.isOpen()) { d->m_fpTrace.writeBlock(_ba, _ba.size()); } - setDetails(QString("Got %1 bytes").arg(_ba.size())); + setDetails(TQString("Got %1 bytes").tqarg(_ba.size())); } void KOfxDirectConnectDlg::slotOfxFinished(KIO::Job* /* e */) { kProgress1->advance(1); - setStatus("Completed."); + settqStatus("Completed."); if(d->m_fpTrace.isOpen()) { d->m_fpTrace.writeBlock("\nCompleted\n\n\n\n", 14); @@ -179,12 +179,12 @@ void KOfxDirectConnectDlg::slotOfxFinished(KIO::Job* /* e */) } else if ( m_job->isErrorPage() ) { - QString details; - QFile f( m_tmpfile->name() ); + TQString details; + TQFile f( m_tmpfile->name() ); if ( f.open( IO_ReadOnly ) ) { - QTextStream stream( &f ); - QString line; + TQTextStream stream( &f ); + TQString line; while ( !stream.atEnd() ) { details += stream.readLine(); // line of text excluding '\n' } @@ -217,7 +217,7 @@ void KOfxDirectConnectDlg::reject(void) delete m_tmpfile; m_tmpfile = NULL; } - QDialog::reject(); + TQDialog::reject(); } #include "kofxdirectconnectdlg.moc" |