aboutsummaryrefslogtreecommitdiff
path: root/src/subwindow
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2019-11-03 00:18:10 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2019-11-03 00:20:41 +0200
commitf3a4607d6a722a862af0eb9747a15dcdf624b6fb (patch)
tree9885709cdff55a865be6c03c591a9757680b0396 /src/subwindow
parentChange spdlog from makedepends to depends (diff)
downloadsmolbote-f3a4607d6a722a862af0eb9747a15dcdf624b6fb.tar.xz
Drop boost dependency
- wrote not-invented-here config file parser and conf class - spent obscene amount of time plugging in said conf class
Diffstat (limited to 'src/subwindow')
-rw-r--r--src/subwindow/subwindow.cpp5
-rw-r--r--src/subwindow/subwindow.h3
2 files changed, 4 insertions, 4 deletions
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<QString>("subwindow.shortcuts.fullscreen").value()), this);
+ Configuration config;
+ auto *fullScreen_shortcut = new QShortcut(QKeySequence(config.value<QString>("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;