aboutsummaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-09-27 11:44:05 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-09-27 11:44:05 +0200
commitef3ab866bc2d1c215eea90fba0651db7a6e87c43 (patch)
tree9c16f594bc3b20e6bf52a181126543ed826fe974 /src/widgets
parentPassing full arguments to running instance (diff)
downloadsmolbote-ef3ab866bc2d1c215eea90fba0651db7a6e87c43.tar.xz
Code cleanup
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/mainwindowmenubar.cpp12
-rw-r--r--src/widgets/webviewtabbar.cpp6
2 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/mainwindowmenubar.cpp b/src/widgets/mainwindowmenubar.cpp
index e69a207..95cb280 100644
--- a/src/widgets/mainwindowmenubar.cpp
+++ b/src/widgets/mainwindowmenubar.cpp
@@ -36,25 +36,25 @@ MainWindowMenuBar::MainWindowMenuBar(MainWindow *parent) :
// Browser menu
QMenu *browserMenu = new QMenu(qApp->applicationName(), this);
addMenu(browserMenu);
- browserMenu->addAction(tr("New Window"), parent, SLOT(newWindow()), QKeySequence::fromString(sSettings->value("window.shortcuts.windowNew").toString()));
- browserMenu->addAction(tr("New Tab"), parent, SLOT(newTab()), QKeySequence::fromString(sSettings->value("window.shortcuts.tabNew").toString()));
+ browserMenu->addAction(tr("New Window"), parent, SLOT(newWindow()), QKeySequence::fromString(browser->settings()->value("window.shortcuts.windowNew").toString()));
+ browserMenu->addAction(tr("New Tab"), parent, SLOT(newTab()), QKeySequence::fromString(browser->settings()->value("window.shortcuts.tabNew").toString()));
browserMenu->addSeparator();
browserMenu->addAction(tr("About"), parent, SLOT(about()), QKeySequence(tr("F1")));
browserMenu->addAction(tr("About Qt"), qApp, SLOT(aboutQt()));
browserMenu->addSeparator();
- browserMenu->addAction(tr("Quit"), qApp, SLOT(quit()), QKeySequence::fromString(sSettings->value("window.shortcuts.windowClose").toString()));
+ browserMenu->addAction(tr("Quit"), qApp, SLOT(quit()), QKeySequence::fromString(browser->settings()->value("window.shortcuts.windowClose").toString()));
// Tools menu
QMenu *toolsMenu = new QMenu(tr("Tools"), this);
addMenu(toolsMenu);
QAction *downloadsAction = toolsMenu->addAction(tr("Downloads"), Browser::instance()->downloads(), SLOT(show()));
downloadsAction->setParent(parent);
- downloadsAction->setShortcut(QKeySequence::fromString(sSettings->value("downloads.dialogShortcut").toString()));
+ downloadsAction->setShortcut(QKeySequence::fromString(browser->settings()->value("downloads.dialogShortcut").toString()));
QAction *bookmarksAction = toolsMenu->addAction(tr("Bookmarks"), Browser::instance()->bookmarks(), SLOT(show()));
bookmarksAction->setParent(parent);
- bookmarksAction->setShortcut(QKeySequence(sSettings->value("bookmarks.dialogShortcut").toString()));
+ bookmarksAction->setShortcut(QKeySequence(browser->settings()->value("bookmarks.dialogShortcut").toString()));
toolsMenu->addSeparator();
- toolsMenu->addAction(tr("Filter"), qApp->blocklists(), SLOT(show()), QKeySequence::fromString(sSettings->value("blocker.shortcut").toString()));
+ toolsMenu->addAction(tr("Filter"), browser->blocklists(), SLOT(show()), QKeySequence::fromString(browser->settings()->value("blocker.shortcut").toString()));
// Plugins
// if(qApp->plugin("")) {
diff --git a/src/widgets/webviewtabbar.cpp b/src/widgets/webviewtabbar.cpp
index 9264a2a..c52e323 100644
--- a/src/widgets/webviewtabbar.cpp
+++ b/src/widgets/webviewtabbar.cpp
@@ -40,19 +40,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(qApp->settings()->value("window.shortcuts.tabClose").toString()));
+ tabCloseShortcut->setKey(QKeySequence::fromString(browser->settings()->value("window.shortcuts.tabClose").toString()));
connect(tabCloseShortcut, &QShortcut::activated, [this]() {
this->removeTab(currentIndex());
});
QShortcut *tabLeftShortcut = new QShortcut(this);
- tabLeftShortcut->setKey(QKeySequence::fromString(qApp->settings()->value("window.shortcuts.tabLeft").toString()));
+ tabLeftShortcut->setKey(QKeySequence::fromString(browser->settings()->value("window.shortcuts.tabLeft").toString()));
connect(tabLeftShortcut, &QShortcut::activated, [this]() {
this->setCurrentIndex(currentIndex()-1);
});
QShortcut *tabRightShortcut = new QShortcut(this);
- tabRightShortcut->setKey(QKeySequence::fromString(qApp->settings()->value("window.shortcuts.tabRight").toString()));
+ tabRightShortcut->setKey(QKeySequence::fromString(browser->settings()->value("window.shortcuts.tabRight").toString()));
connect(tabRightShortcut, &QShortcut::activated, [this]() {
this->setCurrentIndex(currentIndex()+1);
});