diff options
-rw-r--r-- | LICENSE.md | 3 | ||||
-rw-r--r-- | lib/about/aboutdialog.cpp | 2 | ||||
-rw-r--r-- | src/mainwindow/widgets/navigationbar.cpp | 3 | ||||
-rw-r--r-- | src/webengine/webview.cpp | 12 | ||||
-rw-r--r-- | src/webengine/webview.h | 7 |
5 files changed, 5 insertions, 22 deletions
@@ -1,6 +1,6 @@ # smolbote -Copyright (C) 2017 - 2018 aqua +Copyright (C) 2017 - 2019 aqua This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as @@ -37,3 +37,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ## Breakpad (optional) - url: https://chromium.googlesource.com/breakpad/breakpad - license: BSD-3-Clause + diff --git a/lib/about/aboutdialog.cpp b/lib/about/aboutdialog.cpp index 12210dc..452d16f 100644 --- a/lib/about/aboutdialog.cpp +++ b/lib/about/aboutdialog.cpp @@ -37,7 +37,7 @@ AboutDialog::AboutDialog(QWidget *parent) "<p>This program is free software, see <i>License</i> for more information.</p>") .arg(qApp->applicationVersion())); - ui->licenseLabel->setText(tr("<p>Copyright 2017 - 2018 aqua</p>" + ui->licenseLabel->setText(tr("<p>Copyright 2017 - 2019 aqua</p>" "<p>This program is free software, and you are welcome to use it under the conditions set by the GNU GPLv3.<br>" "This is a short summary: <ul>" "<li> the freedom to use the software for any purpose,</li>" diff --git a/src/mainwindow/widgets/navigationbar.cpp b/src/mainwindow/widgets/navigationbar.cpp index c56d342..e77ce6d 100644 --- a/src/mainwindow/widgets/navigationbar.cpp +++ b/src/mainwindow/widgets/navigationbar.cpp @@ -18,6 +18,7 @@ #include <QToolBar> #include <QToolButton> #include <QWebEngineHistory> +#include "webprofile.h" NavigationBar::NavigationBar(const Configuration *config, QWidget *parent) : QToolBar(parent) @@ -97,7 +98,7 @@ NavigationBar::NavigationBar(const Configuration *config, QWidget *parent) homeAction = addAction(Util::icon(QStyle::SP_DirHomeIcon), tr("Home")); config->setShortcut(homeAction, "navigation.shortcuts.home"); connect(homeAction, &QAction::triggered, this, [this]() { - m_view->triggerViewAction(WebView::GoHome); + m_view->load(m_view->profile()->homepage()); }); } diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index 2e90b23..3861306 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -304,15 +304,3 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) menu->setMinimumWidth(250); menu->exec(event->globalPos()); } - -void WebView::triggerViewAction(WebView::ViewAction action) -{ - switch(action) { - case GoHome: - load(m_profile->homepage()); - break; - case BookmarkPage: - emit newBookmark(this->title(), this->url()); - break; - } -} diff --git a/src/webengine/webview.h b/src/webengine/webview.h index 8d320b9..6fcbe3a 100644 --- a/src/webengine/webview.h +++ b/src/webengine/webview.h @@ -18,11 +18,6 @@ class WebView : public QWebEngineView { Q_OBJECT public: - enum ViewAction { - GoHome, - BookmarkPage - }; - explicit WebView(WebProfile *profile = nullptr, QWidget *parent = nullptr); ~WebView() = default; @@ -34,8 +29,6 @@ public: bool isLoaded() const; - void triggerViewAction(ViewAction action); - public slots: void search(const QString &term); |