diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-01-02 17:28:32 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-01-02 17:28:32 +0100 |
commit | f2a7411df60840ccda1a9708b2d9bdcb28c15975 (patch) | |
tree | 494bb5b7f43336f12b38519c860712deb9fdd529 /src/mainwindow/mainwindow.cpp | |
parent | Configuration: fix homepath patching for value<QString> (diff) | |
download | smolbote-f2a7411df60840ccda1a9708b2d9bdcb28c15975.tar.xz |
Connect Developer Tools and View Source actions
Diffstat (limited to 'src/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/mainwindow/mainwindow.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp index 5358fb6..a5f1c90 100644 --- a/src/mainwindow/mainwindow.cpp +++ b/src/mainwindow/mainwindow.cpp @@ -35,37 +35,10 @@ #include <QStatusBar> #include <QToolBar> #include <QUrl> -#include <QVBoxLayout> #ifdef CONFIG_PLASMA_BLUR #include <KWindowEffects> #endif -inline QDialog *createDevToolsDialog(QWebEnginePage *page) -{ - Q_CHECK_PTR(page); - - auto *popup = new QDialog(nullptr); - popup->setWindowTitle(QObject::tr("Developer Tools")); - popup->setAttribute(Qt::WA_DeleteOnClose, true); - popup->resize(800, 600); - - auto *view = new QWebEngineView(popup); - auto *devPage = new QWebEnginePage(view); - - view->setPage(devPage); - page->setDevToolsPage(devPage); - - QObject::connect(popup, &QDialog::destroyed, [page]() { - page->setDevToolsPage(nullptr); - }); - - auto *l = new QVBoxLayout(popup); - l->setContentsMargins(0, 0, 0, 0); - l->addWidget(view); - - return popup; -} - MainWindow::MainWindow(const std::unique_ptr<Configuration> &config, QWidget *parent) : QMainWindow(parent) , configuration(config.get()) |