aboutsummaryrefslogtreecommitdiff
path: root/plugins/ProfileEditor/profileeditorplugin.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-08-27 16:42:51 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-08-27 17:43:02 +0200
commit36dce3fd26194cdf6dbf1ba52cc27cfa1daae389 (patch)
tree23a3919fb67d33583c4bd5c889758bf196100b9a /plugins/ProfileEditor/profileeditorplugin.cpp
parentAdd BrowserInterface to simplify plugins a bit (diff)
downloadsmolbote-36dce3fd26194cdf6dbf1ba52cc27cfa1daae389.tar.xz
PluginEditor: implement add plugin action
Diffstat (limited to 'plugins/ProfileEditor/profileeditorplugin.cpp')
-rw-r--r--plugins/ProfileEditor/profileeditorplugin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/ProfileEditor/profileeditorplugin.cpp b/plugins/ProfileEditor/profileeditorplugin.cpp
index 5d5c18a..32b0b8d 100644
--- a/plugins/ProfileEditor/profileeditorplugin.cpp
+++ b/plugins/ProfileEditor/profileeditorplugin.cpp
@@ -28,5 +28,10 @@ QDialog *ProfileEditorPlugin::createWidget(QWidget *parent)
Q_CHECK_PTR(browser);
auto *widget = new ProfileManagerDialog(browser->profiles(), parent);
widget->setAttribute(Qt::WA_DeleteOnClose, true);
+
+ connect(widget, &ProfileManagerDialog::createProfile, this, [=](const QString &id) {
+ auto newProfile = browser->loadProfile(id);
+ widget->addProfile(newProfile.second);
+ });
return widget;
}