aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/widgets/pagemenu.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/webengine/widgets/pagemenu.cpp b/src/webengine/widgets/pagemenu.cpp
index efd176b..deff511 100644
--- a/src/webengine/widgets/pagemenu.cpp
+++ b/src/webengine/widgets/pagemenu.cpp
@@ -20,6 +20,7 @@
#include <QWidgetAction>
#include <bookmarks/bookmarkswidget.h>
#include <webprofile.h>
+#include "profilemanager.h"
PageMenu::PageMenu(WebView *parent)
: QMenu(tr("Page"), parent)
@@ -108,12 +109,13 @@ void PageMenu::updateLoadProfileMenu()
auto *browser = qobject_cast<Browser *>(qApp);
Q_CHECK_PTR(browser);
- for(const QString &name : browser->profiles()) {
- auto *profile = browser->profile(name);
- Q_CHECK_PTR(profile);
+ ProfileIterator it(ProfileManager::profileList());
+ while(it.hasNext()) {
+ it.next();
+ auto *profile =it.value();
+ auto *loadAction = loadProfile_menu->addAction(profile->name());
- auto *profileAction = loadProfile_menu->addAction(profile->name());
- connect(profileAction, &QAction::triggered, this, [this, profile]() {
+ connect(loadAction, &QAction::triggered, this, [=]() {
view->setProfile(profile);
});
}