diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-09-05 16:17:50 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-09-05 23:07:42 +0300 |
commit | 6b0c8f7e769a141f13194cf341e888c9b49f294c (patch) | |
tree | 308895235933e1246759ffb540269a349d0ef151 /src/rekonqwindow.cpp | |
parent | UrlBar: add completer (diff) | |
download | rekonq-6b0c8f7e769a141f13194cf341e888c9b49f294c.tar.xz |
Add RekonqWindow tests
Diffstat (limited to 'src/rekonqwindow.cpp')
-rw-r--r-- | src/rekonqwindow.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/rekonqwindow.cpp b/src/rekonqwindow.cpp index f969622c..f9f26186 100644 --- a/src/rekonqwindow.cpp +++ b/src/rekonqwindow.cpp @@ -9,66 +9,10 @@ #include "rekonqwindow.hpp" #include "application.hpp" -#include "settings/settingsdialog.h" -#include "taskmanager.h" #include "ui_rekonqwindow.h" #include <rsettings.hpp> #include <rview.hpp> -#ifdef QT_DEBUG -#include "test/rview_fake.h" -#endif - -RekonqWindow::RekonqWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::RekonqWindow) -{ - ui->setupUi(this); - - connect(ui->tabs, &TabBar::currentChanged, this, [this](RekonqView *view) { - if (view == nullptr) { // last tab has been closed - close(); - return; - } - - ui->views->setCurrentWidget(view); - ui->urlBar->setCurrentView(view); - }); - connect(ui->tabs, &TabBar::removeView, this, [this](RekonqView *view) { ui->views->removeWidget(view); }); - - connect(ui->back, &QToolButton::clicked, this, [this]() { currentView()->back(); }); - connect(ui->forward, &QToolButton::clicked, this, [this]() { currentView()->forward(); }); - connect(ui->refresh, &QToolButton::clicked, this, [this]() { currentView()->refresh(); }); - connect(ui->home, &QToolButton::clicked, this, [this]() { loadUrl(rekonq::HomePage, rekonq::CurrentTab); }); - - // connect menu actions - // file menu -#ifdef QT_DEBUG - { - auto *actionNewDebugTab = new QAction(tr("New Debug Tab"), ui->menuFile); - connect(actionNewDebugTab, &QAction::triggered, this, [this]() { addView(new RekonqView_fake(this)); }); - ui->menuFile->insertAction(ui->actionNewTab, actionNewDebugTab); - } -#endif - connect(ui->actionNewTab, &QAction::triggered, this, - [this]() { loadUrl(rekonq::NewTabPage, rekonq::NewFocusedTab); }); - connect(ui->actionCloseTab, &QAction::triggered, this, - [this]() { emit ui->tabs->tabCloseRequested(ui->tabs->currentIndex()); }); - connect(ui->actionQuit, &QAction::triggered, qApp, &QApplication::quit); - // edit menu - // view menu - // history menu - // bookmarks menu - // settings menu - connect(ui->actionSettings, &QAction::triggered, this, - [this]() { (new SettingsDialog(Application::instance()->settings(), this))->show(); }); - connect(ui->actionTaskManager, &QAction::triggered, this, [this]() { (new TaskManager(this))->show(); }); - // help menu - connect(ui->actionAboutQt, &QAction::triggered, qApp, &QApplication::aboutQt); - - connect(ui->newTab, &QToolButton::clicked, ui->actionNewTab, &QAction::trigger); -} - -RekonqWindow::~RekonqWindow() { delete ui; } - // -------------------------------------------------------------------------------------------------- RekonqView *RekonqWindow::currentView() |