aboutsummaryrefslogtreecommitdiff
path: root/lib/navigation
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-01-04 13:16:13 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2018-01-04 13:16:13 +0100
commitfad0abffec1ba784256daa68c7d52891c2d08825 (patch)
treed7d255805500e1f2598ef6aea7b21ca116a1b1df /lib/navigation
parentFixed crash with Settings dialog (diff)
downloadsmolbote-fad0abffec1ba784256daa68c7d52891c2d08825.tar.xz
Various minor fixes
- typo fixes - bumped copyright year - removed a bunch of unused imports - fixed a couple of clazy warnings
Diffstat (limited to 'lib/navigation')
-rw-r--r--lib/navigation/navigationbutton.cpp5
-rw-r--r--lib/navigation/urllineedit.cpp13
-rw-r--r--lib/navigation/urllineedit.h2
3 files changed, 2 insertions, 18 deletions
diff --git a/lib/navigation/navigationbutton.cpp b/lib/navigation/navigationbutton.cpp
index 13daebc..ecf7c81 100644
--- a/lib/navigation/navigationbutton.cpp
+++ b/lib/navigation/navigationbutton.cpp
@@ -10,7 +10,6 @@
#include <QStyle>
#include <QWebEngineHistory>
-#include <QMenu>
NavigationButton::NavigationButton(Type type, QWidget *parent) :
QToolButton(parent)
@@ -132,9 +131,9 @@ void NavigationButton::prepareMenu()
break;
}
- for(QWebEngineHistoryItem i : items) {
+ for(const QWebEngineHistoryItem &i : qAsConst(items)) {
QAction *a = menu->addAction(i.title());
- connect(a, &QAction::triggered, [i, this]() {
+ connect(a, &QAction::triggered, this, [i, this]() {
m_view->history()->goToItem(i);
});
}
diff --git a/lib/navigation/urllineedit.cpp b/lib/navigation/urllineedit.cpp
index 24924bb..095431b 100644
--- a/lib/navigation/urllineedit.cpp
+++ b/lib/navigation/urllineedit.cpp
@@ -7,21 +7,14 @@
*/
#include "urllineedit.h"
-#include <QUrl>
#include <QTimer>
#include <QMenu>
-#include <QAction>
#include <QStyle>
-
#include <QWidgetAction>
// ssl menu
#include <QLabel>
-#include "../bookmarks/bookmarkswidget.h"
-
-#include <QCompleter>
-
UrlLineEdit::UrlLineEdit(QWidget *parent) :
QLineEdit(parent)
{
@@ -68,12 +61,6 @@ UrlLineEdit::UrlLineEdit(QWidget *parent) :
}
-QAction *UrlLineEdit::sslAction()
-{
- Q_CHECK_PTR(m_sslAction);
- return m_sslAction;
-}
-
QAction *UrlLineEdit::pageAction()
{
Q_CHECK_PTR(m_pageAction);
diff --git a/lib/navigation/urllineedit.h b/lib/navigation/urllineedit.h
index 46366a7..dee4938 100644
--- a/lib/navigation/urllineedit.h
+++ b/lib/navigation/urllineedit.h
@@ -12,7 +12,6 @@
#include <QLineEdit>
#include <QTextLayout>
#include <QAction>
-
#include "urlcompleter.h"
class QAbstractItemModel;
@@ -24,7 +23,6 @@ class UrlLineEdit : public QLineEdit
public:
explicit UrlLineEdit(QWidget *parent = nullptr);
- QAction *sslAction();
QAction *pageAction();
void setCompleterModel(QAbstractItemModel *model);