Commit 5361e4e4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix mem leak found by asan

parent 16c10074
Pipeline #25087 passed with stage
in 15 minutes and 20 seconds
...@@ -109,7 +109,7 @@ CertificateLineEdit::CertificateLineEdit(AbstractKeyListModel *model, ...@@ -109,7 +109,7 @@ CertificateLineEdit::CertificateLineEdit(AbstractKeyListModel *model,
mFilter(std::shared_ptr<KeyFilter>(filter)), mFilter(std::shared_ptr<KeyFilter>(filter)),
mEditStarted(false), mEditStarted(false),
mEditFinished(false), mEditFinished(false),
mLineAction(new QAction(nullptr)) mLineAction(new QAction(this))
{ {
setPlaceholderText(i18n("Please enter a name or email address...")); setPlaceholderText(i18n("Please enter a name or email address..."));
setClearButtonEnabled(true); setClearButtonEnabled(true);
...@@ -251,6 +251,7 @@ void CertificateLineEdit::dialogRequested() ...@@ -251,6 +251,7 @@ void CertificateLineEdit::dialogRequested()
} }
} }
} }
delete dlg;
updateKey(); updateKey();
} }
......
...@@ -183,8 +183,8 @@ CertificateSelectionDialog::Private::Private(CertificateSelectionDialog *qq) ...@@ -183,8 +183,8 @@ CertificateSelectionDialog::Private::Private(CertificateSelectionDialog *qq)
: q(qq), : q(qq),
ui(q) ui(q)
{ {
ui.tabWidget.setFlatModel(AbstractKeyListModel::createFlatKeyListModel()); ui.tabWidget.setFlatModel(AbstractKeyListModel::createFlatKeyListModel(q));
ui.tabWidget.setHierarchicalModel(AbstractKeyListModel::createHierarchicalKeyListModel()); ui.tabWidget.setHierarchicalModel(AbstractKeyListModel::createHierarchicalKeyListModel(q));
ui.tabWidget.connectSearchBar(&ui.searchBar); ui.tabWidget.connectSearchBar(&ui.searchBar);
connect(&ui.tabWidget, SIGNAL(currentViewChanged(QAbstractItemView*)), connect(&ui.tabWidget, SIGNAL(currentViewChanged(QAbstractItemView*)),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment