aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bookmarks/bookmarkswidget.cpp9
-rw-r--r--lib/bookmarks/bookmarkswidget.h7
-rw-r--r--lib/downloads/downloadswidget.cpp2
-rw-r--r--lib/downloads/widgets/downloaditemwidget.cpp1
-rw-r--r--lib/downloads/widgets/elidedlabel.cpp1
-rw-r--r--lib/navigation/navigationbutton.cpp5
-rw-r--r--lib/navigation/urllineedit.cpp13
-rw-r--r--lib/navigation/urllineedit.h2
-rw-r--r--lib/settings/settingsdialog.cpp4
9 files changed, 6 insertions, 38 deletions
diff --git a/lib/bookmarks/bookmarkswidget.cpp b/lib/bookmarks/bookmarkswidget.cpp
index cb191c7..0b13254 100644
--- a/lib/bookmarks/bookmarkswidget.cpp
+++ b/lib/bookmarks/bookmarkswidget.cpp
@@ -66,15 +66,6 @@ void BookmarksWidget::save()
qDebug("Writing bookmarks [%s] %s", qUtf8Printable(m_path), xbel->write(m_path) ? "ok" : "failed");
}
-QStringList BookmarksWidget::bookmarksFor(const QString &term)
-{
- QStringList ret;
- for(int i = 0; i < ui->treeWidget->topLevelItemCount(); ++i) {
- ret += searchItem(ui->treeWidget->topLevelItem(i), term);
- }
- return ret;
-}
-
QAbstractItemModel *BookmarksWidget::model() const
{
return ui->treeWidget->model();
diff --git a/lib/bookmarks/bookmarkswidget.h b/lib/bookmarks/bookmarkswidget.h
index aa188b2..5b815c0 100644
--- a/lib/bookmarks/bookmarkswidget.h
+++ b/lib/bookmarks/bookmarkswidget.h
@@ -23,17 +23,14 @@ class BookmarksWidget : public QWidget
public:
explicit BookmarksWidget(const QString &path, QWidget *parent = 0);
- ~BookmarksWidget();
+ ~BookmarksWidget() override ;
void save();
+ QAbstractItemModel *model() const;
signals:
void openUrl(const QUrl &url);
-public slots:
- QStringList bookmarksFor(const QString &term);
- QAbstractItemModel *model() const;
-
private slots:
void openItem(QTreeWidgetItem *item, int column);
void showItemDetails();
diff --git a/lib/downloads/downloadswidget.cpp b/lib/downloads/downloadswidget.cpp
index f9a8f34..1a5f268 100644
--- a/lib/downloads/downloadswidget.cpp
+++ b/lib/downloads/downloadswidget.cpp
@@ -10,10 +10,8 @@
#include "ui_downloadsform.h"
#include <QWebEngineDownloadItem>
-#include <QUrl>
#include <QFileDialog>
#include <QListWidget>
-#include <QLabel>
#include "widgets/downloaditemwidget.h"
DownloadsWidget::DownloadsWidget(const QString &downloadPath, QWidget *parent) :
diff --git a/lib/downloads/widgets/downloaditemwidget.cpp b/lib/downloads/widgets/downloaditemwidget.cpp
index fff3cfc..a51275e 100644
--- a/lib/downloads/widgets/downloaditemwidget.cpp
+++ b/lib/downloads/widgets/downloaditemwidget.cpp
@@ -10,7 +10,6 @@
#include "ui_downloaditemform.h"
#include <QUrl>
-#include <QLabel>
DownloadItemWidget::DownloadItemWidget(QWebEngineDownloadItem *item, QWidget *parent) :
QWidget(parent),
diff --git a/lib/downloads/widgets/elidedlabel.cpp b/lib/downloads/widgets/elidedlabel.cpp
index dc17d32..2878565 100644
--- a/lib/downloads/widgets/elidedlabel.cpp
+++ b/lib/downloads/widgets/elidedlabel.cpp
@@ -59,7 +59,6 @@
#include <QPainter>
#include <QTextLayout>
-#include <QDebug>
ElidedLabel::ElidedLabel(QWidget *parent)
: QLabel(parent)
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);
diff --git a/lib/settings/settingsdialog.cpp b/lib/settings/settingsdialog.cpp
index 9a589d6..478e372 100644
--- a/lib/settings/settingsdialog.cpp
+++ b/lib/settings/settingsdialog.cpp
@@ -74,11 +74,11 @@ inline QHBoxLayout *createEntry(Configuration* config, const std::string &path,
QToolButton *resetButton = new QToolButton(widget);
resetButton->setIcon(widget->style()->standardIcon(QStyle::SP_DialogResetButton));
- QObject::connect(resetButton, &QToolButton::clicked, [config, path, lineEdit]() {
+ QObject::connect(resetButton, &QToolButton::clicked, widget, [config, path, lineEdit]() {
config->resetValue(path.c_str());
lineEdit->setText(QString::fromStdString(config->value<std::string>(path.c_str()).value()));
});
- QObject::connect(lineEdit, &QLineEdit::editingFinished, [config, path, lineEdit]() {
+ QObject::connect(lineEdit, &QLineEdit::editingFinished, widget, [config, path, lineEdit]() {
config->setValue<std::string>(path, lineEdit->text().toStdString());
});