aboutsummaryrefslogtreecommitdiff
path: root/plugins/ProfileEditor/profileeditorplugin.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-29 12:17:35 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-29 12:40:10 +0200
commit91f9a68249d33dba25a2763ea89e73a219f8ad67 (patch)
tree768c1ba57dd38cd7ce0fc067b83e5b3847fd0a97 /plugins/ProfileEditor/profileeditorplugin.cpp
parentTurn Session class into namespace (diff)
downloadsmolbote-91f9a68249d33dba25a2763ea89e73a219f8ad67.tar.xz
ProfileEditor plugin: fix delete button
Diffstat (limited to 'plugins/ProfileEditor/profileeditorplugin.cpp')
-rw-r--r--plugins/ProfileEditor/profileeditorplugin.cpp6
1 files changed, 6 insertions, 0 deletions
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;
}