aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-06-08 15:00:22 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-06-08 15:00:22 +0200
commit99917ab581314f9517569401bc79e150e4ce0881 (patch)
treebed6fa884a0925e104f9e15c399c1b5e91683a2b /src/mainwindow
parentImprove plugin loading (diff)
downloadsmolbote-99917ab581314f9517569401bc79e150e4ce0881.tar.xz
Better profile loading
First load all profiles from profile.path, and then the profile.default if missing, after which set the default profile. Profile names and whether they're otr can be set by .profile name=string and otr=bool.
Diffstat (limited to 'src/mainwindow')
-rw-r--r--src/mainwindow/widgets/tabwidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mainwindow/widgets/tabwidget.cpp b/src/mainwindow/widgets/tabwidget.cpp
index 2858fb0..a3fcbdd 100644
--- a/src/mainwindow/widgets/tabwidget.cpp
+++ b/src/mainwindow/widgets/tabwidget.cpp
@@ -13,6 +13,7 @@
#include <QMenu>
#include <QTabBar>
#include "browser.h"
+#include <webprofile.h>
TabWidget::TabWidget(QWidget *parent)
: QTabWidget(parent)
@@ -62,10 +63,10 @@ TabWidget::TabWidget(QWidget *parent)
Q_CHECK_PTR(browser);
for(const QString &name : browser->profiles()) {
- auto *profileAction = loadProfile_menu->addAction(name);
auto *profile = browser->profile(name);
Q_CHECK_PTR(profile);
+ auto *profileAction = loadProfile_menu->addAction(profile->name());
connect(profileAction, &QAction::triggered, this, [this, profile]() {
int index = this->tabBar()->tabAt(mapFromGlobal(tabContextMenu->pos()));
auto *view = qobject_cast<WebView *>(this->widget(index));