diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-07 23:28:42 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-07 23:28:42 +0100 |
commit | b984992fc92b6dd607732d6dad1c533b36f1ba3a (patch) | |
tree | 984c5ede072c2ebb10ad32acb5d5928162feb97f /src/forms | |
parent | Searching through BookmarkModel elements (diff) | |
download | smolbote-b984992fc92b6dd607732d6dad1c533b36f1ba3a.tar.xz |
Added .clang-format
Diffstat (limited to 'src/forms')
-rw-r--r-- | src/forms/aboutdialog.cpp | 12 | ||||
-rw-r--r-- | src/forms/aboutdialog.h | 3 | ||||
-rw-r--r-- | src/forms/cookiesform.cpp | 9 | ||||
-rw-r--r-- | src/forms/cookiesform.h | 7 | ||||
-rw-r--r-- | src/forms/profileview.cpp | 16 | ||||
-rw-r--r-- | src/forms/profileview.h | 3 | ||||
-rw-r--r-- | src/forms/searchform.cpp | 8 | ||||
-rw-r--r-- | src/forms/searchform.h | 3 |
8 files changed, 32 insertions, 29 deletions
diff --git a/src/forms/aboutdialog.cpp b/src/forms/aboutdialog.cpp index 0744a5f..e5dfc7d 100644 --- a/src/forms/aboutdialog.cpp +++ b/src/forms/aboutdialog.cpp @@ -12,7 +12,7 @@ constexpr const char *getCompiler() { - // clang also defines __GNUC__, so we need to check for clang first +// clang also defines __GNUC__, so we need to check for clang first #if defined(__clang__) return "Clang " __clang_version__; #elif defined(__GNUC__) @@ -31,9 +31,9 @@ inline const QString getLongVersion() #endif } -AboutDialog::AboutDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::AboutDialog) +AboutDialog::AboutDialog(QWidget *parent) + : QDialog(parent) + , ui(new Ui::AboutDialog) { setAttribute(Qt::WA_DeleteOnClose, true); ui->setupUi(this); @@ -44,7 +44,7 @@ AboutDialog::AboutDialog(QWidget *parent) : aboutLabel->setWordWrap(true); aboutLabel->setText(tr("<h2>smolbote %1</h2>" "<p><i>yet another no-frills browser</i></p>") - .arg(qApp->applicationVersion())); + .arg(qApp->applicationVersion())); ui->toolBox->addItem(aboutLabel, tr("About")); QLabel *licenseLabel = new QLabel(this); @@ -72,7 +72,7 @@ AboutDialog::AboutDialog(QWidget *parent) : "<li>Qt %3</li>" "<li>libconfig</li>" "</ul></p>") - .arg(getLongVersion(), getCompiler(), qVersion())); + .arg(getLongVersion(), getCompiler(), qVersion())); ui->toolBox->addItem(libsLabel, tr("Details")); } diff --git a/src/forms/aboutdialog.h b/src/forms/aboutdialog.h index 9f2189e..740df09 100644 --- a/src/forms/aboutdialog.h +++ b/src/forms/aboutdialog.h @@ -11,7 +11,8 @@ #include <QDialog> -namespace Ui { +namespace Ui +{ class AboutDialog; } diff --git a/src/forms/cookiesform.cpp b/src/forms/cookiesform.cpp index 94d1854..cf2bcb8 100644 --- a/src/forms/cookiesform.cpp +++ b/src/forms/cookiesform.cpp @@ -11,16 +11,16 @@ #include <QDateTime> -CookiesForm::CookiesForm(QWebEngineCookieStore *store, QWidget *parent) : - QWidget(parent), - ui(new Ui::CookiesForm) +CookiesForm::CookiesForm(QWebEngineCookieStore *store, QWidget *parent) + : QWidget(parent) + , ui(new Ui::CookiesForm) { setAttribute(Qt::WA_DeleteOnClose, false); ui->setupUi(this); ui->treeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents); connect(store, SIGNAL(cookieAdded(QNetworkCookie)), this, SLOT(addCookie(QNetworkCookie))); - connect(ui->treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(showDetails(QTreeWidgetItem*,QTreeWidgetItem*))); + connect(ui->treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(showDetails(QTreeWidgetItem *, QTreeWidgetItem *))); } CookiesForm::~CookiesForm() @@ -57,7 +57,6 @@ void CookiesForm::addCookie(const QNetworkCookie &cookie) item->setData(0, IsSecureRole, cookie.isSecure() ? tr("yes") : tr("no")); item->setData(0, IsSessionCookieRole, cookie.isSessionCookie() ? tr("yes") : tr("no")); item->setData(0, PathRole, cookie.path()); - } void CookiesForm::showDetails(QTreeWidgetItem *current, QTreeWidgetItem *previous) diff --git a/src/forms/cookiesform.h b/src/forms/cookiesform.h index 01c32ff..18c7698 100644 --- a/src/forms/cookiesform.h +++ b/src/forms/cookiesform.h @@ -9,11 +9,12 @@ #ifndef COOKIESFORM_H #define COOKIESFORM_H -#include <QWidget> -#include <QWebEngineCookieStore> #include <QTreeWidgetItem> +#include <QWebEngineCookieStore> +#include <QWidget> -namespace Ui { +namespace Ui +{ class CookiesForm; } diff --git a/src/forms/profileview.cpp b/src/forms/profileview.cpp index 7d3396f..3d85963 100644 --- a/src/forms/profileview.cpp +++ b/src/forms/profileview.cpp @@ -9,20 +9,20 @@ #include "profileview.h" #include "ui_profileview.h" +#include "forms/cookiesform.h" +#include "webengine/webengineprofile.h" +#include <QComboBox> #include <QLineEdit> #include <QPlainTextEdit> -#include <QComboBox> #include <QPushButton> -#include "webengine/webengineprofile.h" -#include "forms/cookiesform.h" #include <QDialogButtonBox> #include <QFormLayout> -ProfileView::ProfileView(WebEngineProfile *profile, QWidget *parent) : - QDialog(parent), - ui(new Ui::ProfileView) +ProfileView::ProfileView(WebEngineProfile *profile, QWidget *parent) + : QDialog(parent) + , ui(new Ui::ProfileView) { ui->setupUi(this); setProfile(profile); @@ -98,7 +98,7 @@ void ProfileView::updateProfile() // http m_profile->setHttpUserAgent(ui->userAgent->toPlainText()); m_profile->setHttpAcceptLanguage(ui->acceptLanguage->toPlainText()); - switch (ui->cacheType->currentIndex()) { + switch(ui->cacheType->currentIndex()) { case 0: m_profile->setHttpCacheType(QWebEngineProfile::MemoryHttpCache); break; @@ -114,7 +114,7 @@ void ProfileView::updateProfile() m_profile->setHttpCacheMaximumSize(ui->cacheSize->text().toInt()); // policy - switch (ui->cookiePolicy->currentIndex()) { + switch(ui->cookiePolicy->currentIndex()) { case 0: m_profile->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies); break; diff --git a/src/forms/profileview.h b/src/forms/profileview.h index a2e42f2..bf44346 100644 --- a/src/forms/profileview.h +++ b/src/forms/profileview.h @@ -11,7 +11,8 @@ #include <QDialog> -namespace Ui { +namespace Ui +{ class ProfileView; } diff --git a/src/forms/searchform.cpp b/src/forms/searchform.cpp index b12ff80..42e5a1a 100644 --- a/src/forms/searchform.cpp +++ b/src/forms/searchform.cpp @@ -7,14 +7,14 @@ */ #include "searchform.h" -#include "ui_searchform.h" #include "../mainwindow.h" +#include "ui_searchform.h" #include <settings/configuration.h> -SearchForm::SearchForm(MainWindow *parentWindow, QWidget *parent) : - QWidget(parent), - ui(new Ui::SearchForm) +SearchForm::SearchForm(MainWindow *parentWindow, QWidget *parent) + : QWidget(parent) + , ui(new Ui::SearchForm) { Q_CHECK_PTR(parentWindow); diff --git a/src/forms/searchform.h b/src/forms/searchform.h index 646d4d4..85ce11b 100644 --- a/src/forms/searchform.h +++ b/src/forms/searchform.h @@ -11,7 +11,8 @@ #include <QWidget> -namespace Ui { +namespace Ui +{ class SearchForm; } |