From 91f9a68249d33dba25a2763ea89e73a219f8ad67 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 29 Sep 2018 12:17:35 +0200 Subject: ProfileEditor plugin: fix delete button --- plugins/ProfileEditor/profileeditorplugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins/ProfileEditor/profileeditorplugin.cpp') diff --git a/plugins/ProfileEditor/profileeditorplugin.cpp b/plugins/ProfileEditor/profileeditorplugin.cpp index b158d6b..dcdd320 100644 --- a/plugins/ProfileEditor/profileeditorplugin.cpp +++ b/plugins/ProfileEditor/profileeditorplugin.cpp @@ -33,5 +33,11 @@ QDialog *ProfileEditorPlugin::createWidget(QWidget *parent) auto newProfile = browser->loadProfile(id); widget->addProfile(newProfile.second); }); + + connect(widget, &ProfileManagerDialog::removeProfile, this, [this](const WebProfile *profile) { + const QString id = browser->getProfileManager()->id(profile); + browser->getProfileManager()->deleteProfile(id); + }); + return widget; } -- cgit v1.2.1