aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/webviewtabbar.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-12-18 22:25:40 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-12-18 22:25:40 +0100
commit5fc206e11ea83a31e64a0359dc6d78f76d200499 (patch)
treea997cb1602599766fdaa908453ae2705e0a0691f /src/widgets/webviewtabbar.cpp
parentBasic adblock FilterRule (diff)
downloadsmolbote-5fc206e11ea83a31e64a0359dc6d78f76d200499.tar.xz
Some bugfixes
Diffstat (limited to 'src/widgets/webviewtabbar.cpp')
-rw-r--r--src/widgets/webviewtabbar.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/webviewtabbar.cpp b/src/widgets/webviewtabbar.cpp
index 0baf68a..81851f3 100644
--- a/src/widgets/webviewtabbar.cpp
+++ b/src/widgets/webviewtabbar.cpp
@@ -22,10 +22,10 @@
#include <QAction>
#include <QContextMenuEvent>
#include <QMenu>
-
+#include <settings/configuration.h>
#include <QShortcut>
-WebViewTabBar::WebViewTabBar(WebEngineProfile *profile, QWidget *parent) :
+WebViewTabBar::WebViewTabBar(const std::shared_ptr<Configuration> &config, WebEngineProfile *profile, QWidget *parent) :
QTabBar(parent)
{
m_profile = profile;
@@ -39,19 +39,19 @@ WebViewTabBar::WebViewTabBar(WebEngineProfile *profile, QWidget *parent) :
connect(this, SIGNAL(tabMoved(int,int)), this, SLOT(updateVectorArrangement(int,int)));
QShortcut *tabCloseShortcut = new QShortcut(this);
- //tabCloseShortcut->setKey(QKeySequence::fromString(browser->settings()->value("window.shortcuts.tabClose").toString()));
+ tabCloseShortcut->setKey(QKeySequence(QString::fromStdString(config->value<std::string>("browser.shortcuts.tabClose").value())));
connect(tabCloseShortcut, &QShortcut::activated, [this]() {
this->removeTab(currentIndex());
});
QShortcut *tabLeftShortcut = new QShortcut(this);
- //tabLeftShortcut->setKey(QKeySequence::fromString(browser->settings()->value("window.shortcuts.tabLeft").toString()));
+ tabLeftShortcut->setKey(QKeySequence(QString::fromStdString(config->value<std::string>("browser.shortcuts.tabLeft").value())));
connect(tabLeftShortcut, &QShortcut::activated, [this]() {
this->setCurrentIndex(currentIndex()-1);
});
QShortcut *tabRightShortcut = new QShortcut(this);
- //tabRightShortcut->setKey(QKeySequence::fromString(browser->settings()->value("window.shortcuts.tabRight").toString()));
+ tabRightShortcut->setKey(QKeySequence(QString::fromStdString(config->value<std::string>("browser.shortcuts.tabRight").value())));
connect(tabRightShortcut, &QShortcut::activated, [this]() {
this->setCurrentIndex(currentIndex()+1);
});