From f3a4607d6a722a862af0eb9747a15dcdf624b6fb Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 3 Nov 2019 00:18:10 +0200 Subject: Drop boost dependency - wrote not-invented-here config file parser and conf class - spent obscene amount of time plugging in said conf class --- src/subwindow/subwindow.cpp | 5 +++-- src/subwindow/subwindow.h | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/subwindow') diff --git a/src/subwindow/subwindow.cpp b/src/subwindow/subwindow.cpp index 31b49b9..869a453 100644 --- a/src/subwindow/subwindow.cpp +++ b/src/subwindow/subwindow.cpp @@ -22,7 +22,7 @@ #include "configuration.h" #include "webprofile.h" -SubWindow::SubWindow(const Configuration *config, QWidget *parent, Qt::WindowFlags flags) +SubWindow::SubWindow(QWidget *parent, Qt::WindowFlags flags) : QMdiSubWindow(parent, flags) , tabWidget(new TabWidget(this)) { @@ -34,7 +34,8 @@ SubWindow::SubWindow(const Configuration *config, QWidget *parent, Qt::WindowFla m_profile = WebProfile::defaultProfile(); - auto *fullScreen_shortcut = new QShortcut(QKeySequence(config->value("subwindow.shortcuts.fullscreen").value()), this); + Configuration config; + auto *fullScreen_shortcut = new QShortcut(QKeySequence(config.value("shortcuts.subwindow.fullscreen").value()), this); connect(fullScreen_shortcut, &QShortcut::activated, this, [=]() { auto *w = this->window(); if(w->isFullScreen()) diff --git a/src/subwindow/subwindow.h b/src/subwindow/subwindow.h index eb7973f..c4f96c0 100644 --- a/src/subwindow/subwindow.h +++ b/src/subwindow/subwindow.h @@ -16,7 +16,6 @@ class TabWidget; class WebView; class WebProfile; -class Configuration; class SubWindow : public QMdiSubWindow { Q_OBJECT @@ -28,7 +27,7 @@ public: bool refreshLocked = false; }; - explicit SubWindow(const Configuration *config, QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); + explicit SubWindow(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); ~SubWindow() override; int currentTabIndex() const; -- cgit v1.2.1