[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/office/kmymoney/kmymoney2/plugins/ofximport
From:       Laurent Montel <montel () kde ! org>
Date:       2009-05-18 6:52:50
Message-ID: 1242629570.425820.26112.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 969367 by mlaurent:

Port++


 M  +9 -6      dialogs/konlinebankingsetupwizard.cpp  
 M  +2 -2      dialogs/konlinebankingstatus.cpp  
 M  +10 -2     dialogs/konlinebankingstatus.h  
 M  +2 -2      dialogs/mymoneyofxconnector.cpp  
 M  +4 -4      ofxpartner.cpp  
 M  +2 -2      ofxpartner.h  


--- trunk/playground/office/kmymoney/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp \
#969366:969367 @@ -69,15 +69,18 @@
   m_headerVersion = new OfxHeaderVersion(m_headerVersionCombo, "");
 
   // fill the list view with banks
-  KProgressDialog* dlg = new KProgressDialog(this, 0, i18n("Loading banklist"), \
i18n("Getting list of banks from http://moneycentral.msn.com/\nThis may take some \
time depending on the available bandwidth."), true); +  KProgressDialog* dlg = new \
KProgressDialog(this, i18n("Loading banklist"), i18n("Getting list of banks from \
http://moneycentral.msn.com/\nThis may take some time depending on the available \
bandwidth.")); +  dlg->setModal( true );
   dlg->setAllowCancel(false);
   // force to show immediately as the call to OfxPartner::BankNames()
   // does not call the processEvents() loop
   dlg->setMinimumDuration(0);
   kapp->processEvents();
 
+  #warning "port to kde4"
+#if 0
   tabLayout->insertWidget(0, new K3ListViewSearchLineWidget(m_listFi, tab));
-
+#endif
   OfxPartner::setDirectory(KStandardDirs::locateLocal("appdata", ""));
   QStringList banks = OfxPartner::BankNames();
   QStringList::const_iterator it_bank = banks.begin();
@@ -183,9 +186,9 @@
     m_textDetails->append(QString("<p>Details for \
%1:</p>").arg(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().latin1(), OFX_FID_LENGTH-1);
     strncpy(info.org, m_bankName->text().toLatin1(), OFX_ORG_LENGTH-1);
-    strncpy(info.url, m_url->url(), OFX_URL_LENGTH-1);
+    strncpy(info.url, m_url->url().path().latin1(), OFX_URL_LENGTH-1);
     info.accountlist = 1;
     info.statements = 1;
     info.billpay = 1;
@@ -251,7 +254,7 @@
     KUrl filename(QString("%1response.ofx").arg(KStandardDirs::locateLocal("appdata", \
"")));  QByteArray req;
     req.setRawData(request, strlen(request));
-    OfxHttpsRequest("POST", (*m_it_info).url, req, QMap<QString, QString>(), \
filename, true); +    OfxHttpsRequest(QString( "POST" ), KUrl( (*m_it_info).url ), \
req, QMap<QString, QString>(), filename, true);  req.resetRawData(request, \
strlen(request));  
     LibofxContextPtr ctx = libofx_get_new_context();
@@ -260,7 +263,7 @@
     ofx_set_account_cb(ctx, ofxAccountCallback, this);
     ofx_set_status_cb(ctx, ofxStatusCallback, this);
     // Add resulting accounts to the account list
-    libofx_proc_file(ctx, filename.path(), AUTODETECT);
+    libofx_proc_file(ctx, filename.path().latin1(), AUTODETECT);
     libofx_free_context(ctx);
 
     ++m_it_info;
--- trunk/playground/office/kmymoney/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.cpp \
#969366:969367 @@ -46,8 +46,8 @@
 #include <libofx/libofx.h>
 #include "mymoneyofxconnector.h"
 
-KOnlineBankingStatus::KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget \
                *parent, const char *name) :
-  KOnlineBankingStatusDecl(parent,name),
+KOnlineBankingStatus::KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget \
*parent) : +  KOnlineBankingStatusDecl(parent),
   m_appId(0)
 {
   m_ledOnlineStatus->off();
--- trunk/playground/office/kmymoney/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.h \
#969366:969367 @@ -32,7 +32,7 @@
 // ----------------------------------------------------------------------------
 // Project Includes
 
-#include "konlinebankingstatusdecl.h"
+#include "ui_konlinebankingstatusdecl.h"
 class MyMoneyAccount;
 class OfxAppVersion;
 class OfxHeaderVersion;
@@ -41,11 +41,19 @@
   * @author Thomas Baumgart
   */
 
+class KOnlineBankingStatusDecl : public QWidget, public Ui::KOnlineBankingStatusDecl
+{
+public:
+  KOnlineBankingStatusDecl( QWidget *parent ) : QWidget( parent ) {
+    setupUi( this );
+  }
+};
+
 class KOnlineBankingStatus : public KOnlineBankingStatusDecl
 {
   Q_OBJECT
 public:
-  KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *parent=0, const char \
*name=0); +  KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *parent=0);
   ~KOnlineBankingStatus();
   const QString& appId(void) const;
   QString headerVersion(void) const;
--- trunk/playground/office/kmymoney/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.cpp \
#969366:969367 @@ -46,7 +46,7 @@
 #include <mymoneyinstitution.h>
 #include <mymoneykeyvaluecontainer.h>
 #include "mymoneyofxconnector.h"
-
+#include <kdeversion.h>
 OfxHeaderVersion::OfxHeaderVersion(KComboBox* combo, const QString& headerVersion) :
   m_combo(combo)
 {
@@ -296,7 +296,7 @@
   OfxAccountData account;
   memset(&account,0,sizeof(OfxAccountData));
 
-  if(iban().toLatin1() != 0) {
+  if(!iban().toLatin1().isEmpty()) {
     strncpy(account.bank_id,iban().toLatin1(),OFX_BANKID_LENGTH-1);
     strncpy(account.broker_id,iban().toLatin1(),OFX_BROKERID_LENGTH-1);
   }
--- trunk/playground/office/kmymoney/kmymoney2/plugins/ofximport/ofxpartner.cpp \
#969366:969367 @@ -134,7 +134,7 @@
   }
 }
 
-Q3ValueList<QString> BankNames(void)
+QStringList BankNames(void)
 {
   QMap<QString, QString> result;
 
@@ -148,10 +148,10 @@
   // Add Innovision
   result["Innovision"] = QString();
 
-  return result.keys();
+  return QStringList()<<result.keys();
 }
 
-Q3ValueList<QString> FipidForBank(const QString& bank)
+QStringList FipidForBank(const QString& bank)
 {
   QMap<QString, QString> result;
 
@@ -163,7 +163,7 @@
   if ( bank == "Innovision" )
     result["1"] = QString();
 
-  return result.keys();
+  return QStringList()<<result.keys();
 }
 
 QString extractNodeText(QDomElement& node, const QString& name)
--- trunk/playground/office/kmymoney/kmymoney2/plugins/ofximport/ofxpartner.h \
#969366:969367 @@ -55,8 +55,8 @@
 
   void ValidateIndexCache(void);
   OfxFiServiceInfo ServiceInfo(const QString& fipid);
-  Q3ValueList<QString> BankNames(void);
-  Q3ValueList<QString> FipidForBank(const QString& bank);
+  QStringList BankNames(void);
+  QStringList FipidForBank(const QString& bank);
 
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic