From ea8580cb181804a71725a510b3c33cbe322486b9 Mon Sep 17 00:00:00 2001 From: "Jason E. Hale" Date: Tue, 5 Jun 2018 21:51:55 +0000 Subject: Fix crash when editing or adding new transactions PR: 228752 Submitted by: Peter Obtained from: https://bugs.kde.org/show_bug.cgi?id=392735 --- finance/kmymoney/Makefile | 1 + .../patch-kmymoney_dialogs_transactioneditor.cpp | 13 ------------- .../files/patch-kmymoney_widgets_qwidgetcontainer.cpp | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 13 deletions(-) delete mode 100644 finance/kmymoney/files/patch-kmymoney_dialogs_transactioneditor.cpp create mode 100644 finance/kmymoney/files/patch-kmymoney_widgets_qwidgetcontainer.cpp (limited to 'finance') diff --git a/finance/kmymoney/Makefile b/finance/kmymoney/Makefile index 5aa1f6154792..37e43d8258fd 100644 --- a/finance/kmymoney/Makefile +++ b/finance/kmymoney/Makefile @@ -2,6 +2,7 @@ PORTNAME= kmymoney PORTVERSION= 5.0.1 +PORTREVISION= 1 CATEGORIES= finance kde MASTER_SITES= KDE/stable/${PORTNAME}/${PORTVERSION}/src diff --git a/finance/kmymoney/files/patch-kmymoney_dialogs_transactioneditor.cpp b/finance/kmymoney/files/patch-kmymoney_dialogs_transactioneditor.cpp deleted file mode 100644 index 3fb10f724f18..000000000000 --- a/finance/kmymoney/files/patch-kmymoney_dialogs_transactioneditor.cpp +++ /dev/null @@ -1,13 +0,0 @@ -Fix crash when adding a new schedule to scheduled transactions - ---- kmymoney/dialogs/transactioneditor.cpp.orig 2018-04-17 02:57:53 UTC -+++ kmymoney/dialogs/transactioneditor.cpp -@@ -178,7 +178,7 @@ void TransactionEditor::setup(QWidgetList& tabOrderWid - - // remove all unused widgets and don't forget to remove them - // from the tab order list as well -- d->m_editWidgets.removeOrphans(); -+ // d->m_editWidgets.removeOrphans(); - QWidgetList::iterator it_w; - const QWidgetList editWidgets(d->m_editWidgets.values()); - for (it_w = tabOrderWidgets.begin(); it_w != tabOrderWidgets.end();) { diff --git a/finance/kmymoney/files/patch-kmymoney_widgets_qwidgetcontainer.cpp b/finance/kmymoney/files/patch-kmymoney_widgets_qwidgetcontainer.cpp new file mode 100644 index 000000000000..e39d8d2882f9 --- /dev/null +++ b/finance/kmymoney/files/patch-kmymoney_widgets_qwidgetcontainer.cpp @@ -0,0 +1,19 @@ +Fix crash when editing transactions +https://bugs.kde.org/show_bug.cgi?id=392735 + +--- kmymoney/widgets/qwidgetcontainer.cpp.orig 2018-03-18 15:55:30 UTC ++++ kmymoney/widgets/qwidgetcontainer.cpp +@@ -51,9 +51,10 @@ void QWidgetContainer::removeOrphans() + if ((*it_w) && (*it_w)->parent()) + ++it_w; + else { +- delete(*it_w); +- remove(it_w.key()); +- it_w = begin(); ++ QWidget* const w = *it_w; ++ it_w = erase(it_w); ++ if (w) ++ w->deleteLater(); + } + } + } -- cgit v1.2.3