From 5fc206e11ea83a31e64a0359dc6d78f76d200499 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 18 Dec 2017 22:25:40 +0100 Subject: Some bugfixes --- src/widgets/webviewtabbar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/widgets/webviewtabbar.cpp') 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 #include #include - +#include #include -WebViewTabBar::WebViewTabBar(WebEngineProfile *profile, QWidget *parent) : +WebViewTabBar::WebViewTabBar(const std::shared_ptr &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("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("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("browser.shortcuts.tabRight").value()))); connect(tabRightShortcut, &QShortcut::activated, [this]() { this->setCurrentIndex(currentIndex()+1); }); -- cgit v1.2.1