diff --git a/kmymoney/plugins/sql/mymoneystoragesql_p.h b/kmymoney/plugins/sql/mymoneystoragesql_p.h --- a/kmymoney/plugins/sql/mymoneystoragesql_p.h +++ b/kmymoney/plugins/sql/mymoneystoragesql_p.h @@ -1742,8 +1742,18 @@ } } */ + const bool isOnlineBanking = kvpType.toLower().compare(QLatin1String("onlinebanking")) == 0; while (query.next()) { - retval[query.value(0).toString()].setValue(query.value(1).toString(), query.value(2).toString()); + QString kvpId = query.value(0).toString(); + QString kvpKey = query.value(1).toString(); + QString kvpData = query.value(2).toString(); + if (isOnlineBanking) { + if ((kvpKey.toLower().compare(QLatin1String("provider")) == 0) + && (kvpData.toLower().compare(QLatin1String("kmymoney ofx")) == 0)) { + kvpData = QStringLiteral("ofximporter"); + } + } + retval[kvpId].setValue(kvpKey, kvpData); } return (retval); } diff --git a/kmymoney/plugins/xml/mymoneystoragexml.cpp b/kmymoney/plugins/xml/mymoneystoragexml.cpp --- a/kmymoney/plugins/xml/mymoneystoragexml.cpp +++ b/kmymoney/plugins/xml/mymoneystoragexml.cpp @@ -751,6 +751,12 @@ const auto it_attr = attributes.item(i).toAttr(); kvp.setValue(it_attr.name(), it_attr.value()); } + // Up to and including 4.8 the OFX importer plugin was called "KMyMoney OFX" + // From version 5 on it is called "ofximporter". So we update it here in + // case we find the 'old' name + if (kvp.value(QStringLiteral("provider")).toLower().compare(QLatin1String("kmymoney ofx")) == 0) { + kvp.setValue(QStringLiteral("provider"), QStringLiteral("ofximporter")); + } acc.setOnlineBankingSettings(kvp); }