diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-01 16:25:09 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-01 16:25:09 +0200 |
commit | c88b4129ffd06b9a230a2621cbcf3610905fc15c (patch) | |
tree | a26ba85d6788517feb33b5b15bd878650f9d6081 /plugins/ProfileEditor/profileeditorplugin.cpp | |
parent | Profile attributes (diff) | |
download | smolbote-c88b4129ffd06b9a230a2621cbcf3610905fc15c.tar.xz |
Add ProfileManagerDialog
Diffstat (limited to 'plugins/ProfileEditor/profileeditorplugin.cpp')
-rw-r--r-- | plugins/ProfileEditor/profileeditorplugin.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/ProfileEditor/profileeditorplugin.cpp b/plugins/ProfileEditor/profileeditorplugin.cpp index b5e772f..041dbe7 100644 --- a/plugins/ProfileEditor/profileeditorplugin.cpp +++ b/plugins/ProfileEditor/profileeditorplugin.cpp @@ -8,6 +8,7 @@ #include "profileeditorplugin.h" #include "forms/profileview.h" +#include "forms/profilemanagerdialog.h" #include <QHash> QHash<QString, std::function<int ()> > ProfileEditorPlugin::commands() @@ -20,9 +21,12 @@ QHash<QString, std::function<int ()> > ProfileEditorPlugin::commands() return hash; } -QDialog *ProfileEditorPlugin::createWidget(QWebEngineProfile *profile, QWidget *parent) +QDialog *ProfileEditorPlugin::createWidget(QHash<QString, QWebEngineProfile *> profiles, QWidget *parent) { - auto *widget = new ProfileView(profile, parent); + auto *widget = new ProfileManagerDialog(parent); + for(const QString &name : profiles.keys()) { + widget->addProfile(name, profiles.value(name)); + } widget->setAttribute(Qt::WA_DeleteOnClose, true); return widget; } |