diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-09-29 12:17:35 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-09-29 12:40:10 +0200 |
commit | 91f9a68249d33dba25a2763ea89e73a219f8ad67 (patch) | |
tree | 768c1ba57dd38cd7ce0fc067b83e5b3847fd0a97 /plugins/ProfileEditor/profileeditorplugin.cpp | |
parent | Turn Session class into namespace (diff) | |
download | smolbote-91f9a68249d33dba25a2763ea89e73a219f8ad67.tar.xz |
ProfileEditor plugin: fix delete button
Diffstat (limited to 'plugins/ProfileEditor/profileeditorplugin.cpp')
-rw-r--r-- | plugins/ProfileEditor/profileeditorplugin.cpp | 6 |
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; } |