aboutsummaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-02-24 02:06:20 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-02-24 02:06:20 +0100
commit21552196c529cdc4e7112d2f09a80ab81c71207a (patch)
tree5bc9fe9f55da0775384b2449f7ee543cbe7afed2 /src/widgets
parentDownload manager (diff)
downloadsmolbote-21552196c529cdc4e7112d2f09a80ab81c71207a.tar.xz
Settings class rework
Using toml as format
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/webviewtabbar.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/widgets/webviewtabbar.cpp b/src/widgets/webviewtabbar.cpp
index db44bc9..745a7a5 100644
--- a/src/widgets/webviewtabbar.cpp
+++ b/src/widgets/webviewtabbar.cpp
@@ -19,7 +19,7 @@
******************************************************************************/
#include "webviewtabbar.h"
-#include "settings.h"
+#include "browser.h"
#include <QAction>
WebViewTabBar::WebViewTabBar(QWidget *parent) :
@@ -32,26 +32,25 @@ WebViewTabBar::WebViewTabBar(QWidget *parent) :
connect(this, SIGNAL(currentChanged(int)), this, SLOT(handleCurrentChanged(int)));
connect(this, SIGNAL(tabMoved(int,int)), this, SLOT(updateVectorArrangement(int,int)));
- Settings settings;
- if(settings.contains("shortcuts/tabClose")) {
+ if(sSettings->contains("shortcuts.tabClose")) {
QAction *tabCloseAction = new QAction(this);
- tabCloseAction->setShortcut(QKeySequence::fromString(settings.value("shortcuts/tabClose").toString()));
+ tabCloseAction->setShortcut(QKeySequence::fromString(sSettings->value("shortcuts.tabClose").toString()));
connect(tabCloseAction, &QAction::triggered, [this]() {
this->handleTabClose(currentIndex());
});
addAction(tabCloseAction);
}
- if(settings.contains("shortcuts/tabLeft")) {
+ if(sSettings->contains("shortcuts.tabLeft")) {
QAction *tabLeftAction = new QAction(this);
- tabLeftAction->setShortcut(QKeySequence::fromString(settings.value("shortcuts/tabLeft").toString()));
+ tabLeftAction->setShortcut(QKeySequence::fromString(sSettings->value("shortcuts.tabLeft").toString()));
connect(tabLeftAction, &QAction::triggered, [this]() {
this->setCurrentIndex(currentIndex()-1);
});
addAction(tabLeftAction);
}
- if(settings.contains("shortcuts/tabRight")) {
+ if(sSettings->contains("shortcuts.tabRight")) {
QAction *tabRightAction = new QAction(this);
- tabRightAction->setShortcut(QKeySequence::fromString(settings.value("shortcuts/tabRight").toString()));
+ tabRightAction->setShortcut(QKeySequence::fromString(sSettings->value("shortcuts.tabRight").toString()));
connect(tabRightAction, &QAction::triggered, [this]() {
this->setCurrentIndex(currentIndex()+1);
});