diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2019-06-04 11:34:31 +0300 |
---|---|---|
committer | Markus Goetz <markus@woboq.com> | 2019-06-04 13:17:44 +0300 |
commit | eb20205e3ab24097cb60b23260677a24ce6f0b19 (patch) | |
tree | f440a20c4848cf871fa198adb1a048bb3c68f74a /src/gui/notificationwidget.cpp | |
parent | e4cf449845b76b12fa01bd4214e486809cd832b9 (diff) |
NotificationWidget: Fix buttons being leaked and show top level
Happens when the activity is updated
QDialogButtonBox::removeButton does not delete the button, it just reparent
it to nullptr.
Issue #7185
Diffstat (limited to 'src/gui/notificationwidget.cpp')
-rw-r--r-- | src/gui/notificationwidget.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/notificationwidget.cpp b/src/gui/notificationwidget.cpp index 04573f74a..d2132856b 100644 --- a/src/gui/notificationwidget.cpp +++ b/src/gui/notificationwidget.cpp @@ -65,9 +65,7 @@ void NotificationWidget::setActivity(const Activity &activity) _ui._timeLabel->setText(tText); // always remove the buttons - foreach (auto button, _ui._buttonBox->buttons()) { - _ui._buttonBox->removeButton(button); - } + qDeleteAll(_buttons); _buttons.clear(); // display buttons for the links |