From b27e55b0bbba9a1678159abe44280e173374f971 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 16 Jun 2018 13:55:35 +0200 Subject: Sort .profile by time Remove ProfileInterface::setProfiles ProfileView: Add General tab ProfileView: some cleanup ProfileView: Add Cookies tab --- plugins/ProfileEditor/profileeditorplugin.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'plugins/ProfileEditor/profileeditorplugin.cpp') diff --git a/plugins/ProfileEditor/profileeditorplugin.cpp b/plugins/ProfileEditor/profileeditorplugin.cpp index 2e7b261..d13e819 100644 --- a/plugins/ProfileEditor/profileeditorplugin.cpp +++ b/plugins/ProfileEditor/profileeditorplugin.cpp @@ -9,7 +9,7 @@ #include "profileeditorplugin.h" #include "forms/profilemanagerdialog.h" #include "forms/profileview.h" -#include +#include #include QHash> ProfileEditorPlugin::commands() @@ -22,23 +22,22 @@ QHash> ProfileEditorPlugin::commands() }); hash.insert("list-profiles", [this]() -> int { - for(auto i = profiles->constBegin(); i != profiles->constEnd(); ++i) { - qDebug(" - %s", qUtf8Printable(i.key())); + for(const WebProfile *profile : qAsConst(profiles)) { + qDebug(" - %s", qUtf8Printable(profile->name())); } return 0; }); return hash; } -void ProfileEditorPlugin::setProfiles(QHash *profiles) -{ - Q_CHECK_PTR(profiles); - this->profiles = profiles; -} - QDialog *ProfileEditorPlugin::createWidget(QWidget *parent) { auto *widget = new ProfileManagerDialog(profiles, parent); widget->setAttribute(Qt::WA_DeleteOnClose, true); return widget; } + +void ProfileEditorPlugin::registerProfile(WebProfile *profile) +{ + profiles.append(profile); +} -- cgit v1.2.1