[kmymoney] 4.6.3-6
Rex Dieter
rdieter at fedoraproject.org
Wed Apr 24 18:32:43 UTC 2013
commit 8d984d2d16a06bc32e4e58af53c69cea0e2b6359
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Wed Apr 24 13:32:41 2013 -0500
4.6.3-6
- pull in a bunch of 4.6 branch fixes, in particular...
- 0020-Fix-build-with-GMP-5.1.0.patch
...estment-accounts-handling-in-the-institut.patch | 53 +++++++
...he-child-accounts-if-there-are-any-otherw.patch | 38 +++++
...ake-Use-system-color-the-default-behavior.patch | 27 ++++
...light-background-color-for-warnings-since.patch | 35 +++++
...per-color-group-depending-on-the-focus-st.patch | 32 ++++
...ader-state-in-the-investment-view-s-lists.patch | 123 +++++++++++++++
...-when-cancelling-the-OFX-update-dialog-wh.patch | 31 ++++
...hat-all-transactions-have-a-valid-post-da.patch | 74 +++++++++
...ssible-crash-while-mapping-an-OFX-account.patch | 36 +++++
...gpgfile-needs-the-kdepimlibs-include-dirs.patch | 23 +++
...dded-definition-for-new-Azerbaijani-Manat.patch | 36 +++++
...tor-widget-when-online-source-is-selected.patch | 26 +++
...move-sensitive-information-from-anon-file.patch | 99 ++++++++++++
...t-is-opened-synchronously-do-it-in-a-safe.patch | 161 ++++++++++++++++++++
...egory-selection-actions-in-the-find-trans.patch | 29 ++++
0020-Fix-build-with-GMP-5.1.0.patch | 30 ++++
...KMyMoney-hangs-when-editing-transaction-i.patch | 30 ++++
kmymoney.spec | 38 +++++
18 files changed, 921 insertions(+), 0 deletions(-)
---
diff --git a/0002-Fix-the-investment-accounts-handling-in-the-institut.patch b/0002-Fix-the-investment-accounts-handling-in-the-institut.patch
new file mode 100644
index 0000000..69f23bd
--- /dev/null
+++ b/0002-Fix-the-investment-accounts-handling-in-the-institut.patch
@@ -0,0 +1,53 @@
+From f6659597570e3281cbd23449b39782b25c77963d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Thu, 15 Nov 2012 21:51:02 +0200
+Subject: [PATCH 02/22] Fix the investment accounts handling in the
+ institutions view. Make the investment accounts the only accounts that are
+ added to their parent in the institutions view. The rest of the accounts are
+ added at the first level because they don't inherit the institution from
+ their parent. Thanks to Allen for working on this.
+
+BUG: 309105
+(cherry picked from commit a5371f1e0ad7b42c7cfd1a2790108abbac96a732)
+---
+ kmymoney/models/accountsmodel.cpp | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/kmymoney/models/accountsmodel.cpp b/kmymoney/models/accountsmodel.cpp
+index c21c39d..37816f5 100644
+--- a/kmymoney/models/accountsmodel.cpp
++++ b/kmymoney/models/accountsmodel.cpp
+@@ -759,7 +759,10 @@ public:
+ }
+ QStandardItem *institutionItem = institutionItemFromId(model, institutionId);
+ QStandardItem *item = itemFromAccountId(institutionItem, account.id());
+- QStandardItem *parentAccounItem = itemFromAccountId(institutionItem, account.parentAccountId());
++ // only investment accounts are added to their parent in the institutions view
++ // this makes hierarchy maintenance a lot easier since the investment accounts
++ // are the only ones that always have the same institution as their parent
++ QStandardItem *parentAccounItem = account.isInvest() ? itemFromAccountId(institutionItem, account.parentAccountId()) : 0;
+ if (!item) {
+ item = new QStandardItem(account.name());
+ if (parentAccounItem) {
+@@ -876,7 +879,18 @@ void InstitutionsModel::slotObjectAdded(MyMoneyFile::notificationObjectT objType
+ if (!account || account->parentAccountId().isEmpty() || account->isIncomeExpense())
+ return;
+
++ // load the account into the institution
+ static_cast<InstitutionsPrivate *>(d)->loadInstitution(this, *account);
++
++ // load the investment sub-accounts if there are any - there could be sub-accounts if this is an add operation
++ // that was triggered in slotObjectModified on an already existing account which went trough a hierarchy change
++ QList<MyMoneyAccount> subAccounts;
++ d->m_file->accountList(subAccounts, account->accountList(), true);
++ for (QList<MyMoneyAccount>::ConstIterator it_a = subAccounts.constBegin(); it_a != subAccounts.constEnd(); ++it_a) {
++ if ((*it_a).isInvest()) {
++ static_cast<InstitutionsPrivate *>(d)->loadInstitution(this, *it_a);
++ }
++ }
+ }
+
+ /**
+--
+1.8.1.4
+
diff --git a/0003-Only-load-the-child-accounts-if-there-are-any-otherw.patch b/0003-Only-load-the-child-accounts-if-there-are-any-otherw.patch
new file mode 100644
index 0000000..991a4f8
--- /dev/null
+++ b/0003-Only-load-the-child-accounts-if-there-are-any-otherw.patch
@@ -0,0 +1,38 @@
+From ff5ec06b2eee8b367a2bbd2a50f5c04de7fa45ee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Fri, 16 Nov 2012 08:49:18 +0200
+Subject: [PATCH 03/22] Only load the child accounts if there are any,
+ otherwise MyMoneyFile::accountList will return all accounts.
+
+BUG: 309105
+(cherry picked from commit e492b20918f569e218b65925b7f758aeef01d865)
+---
+ kmymoney/models/accountsmodel.cpp | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/kmymoney/models/accountsmodel.cpp b/kmymoney/models/accountsmodel.cpp
+index 37816f5..3679314 100644
+--- a/kmymoney/models/accountsmodel.cpp
++++ b/kmymoney/models/accountsmodel.cpp
+@@ -884,11 +884,13 @@ void InstitutionsModel::slotObjectAdded(MyMoneyFile::notificationObjectT objType
+
+ // load the investment sub-accounts if there are any - there could be sub-accounts if this is an add operation
+ // that was triggered in slotObjectModified on an already existing account which went trough a hierarchy change
+- QList<MyMoneyAccount> subAccounts;
+- d->m_file->accountList(subAccounts, account->accountList(), true);
+- for (QList<MyMoneyAccount>::ConstIterator it_a = subAccounts.constBegin(); it_a != subAccounts.constEnd(); ++it_a) {
+- if ((*it_a).isInvest()) {
+- static_cast<InstitutionsPrivate *>(d)->loadInstitution(this, *it_a);
++ if (!account->accountList().isEmpty()) {
++ QList<MyMoneyAccount> subAccounts;
++ d->m_file->accountList(subAccounts, account->accountList());
++ for (QList<MyMoneyAccount>::ConstIterator it_a = subAccounts.constBegin(); it_a != subAccounts.constEnd(); ++it_a) {
++ if ((*it_a).isInvest()) {
++ static_cast<InstitutionsPrivate *>(d)->loadInstitution(this, *it_a);
++ }
+ }
+ }
+ }
+--
+1.8.1.4
+
diff --git a/0004-Make-Use-system-color-the-default-behavior.patch b/0004-Make-Use-system-color-the-default-behavior.patch
new file mode 100644
index 0000000..385db52
--- /dev/null
+++ b/0004-Make-Use-system-color-the-default-behavior.patch
@@ -0,0 +1,27 @@
+From 576737baabcab31820e51918dab4b4186cc8fe56 Mon Sep 17 00:00:00 2001
+From: Thomas Baumgart <thb at net-bembel.de>
+Date: Mon, 19 Nov 2012 15:58:59 +0100
+Subject: [PATCH 04/22] Make 'Use system color' the default behavior
+
+BUG: 309010
+(cherry picked from commit ee1804f00cf94ea1a0b1ee1ddfa29e6c97110249)
+---
+ kmymoney/kmymoney.kcfg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kmymoney/kmymoney.kcfg b/kmymoney/kmymoney.kcfg
+index 9232285..9d865c9 100644
+--- a/kmymoney/kmymoney.kcfg
++++ b/kmymoney/kmymoney.kcfg
+@@ -231,7 +231,7 @@
+ </entry>
+ <entry name="useSystemColors" type="Bool">
+ <label>Use system colors</label>
+- <default>false</default>
++ <default>true</default>
+ </entry>
+ <entry name="listColor" type="Color">
+ <label>List color</label>
+--
+1.8.1.4
+
diff --git a/0005-Use-the-Higlight-background-color-for-warnings-since.patch b/0005-Use-the-Higlight-background-color-for-warnings-since.patch
new file mode 100644
index 0000000..5beac50
--- /dev/null
+++ b/0005-Use-the-Higlight-background-color-for-warnings-since.patch
@@ -0,0 +1,35 @@
+From aebfaec53af9760aacf4cdc20cbaa8126fac6892 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Wed, 21 Nov 2012 08:59:57 +0200
+Subject: [PATCH 05/22] Use the 'Higlight' background color for warnings since
+ the 'Infobackground' can be really close to the text color. If the same would
+ happen to the 'Higlight' background color we'll notice it a lot faster since
+ that is also used in the summary headers.
+
+REVIEW: 107397
+(cherry picked from commit ad1d684caf8a95f1be289647012b61b5833b04b8)
+---
+ kmymoney/html/kmymoney.css | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kmymoney/html/kmymoney.css b/kmymoney/html/kmymoney.css
+index e44ae0a..ab63d53 100644
+--- a/kmymoney/html/kmymoney.css
++++ b/kmymoney/html/kmymoney.css
+@@ -103,11 +103,11 @@ body#summaryview { /* set body attributes that affect only the summary view (and
+
+ .warningtitle { /*<tr> -set warning background color -overdue payments -items of this class also belong to the class called "itemtitle"*/
+ color:red;/*set programatically, not by css*/
+- background-color: infobackground;
++ background-color: HighLight;
+ }
+
+ .warning { /*<tr> -set warning background color -items of this class also belong to the class called "item"*/
+- background-color: infobackground;
++ background-color: HighLight;
+ }
+
+ th.left, td.left {/*rule to align table header and table data cells*/
+--
+1.8.1.4
+
diff --git a/0006-Use-the-proper-color-group-depending-on-the-focus-st.patch b/0006-Use-the-proper-color-group-depending-on-the-focus-st.patch
new file mode 100644
index 0000000..cdf909c
--- /dev/null
+++ b/0006-Use-the-proper-color-group-depending-on-the-focus-st.patch
@@ -0,0 +1,32 @@
+From b403a0e8f52a9e13321ebd98a89e6c7ccb135b3a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Wed, 21 Nov 2012 20:28:22 +0200
+Subject: [PATCH 06/22] Use the proper color group depending on the focus state
+ of the widget. This results in the same appearence of selected transactions
+ as in normal unfocused item views. (cherry picked from commit
+ d4040e9b8ea255708e3a0ebecd0259528c88e287)
+
+---
+ kmymoney/widgets/transaction.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/kmymoney/widgets/transaction.cpp b/kmymoney/widgets/transaction.cpp
+index 71166f5..ea454df 100644
+--- a/kmymoney/widgets/transaction.cpp
++++ b/kmymoney/widgets/transaction.cpp
+@@ -227,6 +227,12 @@ bool Transaction::paintRegisterCellSetup(QPainter *painter, QStyleOptionViewItem
+ option.state &= ~QStyle::State_HasFocus;
+ }
+
++ if (option.widget && option.widget->hasFocus()) {
++ option.palette.setCurrentColorGroup(QPalette::Active);
++ } else {
++ option.palette.setCurrentColorGroup(QPalette::Inactive);
++ }
++
+ if (index.column() == 0) {
+ option.viewItemPosition = QStyleOptionViewItemV4::Beginning;
+ } else if (index.column() == MaxColumns - 1) {
+--
+1.8.1.4
+
diff --git a/0007-Save-the-header-state-in-the-investment-view-s-lists.patch b/0007-Save-the-header-state-in-the-investment-view-s-lists.patch
new file mode 100644
index 0000000..8a50f31
--- /dev/null
+++ b/0007-Save-the-header-state-in-the-investment-view-s-lists.patch
@@ -0,0 +1,123 @@
+From d116fc872c0a6e3b0b4322fd26e884394cb4cc19 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Wed, 21 Nov 2012 21:04:32 +0200
+Subject: [PATCH 07/22] Save the header state in the investment view's lists.
+
+Since pretty much all the bigger item views in KMyMoney have a persistent header state make the investment view's lists behave in the same way.
+Fix the default sorting order in the 'Prices' and 'Update prices' dialogs since those are stand alone they don't have a persistent header state yet
+because they don't even have a persistent size.
+
+BUG: 310260
+(cherry picked from commit 7c972b7b2bc05f00fe8f3e03b3d7ef0570d20a66)
+---
+ kmymoney/dialogs/kequitypriceupdatedlg.cpp | 1 +
+ kmymoney/dialogs/kmymoneypricedlg.cpp | 1 +
+ kmymoney/views/kinvestmentview.cpp | 40 ++++++++++++++++--------------
+ 3 files changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/kmymoney/dialogs/kequitypriceupdatedlg.cpp b/kmymoney/dialogs/kequitypriceupdatedlg.cpp
+index ff96bab..177bc78 100644
+--- a/kmymoney/dialogs/kequitypriceupdatedlg.cpp
++++ b/kmymoney/dialogs/kequitypriceupdatedlg.cpp
+@@ -69,6 +69,7 @@ KEquityPriceUpdateDlg::KEquityPriceUpdateDlg(QWidget *parent, const QString& sec
+ headerList << i18n("Symbol") << i18nc("Equity name", "Name")
+ << i18n("Price") << i18n("Date");
+
++ lvEquityList->header()->setSortIndicator(0, Qt::AscendingOrder);
+ lvEquityList->setColumnWidth(NAME_COL, 125);
+
+ // This is a "get it up and running" hack. Will replace this in the future.
+diff --git a/kmymoney/dialogs/kmymoneypricedlg.cpp b/kmymoney/dialogs/kmymoneypricedlg.cpp
+index 0aa5af3..61d197b 100644
+--- a/kmymoney/dialogs/kmymoneypricedlg.cpp
++++ b/kmymoney/dialogs/kmymoneypricedlg.cpp
+@@ -60,6 +60,7 @@ KMyMoneyPriceDlg::KMyMoneyPriceDlg(QWidget* parent) :
+ m_searchWidget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
+ m_listLayout->insertWidget(0, m_searchWidget);
+
++ m_priceList->header()->setSortIndicator(0, Qt::AscendingOrder);
+ m_priceList->header()->setStretchLastSection(true);
+ m_priceList->setContextMenuPolicy(Qt::CustomContextMenu);
+
+diff --git a/kmymoney/views/kinvestmentview.cpp b/kmymoney/views/kinvestmentview.cpp
+index b3c13e8..8e407f8 100644
+--- a/kmymoney/views/kinvestmentview.cpp
++++ b/kmymoney/views/kinvestmentview.cpp
+@@ -71,6 +71,18 @@ KInvestmentView::KInvestmentView(QWidget *parent) :
+ {
+ setupUi(this);
+
++ // load the header state of the equities list
++ KConfigGroup grp = KGlobal::config()->group("KInvestmentView_Equities");
++ QByteArray columns;
++ columns = grp.readEntry("HeaderState", columns);
++ m_investmentsList->header()->restoreState(columns);
++
++ // load the header state of the securities list
++ grp = KGlobal::config()->group("KInvestmentView_Securities");
++ columns.clear();
++ columns = grp.readEntry("HeaderState", columns);
++ m_securitiesList->header()->restoreState(columns);
++
+ //first set up everything for the equities tab
+ d->m_filterProxyModel = new AccountNamesFilterProxyModel(this);
+ d->m_filterProxyModel->addAccountType(MyMoneyAccount::Investment);
+@@ -81,8 +93,6 @@ KInvestmentView::KInvestmentView(QWidget *parent) :
+
+ m_investmentsList->setContextMenuPolicy(Qt::CustomContextMenu);
+ m_investmentsList->setSortingEnabled(true);
+- //KConfigGroup grp = KGlobal::config()->group("Investment Settings");
+- //m_table->restoreLayout(grp);
+
+ for (int i = 0; i < MaxViewTabs; ++i)
+ d->m_needReload[i] = false;
+@@ -123,8 +133,16 @@ KInvestmentView::KInvestmentView(QWidget *parent) :
+
+ KInvestmentView::~KInvestmentView()
+ {
+- KConfigGroup grp = KGlobal::config()->group("Investment Settings");
+- //m_table->saveLayout(grp);
++ // save the header state of the equities list
++ KConfigGroup grp = KGlobal::config()->group("KInvestmentView_Equities");
++ QByteArray columns = m_investmentsList->header()->saveState();
++ grp.writeEntry("HeaderState", columns);
++
++ // save the header state of the securities list
++ grp = KGlobal::config()->group("KInvestmentView_Securities");
++ columns = m_securitiesList->header()->saveState();
++ grp.writeEntry("HeaderState", columns);
++
+ delete d;
+ }
+
+@@ -357,12 +375,6 @@ void KInvestmentView::loadInvestmentTab(void)
+ delete e;
+ }
+
+- //resize the column width
+- m_investmentsList->resizeColumnToContents(0);
+- m_investmentsList->resizeColumnToContents(1);
+- m_investmentsList->resizeColumnToContents(2);
+- m_investmentsList->resizeColumnToContents(3);
+-
+ // and tell everyone what's selected
+ emit accountSelected(d->m_account);
+ }
+@@ -449,14 +461,6 @@ void KInvestmentView::loadSecuritiesList(void)
+ }
+ m_securitiesList->setSortingEnabled(true);
+
+- //resize column width
+- m_securitiesList->resizeColumnToContents(1);
+- m_securitiesList->resizeColumnToContents(2);
+- m_securitiesList->resizeColumnToContents(3);
+- m_securitiesList->resizeColumnToContents(4);
+- m_securitiesList->resizeColumnToContents(5);
+- m_securitiesList->resizeColumnToContents(6);
+-
+ slotUpdateSecuritiesButtons();
+ }
+
+--
+1.8.1.4
+
diff --git a/0008-Fix-a-crash-when-cancelling-the-OFX-update-dialog-wh.patch b/0008-Fix-a-crash-when-cancelling-the-OFX-update-dialog-wh.patch
new file mode 100644
index 0000000..41dd42a
--- /dev/null
+++ b/0008-Fix-a-crash-when-cancelling-the-OFX-update-dialog-wh.patch
@@ -0,0 +1,31 @@
+From 53de8e5aedde8fd133d07aa7671088563c472b9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Thu, 22 Nov 2012 22:03:24 +0200
+Subject: [PATCH 08/22] Fix a crash when cancelling the OFX update dialog while
+ waiting for operations that occur until the TransferJob is created. These
+ operations can be things like waiting for KWallet, waiting for
+ libofx_request_statement, etc.
+
+BUG: 281728
+(cherry picked from commit 3b55cc66447b5013ae9f4f06b496e4c55384989d)
+---
+ kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp b/kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp
+index a256773..5dfa65a 100644
+--- a/kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp
++++ b/kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp
+@@ -219,7 +219,8 @@ void KOfxDirectConnectDlg::slotOfxFinished(KJob* /* e */)
+
+ void KOfxDirectConnectDlg::reject(void)
+ {
+- m_job->kill();
++ if (m_job)
++ m_job->kill();
+ if (m_tmpfile) {
+ m_tmpfile->close();
+ delete m_tmpfile;
+--
+1.8.1.4
+
diff --git a/0009-Make-sure-that-all-transactions-have-a-valid-post-da.patch b/0009-Make-sure-that-all-transactions-have-a-valid-post-da.patch
new file mode 100644
index 0000000..dcc7df2
--- /dev/null
+++ b/0009-Make-sure-that-all-transactions-have-a-valid-post-da.patch
@@ -0,0 +1,74 @@
+From 7f6279ce15de7be11362de28ff3d76be9643a515 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Sun, 25 Nov 2012 15:47:17 +0200
+Subject: [PATCH 09/22] Make sure that all transactions have a valid post date
+ when a consistency check is run.
+
+Also make sure that MyMoneyReport::validDateRange returns a valid
+date range no matter what data is in the file. This avoids having
+a run-away kmymoney process when opening reports.
+
+BUG: 310265
+(cherry picked from commit 7465f1bf1e11dd615aeb2a3ae8de04be44ac5713)
+---
+ kmymoney/mymoney/mymoneyfile.cpp | 11 +++++++++++
+ kmymoney/mymoney/mymoneyreport.cpp | 12 ++++++++++--
+ 2 files changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/kmymoney/mymoney/mymoneyfile.cpp b/kmymoney/mymoney/mymoneyfile.cpp
+index f837a0b..a6c2a77 100644
+--- a/kmymoney/mymoney/mymoneyfile.cpp
++++ b/kmymoney/mymoney/mymoneyfile.cpp
+@@ -34,6 +34,7 @@
+
+ #include <kdebug.h>
+ #include <klocale.h>
++#include <kglobal.h>
+
+ // ----------------------------------------------------------------------------
+ // Project Includes
+@@ -2001,6 +2002,16 @@ const QStringList MyMoneyFile::consistencyCheck(void)
+ t.modifySplit(s);
+ }
+ }
++
++ // make sure that the transaction's post date is valid
++ if (!t.postDate().isValid()) {
++ tChanged = true;
++ t.setPostDate(t.entryDate().isValid() ? t.entryDate() : QDate::currentDate());
++ rc << i18n(" * Transaction '%1' has an invalid post date.", t.id());
++ rc << i18n(" The post date was updated to '%1'.", KGlobal::locale()->formatDate(t.postDate(), KLocale::ShortDate));
++ ++problemCount;
++ }
++
+ if (tChanged) {
+ d->m_storage->modifyTransaction(t);
+ }
+diff --git a/kmymoney/mymoney/mymoneyreport.cpp b/kmymoney/mymoney/mymoneyreport.cpp
+index b58708a..f90deb9 100644
+--- a/kmymoney/mymoney/mymoneyreport.cpp
++++ b/kmymoney/mymoney/mymoneyreport.cpp
+@@ -205,10 +205,18 @@ void MyMoneyReport::validDateRange(QDate& _db, QDate& _de)
+
+ if (!list.isEmpty()) {
+ qSort(list);
++ // try to use the post dates
+ tmpBegin = list.front().postDate();
+ tmpEnd = list.back().postDate();
+- } else {
+- tmpBegin = QDate(QDate::currentDate().year(), 1, 1); // the first date in the file
++ // if the post dates are not valid try the entry dates
++ if (!tmpBegin.isValid())
++ tmpBegin = list.front().entryDate();
++ if (!tmpEnd.isValid())
++ tmpEnd = list.back().entryDate();
++ }
++ // make sure that we leave this function with valid dates no mather what
++ if (!tmpBegin.isValid() || !tmpEnd.isValid() || tmpBegin > tmpEnd) {
++ tmpBegin = QDate(QDate::currentDate().year(), 1, 1); // the first date in the file
+ tmpEnd = QDate(QDate::currentDate().year(), 12, 31); // the last date in the file
+ }
+ if (!_db.isValid())
+--
+1.8.1.4
+
diff --git a/0010-Fix-a-possible-crash-while-mapping-an-OFX-account.patch b/0010-Fix-a-possible-crash-while-mapping-an-OFX-account.patch
new file mode 100644
index 0000000..7330a41
--- /dev/null
+++ b/0010-Fix-a-possible-crash-while-mapping-an-OFX-account.patch
@@ -0,0 +1,36 @@
+From 326578a1ff79a83b748e6575cffd727521425b09 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Mon, 26 Nov 2012 21:27:33 +0200
+Subject: [PATCH 10/22] Fix a possible crash while mapping an OFX account.
+
+The possibility occurred because the event loop is running
+while the https request is performed. To avoid the crash
+disable the back button.
+
+BUG: 296681
+(cherry picked from commit 62c62948cad0841dc585146a7ad55ee533d86097)
+---
+ kmymoney/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/kmymoney/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp b/kmymoney/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
+index 8c3738b..8739ad4 100644
+--- a/kmymoney/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
++++ b/kmymoney/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
+@@ -326,7 +326,13 @@ bool KOnlineBankingSetupWizard::finishLoginPage(void)
+
+ KUrl filename(QString("%1response.ofx").arg(KStandardDirs::locateLocal("appdata", "")));
+ QByteArray req(libofx_request_accountinfo(&fi));
++ // because the event loop is running while the request is performed disable the back button
++ // (this function is not reentrant so the application might crash when back/next are used)
++ QAbstractButton *backButton = button(QWizard::BackButton);
++ bool backButtonState = backButton->isEnabled();
++ backButton->setEnabled(false);
+ OfxHttpsRequest(QString("POST"), KUrl((*m_it_info).url), req, QMap<QString, QString>(), filename, true);
++ backButton->setEnabled(backButtonState);
+
+ LibofxContextPtr ctx = libofx_get_new_context();
+ Q_CHECK_PTR(ctx);
+--
+1.8.1.4
+
diff --git a/0011-cmake-libkgpgfile-needs-the-kdepimlibs-include-dirs.patch b/0011-cmake-libkgpgfile-needs-the-kdepimlibs-include-dirs.patch
new file mode 100644
index 0000000..fdec768
--- /dev/null
+++ b/0011-cmake-libkgpgfile-needs-the-kdepimlibs-include-dirs.patch
@@ -0,0 +1,23 @@
+From 23d389d1725cf0242c039d5420f9c341112573cd Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino at kde.org>
+Date: Fri, 21 Dec 2012 10:51:36 +0100
+Subject: [PATCH 11/22] cmake: libkgpgfile needs the kdepimlibs include dirs
+
+(cherry picked from commit 4d9c5d330c892943111abc7af5bd5a39dea70ff7)
+---
+ libkgpgfile/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libkgpgfile/CMakeLists.txt b/libkgpgfile/CMakeLists.txt
+index 70ca2c8..61d9646 100644
+--- a/libkgpgfile/CMakeLists.txt
++++ b/libkgpgfile/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${GPGME_INCLUDES} ${Boost_INCLUDE_DIR} )
++INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${GPGME_INCLUDES} ${Boost_INCLUDE_DIR} ${KDEPIMLIBS_INCLUDE_DIRS} )
+
+ ########### next target ###############
+
+--
+1.8.1.4
+
diff --git a/0013-Added-definition-for-new-Azerbaijani-Manat.patch b/0013-Added-definition-for-new-Azerbaijani-Manat.patch
new file mode 100644
index 0000000..0d2d236
--- /dev/null
+++ b/0013-Added-definition-for-new-Azerbaijani-Manat.patch
@@ -0,0 +1,36 @@
+From 13d1e91640b7e01c14992f3c63f2c2c14c96088e Mon Sep 17 00:00:00 2001
+From: Thomas Baumgart <thb at net-bembel.de>
+Date: Sun, 23 Dec 2012 15:55:25 +0100
+Subject: [PATCH 13/22] Added definition for new Azerbaijani Manat
+
+BUG: 307774
+---
+ kmymoney/views/kmymoneyview.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/kmymoney/views/kmymoneyview.cpp b/kmymoney/views/kmymoneyview.cpp
+index 33fb611..2d2eda9 100644
+--- a/kmymoney/views/kmymoneyview.cpp
++++ b/kmymoney/views/kmymoneyview.cpp
+@@ -1508,7 +1508,7 @@ void KMyMoneyView::loadDefaultCurrencies(void)
+ loadDefaultCurrency(MyMoneySecurity("ARS", i18n("Argentine Peso"), "$"), create);
+ loadDefaultCurrency(MyMoneySecurity("AWG", i18n("Aruban Florin")), create);
+ loadDefaultCurrency(MyMoneySecurity("AUD", i18n("Australian Dollar"), "$"), create);
+- loadDefaultCurrency(MyMoneySecurity("AZM", i18n("Azerbaijani Manat")), create);
++ loadDefaultCurrency(MyMoneySecurity("AZN", i18n("Azerbaijani Manat"), "m."), create);
+ loadDefaultCurrency(MyMoneySecurity("BSD", i18n("Bahamian Dollar"), "$"), create);
+ loadDefaultCurrency(MyMoneySecurity("BHD", i18n("Bahraini Dinar"), "BHD", 1000, 1000), create);
+ loadDefaultCurrency(MyMoneySecurity("BDT", i18n("Bangladeshi Taka")), create);
+@@ -1730,6 +1730,9 @@ void KMyMoneyView::loadAncientCurrencies(void)
+
+ // Source: http://en.wikipedia.org/wiki/Mozambican_metical
+ loadAncientCurrency("MZM", i18n("Mozambique Metical"), "MT", QDate(2006, 7, 1), MyMoneyMoney(1, 1000), "MZN");
++
++ // Source https://en.wikipedia.org/wiki/Azerbaijani_manat
++ loadAncientCurrency("AZM", i18n("Azerbaijani Manat"), "m.", QDate(2006, 1, 1), MyMoneyMoney(1, 5000), "AZN");
+ }
+
+ void KMyMoneyView::viewUp(void)
+--
+1.8.1.4
+
diff --git a/0014-Enable-factor-widget-when-online-source-is-selected.patch b/0014-Enable-factor-widget-when-online-source-is-selected.patch
new file mode 100644
index 0000000..87f4cef
--- /dev/null
+++ b/0014-Enable-factor-widget-when-online-source-is-selected.patch
@@ -0,0 +1,26 @@
+From cdfa269352a4230f2b10ca98c9374f666065a868 Mon Sep 17 00:00:00 2001
+From: Thomas Baumgart <thb at net-bembel.de>
+Date: Wed, 26 Dec 2012 14:40:58 +0100
+Subject: [PATCH 14/22] Enable factor widget when online source is selected
+
+BUG: 281459
+(cherry picked from commit 328fc707b2a259367ac1a13a0987c39393ad6a2e)
+---
+ kmymoney/wizards/newinvestmentwizard/konlineupdatewizardpage.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/kmymoney/wizards/newinvestmentwizard/konlineupdatewizardpage.cpp b/kmymoney/wizards/newinvestmentwizard/konlineupdatewizardpage.cpp
+index eff20a7..47bceb0 100644
+--- a/kmymoney/wizards/newinvestmentwizard/konlineupdatewizardpage.cpp
++++ b/kmymoney/wizards/newinvestmentwizard/konlineupdatewizardpage.cpp
+@@ -45,6 +45,7 @@ KOnlineUpdateWizardPage::KOnlineUpdateWizardPage(QWidget *parent)
+ registerField("onlineFactor", m_onlineFactor, "value");
+ registerField("onlineSourceCombo", m_onlineSourceCombo, "currentText", SIGNAL(currentIndexChanged(QString)));
+ registerField("useFinanceQuote", m_useFinanceQuote);
++ connect(m_onlineSourceCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotCheckPage(QString)));
+ connect(m_onlineFactor, SIGNAL(textChanged(QString)),
+ this, SIGNAL(completeChanged()));
+
+--
+1.8.1.4
+
diff --git a/0015-Hide-remove-sensitive-information-from-anon-file.patch b/0015-Hide-remove-sensitive-information-from-anon-file.patch
new file mode 100644
index 0000000..cc1fe5a
--- /dev/null
+++ b/0015-Hide-remove-sensitive-information-from-anon-file.patch
@@ -0,0 +1,99 @@
+From ce4ffe14d522a87bbe6b394dab943cd7b8660044 Mon Sep 17 00:00:00 2001
+From: Thomas Baumgart <thb at net-bembel.de>
+Date: Wed, 26 Dec 2012 15:33:53 +0100
+Subject: [PATCH 15/22] Hide/remove sensitive information from anon file
+
+BUG: 309453
+(cherry picked from commit a6cb6feb8512385f21dd9b662579ff3b908f7a3a)
+---
+ kmymoney/mymoney/storage/mymoneystorageanon.cpp | 11 ++++++++++-
+ kmymoney/mymoney/storage/mymoneystorageanon.h | 3 +++
+ kmymoney/mymoney/storage/mymoneystoragexml.cpp | 7 ++++++-
+ kmymoney/mymoney/storage/mymoneystoragexml.h | 1 +
+ 4 files changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/kmymoney/mymoney/storage/mymoneystorageanon.cpp b/kmymoney/mymoney/storage/mymoneystorageanon.cpp
+index 0e7ebdd..a2c626e 100644
+--- a/kmymoney/mymoney/storage/mymoneystorageanon.cpp
++++ b/kmymoney/mymoney/storage/mymoneystorageanon.cpp
+@@ -253,7 +253,7 @@ void MyMoneyStorageANON::fakeBudget(MyMoneyBudget& bx)
+ {
+ MyMoneyBudget bn;
+
+- bn.setName(bx.name());
++ bn.setName(bx.id());
+ bn.setBudgetStart(bx.budgetStart());
+ bn = MyMoneyBudget(bx.id(), bn);
+
+@@ -290,5 +290,14 @@ void MyMoneyStorageANON::writeBudget(QDomElement& budgets, const MyMoneyBudget&
+ MyMoneyStorageXML::writeBudget(budgets, bn);
+ }
+
++void MyMoneyStorageANON::writeReport(QDomElement& reports, const MyMoneyReport& r)
++{
++ MyMoneyReport rn = r;
++
++ rn.setName(rn.id());
++ rn.setComment(hideString(rn.comment()));
++
++ MyMoneyStorageXML::writeReport(reports, rn);
++}
+
+ // vim:cin:si:ai:et:ts=2:sw=2:
+diff --git a/kmymoney/mymoney/storage/mymoneystorageanon.h b/kmymoney/mymoney/storage/mymoneystorageanon.h
+index 482fc9d..a346f79 100644
+--- a/kmymoney/mymoney/storage/mymoneystorageanon.h
++++ b/kmymoney/mymoney/storage/mymoneystorageanon.h
+@@ -78,12 +78,15 @@ protected:
+
+ void writeBudget(QDomElement& budgets, const MyMoneyBudget& b);
+
++ void writeReport(QDomElement& reports, const MyMoneyReport& r);
++
+ void readFile(QIODevice* s, IMyMoneySerialize* storage);
+
+ void writeSecurity(QDomElement& securityElement, const MyMoneySecurity& security);
+
+ QDomElement findChildElement(const QString& name, const QDomElement& root);
+
++
+ private:
+ /**
+ * The list of key-value pairs to not modify
+diff --git a/kmymoney/mymoney/storage/mymoneystoragexml.cpp b/kmymoney/mymoney/storage/mymoneystoragexml.cpp
+index 88a02df..97be6fb 100644
+--- a/kmymoney/mymoney/storage/mymoneystoragexml.cpp
++++ b/kmymoney/mymoney/storage/mymoneystoragexml.cpp
+@@ -773,11 +773,16 @@ void MyMoneyStorageXML::writeReports(QDomElement& parent)
+ signalProgress(0, list.count(), i18n("Saving reports..."));
+ unsigned i = 0;
+ for (it = list.constBegin(); it != list.constEnd(); ++it) {
+- (*it).writeXML(*m_doc, parent);
++ writeReport(parent, (*it));
+ signalProgress(++i, 0);
+ }
+ }
+
++void MyMoneyStorageXML::writeReport(QDomElement& report, const MyMoneyReport& r)
++{
++ r.writeXML(*m_doc, report);
++}
++
+ void MyMoneyStorageXML::writeBudgets(QDomElement& parent)
+ {
+ const QList<MyMoneyBudget> list = m_storage->budgetList();
+diff --git a/kmymoney/mymoney/storage/mymoneystoragexml.h b/kmymoney/mymoney/storage/mymoneystoragexml.h
+index 126cf8c..26fd1ec 100644
+--- a/kmymoney/mymoney/storage/mymoneystoragexml.h
++++ b/kmymoney/mymoney/storage/mymoneystoragexml.h
+@@ -99,6 +99,7 @@ protected:
+ virtual void writeSchedule(QDomElement& scheduledTx, const MyMoneySchedule& tx);
+
+ virtual void writeReports(QDomElement& e);
++ virtual void writeReport(QDomElement& report, const MyMoneyReport& r);
+ virtual void writeBudgets(QDomElement& e);
+ virtual void writeBudget(QDomElement& budget, const MyMoneyBudget& b);
+
+--
+1.8.1.4
+
diff --git a/0016-When-KWallet-is-opened-synchronously-do-it-in-a-safe.patch b/0016-When-KWallet-is-opened-synchronously-do-it-in-a-safe.patch
new file mode 100644
index 0000000..a21a7df
--- /dev/null
+++ b/0016-When-KWallet-is-opened-synchronously-do-it-in-a-safe.patch
@@ -0,0 +1,161 @@
+From b0fc54586ba21048fb3cf510bf56a7dc55428ef6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Wed, 28 Nov 2012 22:09:28 +0200
+Subject: [PATCH 16/22] When KWallet is opened synchronously do it in a safe
+ way.
+
+BUG: 255764
+REVIEW: 107507
+(cherry picked from commit 6c88ffd84de50af557cc92dfe043adf9872606f8)
+---
+ kmymoney/kmymoney.cpp | 5 +++
+ .../ofximport/dialogs/konlinebankingstatus.cpp | 2 +-
+ .../ofximport/dialogs/mymoneyofxconnector.cpp | 44 +++++++++++++++++++---
+ .../ofximport/dialogs/mymoneyofxconnector.h | 7 ++++
+ kmymoney/plugins/ofximport/ofximporterplugin.cpp | 4 +-
+ 5 files changed, 53 insertions(+), 9 deletions(-)
+
+diff --git a/kmymoney/kmymoney.cpp b/kmymoney/kmymoney.cpp
+index 512b88f..03f9e44 100644
+--- a/kmymoney/kmymoney.cpp
++++ b/kmymoney/kmymoney.cpp
+@@ -3485,6 +3485,10 @@ void KMyMoneyApp::slotAccountEdit(void)
+ category = true;
+ break;
+ }
++
++ // set a status message so that the application can't be closed until the editing is done
++ slotStatusMsg(caption);
++
+ QString tid = file->openingBalanceTransaction(d->m_selectedAccount);
+ MyMoneyTransaction t;
+ MyMoneySplit s0, s1;
+@@ -3574,6 +3578,7 @@ void KMyMoneyApp::slotAccountEdit(void)
+ }
+
+ delete dlg;
++ ready();
+ } else {
+ QPointer<KEditLoanWizard> wizard = new KEditLoanWizard(d->m_selectedAccount);
+ connect(wizard, SIGNAL(newCategory(MyMoneyAccount&)), this, SLOT(slotCategoryNew(MyMoneyAccount&)));
+diff --git a/kmymoney/plugins/ofximport/dialogs/konlinebankingstatus.cpp b/kmymoney/plugins/ofximport/dialogs/konlinebankingstatus.cpp
+index faf7757..fbc09d4 100644
+--- a/kmymoney/plugins/ofximport/dialogs/konlinebankingstatus.cpp
++++ b/kmymoney/plugins/ofximport/dialogs/konlinebankingstatus.cpp
+@@ -104,7 +104,7 @@ KOnlineBankingStatus::KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *p
+ if (Wallet::keyDoesNotExist(Wallet::NetworkWallet(), Wallet::PasswordFolder(), key)) {
+ pwd = settings.value("password");
+ } else {
+- Wallet *wallet = Wallet::openWallet(Wallet::NetworkWallet(), qApp->activeWindow()->winId(), Wallet::Synchronous);
++ Wallet *wallet = openSynchronousWallet();
+ if (wallet) {
+ wallet->setFolder(Wallet::PasswordFolder());
+ wallet->readPassword(key, pwd);
+diff --git a/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.cpp b/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.cpp
+index 4fc0c0d..dfaf557 100644
+--- a/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.cpp
++++ b/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.cpp
+@@ -41,6 +41,7 @@
+ #include <kcombobox.h>
+ #include <kpassworddialog.h>
+ #include <KWallet/Wallet>
++#include <KMainWindow>
+
+ // ----------------------------------------------------------------------------
+ // Project Includes
+@@ -170,13 +171,8 @@ QString MyMoneyOfxConnector::password(void) const
+ QString key = OFX_PASSWORD_KEY(m_fiSettings.value("url"), m_fiSettings.value("uniqueId"));
+ QString pwd = m_fiSettings.value("password");
+
+- // make sure, we have a reference to an active window, otherwise use 0 as ID
+- WId winId = 0;
+- if (qApp->activeWindow())
+- winId = qApp->activeWindow()->winId();
+-
+ // now check for the wallet
+- Wallet *wallet = Wallet::openWallet(Wallet::NetworkWallet(), winId, Wallet::Synchronous);
++ Wallet *wallet = openSynchronousWallet();
+ if (wallet
+ && !Wallet::keyDoesNotExist(Wallet::NetworkWallet(), Wallet::PasswordFolder(), key)) {
+ wallet->setFolder(Wallet::PasswordFolder());
+@@ -763,3 +759,39 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone
+ return Tag("ERROR").element("DETAILS", "This transaction contains an unsupported action type");
+ }
+ #endif
++
++KWallet::Wallet *openSynchronousWallet()
++{
++ using KWallet::Wallet;
++
++ // first handle the simple case in which we already use the wallet but need the object again in
++ // this case the wallet access permission dialog will no longer appear so we don't need to pass
++ // a valid window id or do anything special since the function call should return immediately
++ const bool alreadyUsingTheWallet = Wallet::users(Wallet::NetworkWallet()).contains("KMyMoney");
++ if (alreadyUsingTheWallet) {
++ return Wallet::openWallet(Wallet::NetworkWallet(), 0, Wallet::Synchronous);
++ }
++
++ // search for a suitable parent for the wallet than needs to be deactivated while the
++ // wallet access permission dialog is not dismissed with either accept or reject
++ KWallet::Wallet *wallet = 0;
++ QWidget *parentWidgetForWallet = 0;
++ if (qApp->activeModalWidget()) {
++ parentWidgetForWallet = qApp->activeModalWidget();
++ } else if (qApp->activeWindow()) {
++ parentWidgetForWallet = qApp->activeWindow();
++ } else {
++ QList<KMainWindow *> mainWindowList = KMainWindow::memberList();
++ if (!mainWindowList.isEmpty())
++ parentWidgetForWallet = mainWindowList.front();
++ }
++ // only open the wallet synchronously if we have a valid parent otherwise crashes could occur
++ if (parentWidgetForWallet) {
++ // while the wallet is being opened disable the widget to prevent input processing
++ const bool enabled = parentWidgetForWallet->isEnabled();
++ parentWidgetForWallet->setEnabled(false);
++ wallet = Wallet::openWallet(Wallet::NetworkWallet(), parentWidgetForWallet->winId(), Wallet::Synchronous);
++ parentWidgetForWallet->setEnabled(enabled);
++ }
++ return wallet;
++}
+diff --git a/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.h b/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.h
+index 5538a5d..adc68f7 100644
+--- a/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.h
++++ b/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.h
+@@ -121,4 +121,11 @@ private:
+ MyMoneyKeyValueContainer m_fiSettings;
+ };
+
++// open a synchronous wallet in a safe way (the function is here because the wallet is only used in the OFX plugin)
++namespace KWallet
++{
++ class Wallet;
++}
++KWallet::Wallet *openSynchronousWallet();
++
+ #endif // OFXCONNECTOR_H
+diff --git a/kmymoney/plugins/ofximport/ofximporterplugin.cpp b/kmymoney/plugins/ofximport/ofximporterplugin.cpp
+index 2a82566..43c9bc8 100644
+--- a/kmymoney/plugins/ofximport/ofximporterplugin.cpp
++++ b/kmymoney/plugins/ofximport/ofximporterplugin.cpp
+@@ -69,7 +69,7 @@ public:
+ QStringList m_warnings;
+ QStringList m_errors;
+ KOnlineBankingStatus* m_statusDlg;
+- Wallet *m_wallet;
++ Wallet *m_wallet;
+ };
+
+
+@@ -622,7 +622,7 @@ MyMoneyKeyValueContainer OfxImporterPlugin::onlineBankingSettings(const MyMoneyK
+ kvp.deletePair("kmmofx-headerVersion");
+ kvp.deletePair("password");
+
+- d->m_wallet = Wallet::openWallet(Wallet::NetworkWallet(), d->m_statusDlg->winId(), Wallet::Synchronous);
++ d->m_wallet = openSynchronousWallet();
+ if (d->m_wallet && (d->m_wallet->hasFolder(KWallet::Wallet::PasswordFolder()) ||
+ d->m_wallet->createFolder(KWallet::Wallet::PasswordFolder())) &&
+ d->m_wallet->setFolder(KWallet::Wallet::PasswordFolder())) {
+--
+1.8.1.4
+
diff --git a/0019-Fix-the-category-selection-actions-in-the-find-trans.patch b/0019-Fix-the-category-selection-actions-in-the-find-trans.patch
new file mode 100644
index 0000000..48e76b3
--- /dev/null
+++ b/0019-Fix-the-category-selection-actions-in-the-find-trans.patch
@@ -0,0 +1,29 @@
+From ac6d1aee2d79103f538a57df7253ecca339a35eb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20One=C8=9B?= <onet.cristian at gmail.com>
+Date: Sat, 26 Jan 2013 11:36:06 +0200
+Subject: [PATCH 19/22] Fix the category selection actions in the find
+ transactions dialog. Call 'selectAllSubItems' only for the root category
+ items.
+
+BUG: 313874
+(cherry picked from commit 7a09b9a12368e39a7a1958989e36f5356e9b6278)
+---
+ kmymoney/widgets/kmymoneyaccountselector.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kmymoney/widgets/kmymoneyaccountselector.cpp b/kmymoney/widgets/kmymoneyaccountselector.cpp
+index 6e962c5..61a1120 100644
+--- a/kmymoney/widgets/kmymoneyaccountselector.cpp
++++ b/kmymoney/widgets/kmymoneyaccountselector.cpp
+@@ -111,7 +111,7 @@ void kMyMoneyAccountSelector::selectCategories(const bool income, const bool exp
+ for (; *it_v != 0; ++it_v) {
+ if ((*it_v)->text(0) == i18n("Income categories"))
+ selectAllSubItems(*it_v, income);
+- else
++ else if ((*it_v)->text(0) == i18n("Expense categories"))
+ selectAllSubItems(*it_v, expense);
+ }
+ emit stateChanged();
+--
+1.8.1.4
+
diff --git a/0020-Fix-build-with-GMP-5.1.0.patch b/0020-Fix-build-with-GMP-5.1.0.patch
new file mode 100644
index 0000000..eeefed9
--- /dev/null
+++ b/0020-Fix-build-with-GMP-5.1.0.patch
@@ -0,0 +1,30 @@
+From 2ef6aa38ae87c7685c9f32c0cabd0241d3a7a306 Mon Sep 17 00:00:00 2001
+From: Alex Merry <kde at randomguy3.me.uk>
+Date: Fri, 1 Feb 2013 15:31:54 +0000
+Subject: [PATCH 20/22] Fix build with GMP 5.1.0
+
+GMP 5.1.0 no longer has implicit conversions to mpz_class from mpq_class
+or mpf_class. So we have to have an explicit conversion.
+
+BUG: 312481
+(cherry picked from commit 77209f84a85360e98d2e805d412956a8f2a77db3)
+---
+ kmymoney/mymoney/mymoneymoney.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kmymoney/mymoney/mymoneymoney.cpp b/kmymoney/mymoney/mymoneymoney.cpp
+index 23620db..e3f90dc 100644
+--- a/kmymoney/mymoney/mymoneymoney.cpp
++++ b/kmymoney/mymoney/mymoneymoney.cpp
+@@ -164,7 +164,7 @@ QString MyMoneyMoney::formatMoney(const QString& currency, const int prec, bool
+ // be much better than using KGlobal::locale()->formatMoney.
+ bool bNegative = false;
+ mpz_class left = value / static_cast<MyMoneyMoney>(convertDenominator(d)).valueRef().get_den();
+- mpz_class right = (valueRef() - mpq_class(left)) * denom;
++ mpz_class right = mpz_class((valueRef() - mpq_class(left)) * denom);
+
+ if (right < 0) {
+ right = -right;
+--
+1.8.1.4
+
diff --git a/0022-BUG-316042-KMyMoney-hangs-when-editing-transaction-i.patch b/0022-BUG-316042-KMyMoney-hangs-when-editing-transaction-i.patch
new file mode 100644
index 0000000..1e01d27
--- /dev/null
+++ b/0022-BUG-316042-KMyMoney-hangs-when-editing-transaction-i.patch
@@ -0,0 +1,30 @@
+From d77a39f3f09993fe33ecd7bf75a41018ca982a8f Mon Sep 17 00:00:00 2001
+From: Allan Anderson <agander93 at gmail.com>
+Date: Fri, 29 Mar 2013 22:02:52 +0000
+Subject: [PATCH 22/22] BUG:316042 - KMyMoney hangs when editing transaction in
+ anon file. Fix problem when creating an Anon file, where a priceMode setting
+ in an investment or a stock account, was anonymized, resulting in looping in
+ InvestTransactionEditor::priceMode(void) on attempting to edit the account in
+ question. (cherry picked from commit
+ 240289fa0c3391dd71d0c13a44a43fa6fd8deaf7)
+
+---
+ kmymoney/mymoney/storage/mymoneystorageanon.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kmymoney/mymoney/storage/mymoneystorageanon.cpp b/kmymoney/mymoney/storage/mymoneystorageanon.cpp
+index a2c626e..da600a6 100644
+--- a/kmymoney/mymoney/storage/mymoneystorageanon.cpp
++++ b/kmymoney/mymoney/storage/mymoneystorageanon.cpp
+@@ -43,7 +43,7 @@
+ #include "mymoneyreport.h"
+ #include "mymoneyinstitution.h"
+
+-QStringList MyMoneyStorageANON::zKvpNoModify = QString("kmm-baseCurrency,PreferredAccount,Tax,fixed-interest,interest-calculation,payee,schedule,term,kmm-online-source,kmm-brokerage-account,lastStatementDate,kmm-sort-reconcile,kmm-sort-std,kmm-iconpos,mm-closed,payee,schedule,term,lastImportedTransactionDate,VatAccount,VatRate,kmm-matched-tx,Imported").split(',');
++QStringList MyMoneyStorageANON::zKvpNoModify = QString("kmm-baseCurrency,PreferredAccount,Tax,fixed-interest,interest-calculation,payee,schedule,term,kmm-online-source,kmm-brokerage-account,lastStatementDate,kmm-sort-reconcile,kmm-sort-std,kmm-iconpos,mm-closed,payee,schedule,term,lastImportedTransactionDate,VatAccount,VatRate,kmm-matched-tx,Imported,priceMode").split(',');
+ QStringList MyMoneyStorageANON::zKvpXNumber = QString("final-payment,loan-amount,periodic-payment,lastStatementBalance").split(',');
+
+
+--
+1.8.1.4
+
diff --git a/kmymoney.spec b/kmymoney.spec
index db9425b..60d2353 100644
--- a/kmymoney.spec
+++ b/kmymoney.spec
@@ -13,6 +13,27 @@ Source0: http://downloads.sourceforge.net/sourceforge/kmymoney2/kmymoney-%{versi
## upstreamable patches
## upstream patches
+%define git_patches 1
+%if 0%{?git_patches}
+BuildRequires: git-core
+%endif
+Patch102: 0002-Fix-the-investment-accounts-handling-in-the-institut.patch
+Patch103: 0003-Only-load-the-child-accounts-if-there-are-any-otherw.patch
+Patch104: 0004-Make-Use-system-color-the-default-behavior.patch
+Patch105: 0005-Use-the-Higlight-background-color-for-warnings-since.patch
+Patch106: 0006-Use-the-proper-color-group-depending-on-the-focus-st.patch
+Patch107: 0007-Save-the-header-state-in-the-investment-view-s-lists.patch
+Patch108: 0008-Fix-a-crash-when-cancelling-the-OFX-update-dialog-wh.patch
+Patch109: 0009-Make-sure-that-all-transactions-have-a-valid-post-da.patch
+Patch110: 0010-Fix-a-possible-crash-while-mapping-an-OFX-account.patch
+Patch111: 0011-cmake-libkgpgfile-needs-the-kdepimlibs-include-dirs.patch
+Patch113: 0013-Added-definition-for-new-Azerbaijani-Manat.patch
+Patch114: 0014-Enable-factor-widget-when-online-source-is-selected.patch
+Patch115: 0015-Hide-remove-sensitive-information-from-anon-file.patch
+Patch116: 0016-When-KWallet-is-opened-synchronously-do-it-in-a-safe.patch
+Patch119: 0019-Fix-the-category-selection-actions-in-the-find-trans.patch
+Patch120: 0020-Fix-build-with-GMP-5.1.0.patch
+Patch122: 0022-BUG-316042-KMyMoney-hangs-when-editing-transaction-i.patch
BuildRequires: boost-devel
BuildRequires: cppunit-devel
@@ -81,6 +102,19 @@ BuildArch: noarch
%prep
%setup -q -n kmymoney-%{version}
+%if 0%{?git_patches}
+git init
+if [ -z "$GIT_COMMITTER_NAME" ]; then
+git config user.email "kde at lists.fedoraproject.org"
+git config user.name "Fedora KDE SIG"
+fi
+git add .
+git commit -a -q -m "%{version} baseline."
+
+# Apply all the patches
+git am -p1 %{patches} < /dev/null
+%endif
+
## kdchart munging begin
sed -i.kdchart -e 's|ADD_SUBDIRECTORY( libkdchart )|#ADD_SUBDIRECTORY( libkdchart )|' CMakeLists.txt
sed -i.kdchart -e 's|kmm_kdchart|kdchart|' kmymoney/CMakeLists.txt
@@ -167,6 +201,10 @@ update-mime-database %{_kde4_datadir}/mime &> /dev/null ||:
%changelog
+* Wed Apr 24 2013 Rex Dieter <rdieter at fedoraproject.org> 4.6.3-6
+- pull in a bunch of 4.6 branch fixes, in particular...
+- 0020-Fix-build-with-GMP-5.1.0.patch
+
* Wed Apr 24 2013 Bill Nottingham <notting at redhat.com> 4.6.3-5
- rebuild (aqbanking)
More information about the scm-commits
mailing list