diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-08-27 16:42:51 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-08-27 17:43:02 +0200 |
commit | 36dce3fd26194cdf6dbf1ba52cc27cfa1daae389 (patch) | |
tree | 23a3919fb67d33583c4bd5c889758bf196100b9a /plugins/ProfileEditor/profileeditorplugin.cpp | |
parent | Add BrowserInterface to simplify plugins a bit (diff) | |
download | smolbote-36dce3fd26194cdf6dbf1ba52cc27cfa1daae389.tar.xz |
PluginEditor: implement add plugin action
Diffstat (limited to 'plugins/ProfileEditor/profileeditorplugin.cpp')
-rw-r--r-- | plugins/ProfileEditor/profileeditorplugin.cpp | 5 |
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; } |