aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-18 17:13:24 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-18 17:13:24 +0200
commitd7c51cc1f3e67ad9c167b7afcbf7313181832718 (patch)
tree1c1b9754060ebfbbf4ad606f39a820b539db1b11 /src/webengine
parentUpdate vendor.cmake (diff)
downloadsmolbote-d7c51cc1f3e67ad9c167b7afcbf7313181832718.tar.xz
clang-format pass
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/urlinterceptor.h6
-rw-r--r--src/webengine/webpage.cpp10
-rw-r--r--src/webengine/webview.cpp7
3 files changed, 12 insertions, 11 deletions
diff --git a/src/webengine/urlinterceptor.h b/src/webengine/urlinterceptor.h
index a4a1b6e..ff47ffe 100644
--- a/src/webengine/urlinterceptor.h
+++ b/src/webengine/urlinterceptor.h
@@ -9,11 +9,11 @@
#ifndef SMOLBOTE_URLREQUESTINTERCEPTOR_H
#define SMOLBOTE_URLREQUESTINTERCEPTOR_H
+#include "web/urlfilter/filterrule.h"
+#include <QByteArray>
+#include <QVector>
#include <QWebEngineUrlRequestInterceptor>
#include <memory>
-#include <QVector>
-#include <QByteArray>
-#include "web/urlfilter/filterrule.h"
typedef std::pair<std::string, std::string> Header;
diff --git a/src/webengine/webpage.cpp b/src/webengine/webpage.cpp
index ff57ac5..28b426b 100644
--- a/src/webengine/webpage.cpp
+++ b/src/webengine/webpage.cpp
@@ -7,14 +7,14 @@
*/
#include "webpage.h"
+#include <QLayout>
#include <QMessageBox>
-#include <QWebEngineFullScreenRequest>
#include <QTimer>
-#include <QLayout>
+#include <QWebEngineFullScreenRequest>
QString tr_terminationStatus(QWebEnginePage::RenderProcessTerminationStatus status)
{
- switch (status) {
+ switch(status) {
case QWebEnginePage::NormalTerminationStatus:
return QObject::tr("The render process terminated normally.");
case QWebEnginePage::AbnormalTerminationStatus:
@@ -142,8 +142,8 @@ void WebPage::renderProcessCrashed(QWebEnginePage::RenderProcessTerminationStatu
QString page = "<html><body><h1>This tab has crashed!</h1>%message%</body></html>";
page.replace(QLatin1String("%message%"), QString("<p>%1<br>Exit code is %2.</p>"
- "<p>Press <a href='%3'>here</a> to reload this tab.</p>").arg(tr_terminationStatus(terminationStatus), QString::number(exitCode),
- this->url().toEncoded()));
+ "<p>Press <a href='%3'>here</a> to reload this tab.</p>")
+ .arg(tr_terminationStatus(terminationStatus), QString::number(exitCode), this->url().toEncoded()));
QTimer::singleShot(0, this, [=]() {
setHtml(page.toUtf8(), url());
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index ee08c34..b613273 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -7,10 +7,8 @@
*/
#include "webview.h"
-#include <web/profilemanager.h>
#include "subwindow/subwindow.h"
#include "webpage.h"
-#include <web/webprofile.h>
#include <QContextMenuEvent>
#include <QDialog>
#include <QMenu>
@@ -22,6 +20,8 @@
#include <QWebEngineContextMenuData>
#include <QWebEngineHistoryItem>
#include <QWidgetAction>
+#include <web/profilemanager.h>
+#include <web/webprofile.h>
inline QAction *historyAction(QWebEngineView *view, const QWebEngineHistoryItem &item)
{
@@ -247,7 +247,8 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
auto *view = this->createWindow(QWebEnginePage::WebBrowserTab);
view->setProfile(profile);
view->load(ctxdata.linkUrl());
- }, this);
+ },
+ this);
newTabMenu->setTitle(tr("Open link in new tab with profile"));
menu->addMenu(newTabMenu);