From fad0abffec1ba784256daa68c7d52891c2d08825 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 4 Jan 2018 13:16:13 +0100 Subject: Various minor fixes - typo fixes - bumped copyright year - removed a bunch of unused imports - fixed a couple of clazy warnings --- src/forms/aboutdialog.cpp | 2 +- src/forms/cookiesform.cpp | 1 - src/forms/searchform.cpp | 1 - src/main.cpp | 2 +- src/mainwindow.cpp | 10 ---------- src/mainwindow.h | 1 - src/singleapplication.cpp | 1 - src/webengine/urlinterceptor.cpp | 4 ++-- src/webengine/webview.cpp | 2 -- src/widgets/mainwindowmenubar.cpp | 1 - src/widgets/mainwindowtabbar.cpp | 2 -- 11 files changed, 4 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/forms/aboutdialog.cpp b/src/forms/aboutdialog.cpp index 3f89118..0744a5f 100644 --- a/src/forms/aboutdialog.cpp +++ b/src/forms/aboutdialog.cpp @@ -43,7 +43,7 @@ AboutDialog::AboutDialog(QWidget *parent) : QLabel *aboutLabel = new QLabel(this); aboutLabel->setWordWrap(true); aboutLabel->setText(tr("

smolbote %1

" - "

yet another Qute browser

") + "

yet another no-frills browser

") .arg(qApp->applicationVersion())); ui->toolBox->addItem(aboutLabel, tr("About")); diff --git a/src/forms/cookiesform.cpp b/src/forms/cookiesform.cpp index fb90f4a..94d1854 100644 --- a/src/forms/cookiesform.cpp +++ b/src/forms/cookiesform.cpp @@ -9,7 +9,6 @@ #include "cookiesform.h" #include "ui_cookiesform.h" -#include #include CookiesForm::CookiesForm(QWebEngineCookieStore *store, QWidget *parent) : diff --git a/src/forms/searchform.cpp b/src/forms/searchform.cpp index c05c6b2..b12ff80 100644 --- a/src/forms/searchform.cpp +++ b/src/forms/searchform.cpp @@ -10,7 +10,6 @@ #include "ui_searchform.h" #include "../mainwindow.h" -#include #include SearchForm::SearchForm(MainWindow *parentWindow, QWidget *parent) : diff --git a/src/main.cpp b/src/main.cpp index fb9eeba..b7bd311 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) #endif QCommandLineParser parser; - parser.setApplicationDescription("yet another Qt browser"); + parser.setApplicationDescription("yet another no-frills browser"); parser.addHelpOption(); parser.addVersionOption(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 21914da..b7c4a05 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -12,11 +12,6 @@ #include #include "forms/aboutdialog.h" -#include -#include - -#include - #include #include @@ -185,11 +180,6 @@ MainWindow *MainWindow::newWindow(const QUrl &url) return instance->createSession(m_profile->storageName(), true, QStringList(url.toString())); } -void MainWindow::focusAddress() -{ - m_addressBar->setFocus(); -} - void MainWindow::closeEvent(QCloseEvent *event) { if(tabBar->count() > 1) { diff --git a/src/mainwindow.h b/src/mainwindow.h index 1c568bc..2e6f510 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -66,7 +66,6 @@ protected: void closeEvent(QCloseEvent *event) override; private slots: - void focusAddress(); void handleTabChanged(WebView *view); void handleTitleUpdated(const QString &title); diff --git a/src/singleapplication.cpp b/src/singleapplication.cpp index ae4d510..4810d73 100644 --- a/src/singleapplication.cpp +++ b/src/singleapplication.cpp @@ -10,7 +10,6 @@ #include #include #include -#include SingleApplication::SingleApplication(int &argc, char **argv) : QApplication(argc, argv) { diff --git a/src/webengine/urlinterceptor.cpp b/src/webengine/urlinterceptor.cpp index 175643e..b8d30cd 100644 --- a/src/webengine/urlinterceptor.cpp +++ b/src/webengine/urlinterceptor.cpp @@ -8,7 +8,6 @@ #include "urlinterceptor.h" #include -#include #include UrlRequestInterceptor::UrlRequestInterceptor(const QString &path, QObject *parent) : @@ -19,7 +18,8 @@ UrlRequestInterceptor::UrlRequestInterceptor(const QString &path, QObject *paren #endif QDir hostsD(path); - for(const QString &file : hostsD.entryList(QDir::Files)) { + const QStringList hostFiles = hostsD.entryList(QDir::Files); + for(const QString &file : hostFiles) { qDebug("Parsing hosts.d/%s: %i", qUtf8Printable(file), parseHostfile(hostsD.absoluteFilePath(file))); } diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index 2e51587..ee9b134 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -7,7 +7,6 @@ */ #include "webview.h" -#include // copy page URL #include @@ -16,7 +15,6 @@ // zoom widget #include #include -#include #include #include #include diff --git a/src/widgets/mainwindowmenubar.cpp b/src/widgets/mainwindowmenubar.cpp index f8e8ecd..ada3ad1 100644 --- a/src/widgets/mainwindowmenubar.cpp +++ b/src/widgets/mainwindowmenubar.cpp @@ -8,7 +8,6 @@ #include "mainwindowmenubar.h" #include -#include #include #include "forms/profileview.h" #include "mainwindow.h" diff --git a/src/widgets/mainwindowtabbar.cpp b/src/widgets/mainwindowtabbar.cpp index 837de8d..da2cef3 100644 --- a/src/widgets/mainwindowtabbar.cpp +++ b/src/widgets/mainwindowtabbar.cpp @@ -7,9 +7,7 @@ */ #include "mainwindowtabbar.h" -#include #include -#include #include #include -- cgit v1.2.1