File Improve-deletion-of-unused-widgets-in-transaction-editor.patch of Package kmymoney
From 2f823a4603f1d9c823f3498e74f3fa05960e2383 Mon Sep 17 00:00:00 2001
From: Thomas Baumgart <thb@net-bembel.de>
Date: Thu, 7 Jun 2018 09:44:08 +0200
Subject: Improve deletion of unused widgets in transaction editor
---
kmymoney/widgets/qwidgetcontainer.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kmymoney/widgets/qwidgetcontainer.cpp b/kmymoney/widgets/qwidgetcontainer.cpp
index 8144e32..734b4c9 100644
--- a/kmymoney/widgets/qwidgetcontainer.cpp
+++ b/kmymoney/widgets/qwidgetcontainer.cpp
@@ -51,9 +51,10 @@ void QWidgetContainer::removeOrphans()
if ((*it_w) && (*it_w)->parent())
++it_w;
else {
- remove(it_w.key());
- delete(*it_w);
- it_w = begin();
+ QWidget* const w = *it_w;
+ it_w = erase(it_w);
+ if (w)
+ w->deleteLater();
}
}
}
--
cgit v0.11.2