aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-12-15 21:21:01 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-12-15 21:21:01 +0100
commit930c972169249251ef238a454d0126f2b7fec2c5 (patch)
treec94de07dee48b089a04a412cbd1b0a76b7990ab3 /src/mainwindow.cpp
parentUsing Q_CHECK_PTR instead of Q_ASSERT on pointers (diff)
downloadsmolbote-930c972169249251ef238a454d0126f2b7fec2c5.tar.xz
WebView pageMenu implementation
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 70dc7ea..732bc70 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -74,11 +74,6 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> config, QWidget *parent) :
menuBar = new MainWindowMenuBar(config, this);
menuBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
- connect(menuBar->printAction(), &QAction::triggered, this, [&]() {
- const QString path = QFileDialog::getSaveFileName(this, tr("Print to PDF"), QDir::homePath(), tr("PDF files (*.pdf)"));
- m_currentView->page()->printToPdf(path);
- });
-
// Add the toolbars
// tabToolBar: main menu and tab list
tabToolBar->setMovable(m_config->value<bool>("browser.ui.tabtoolbarMovable").value());
@@ -290,7 +285,7 @@ void MainWindow::handleTabChanged(WebView *view)
connect(view, &WebView::urlChanged, m_addressBar, &UrlLineEdit::setUrl);
m_addressBar->setUrl(view->url());
- m_addressBar->pageAction()->setMenu(view->menu());
+ m_addressBar->pageAction()->setMenu(view->pageMenu());
connect(view, SIGNAL(titleChanged(QString)), this, SLOT(handleTitleUpdated(QString)));
connect(view, SIGNAL(linkHovered(QString)), ui->statusBar, SLOT(showMessage(QString)));