Fix memory leaks

* Fixes a couple of memory leaks (although not dangerous in practice, since we are talking about objects with a lifetime up to the end of the application)
* Fixes heap use after free

PR #19650.
Closes #19632.
This commit is contained in:
Vladimir Golovnev 2023-09-27 08:00:20 +03:00 committed by GitHub
parent cacae42e5e
commit 46c1c9de65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -38,7 +38,7 @@
LineEdit::LineEdit(QWidget *parent)
: QLineEdit(parent)
{
auto *action = new QAction(UIThemeManager::instance()->getIcon(u"edit-find"_s), QString());
auto *action = new QAction(UIThemeManager::instance()->getIcon(u"edit-find"_s), QString(), this);
addAction(action, QLineEdit::LeadingPosition);
setClearButtonEnabled(true);