aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/webpage.cpp4
-rw-r--r--src/webengine/webprofile.h2
-rw-r--r--src/webengine/webview.cpp10
-rw-r--r--src/webengine/webview.h2
-rw-r--r--src/webengine/webviewcontextmenu.cpp2
5 files changed, 10 insertions, 10 deletions
diff --git a/src/webengine/webpage.cpp b/src/webengine/webpage.cpp
index 8c6b8db..b2b19b5 100644
--- a/src/webengine/webpage.cpp
+++ b/src/webengine/webpage.cpp
@@ -13,7 +13,7 @@
#include <QWebEngineFullScreenRequest>
#include <QWebEngineCertificateError>
-QString tr_terminationStatus(QWebEnginePage::RenderProcessTerminationStatus status)
+[[nodiscard]] inline QString tr_terminationStatus(QWebEnginePage::RenderProcessTerminationStatus status)
{
switch(status) {
case QWebEnginePage::NormalTerminationStatus:
@@ -29,7 +29,7 @@ QString tr_terminationStatus(QWebEnginePage::RenderProcessTerminationStatus stat
return QObject::tr("The render process was terminated with an unknown status.");
}
-QString feature_toString(QWebEnginePage::Feature feature)
+[[nodiscard]] inline QString feature_toString(QWebEnginePage::Feature feature)
{
switch(feature) {
case QWebEnginePage::Notifications:
diff --git a/src/webengine/webprofile.h b/src/webengine/webprofile.h
index 0747638..894463f 100644
--- a/src/webengine/webprofile.h
+++ b/src/webengine/webprofile.h
@@ -205,7 +205,7 @@ public slots:
auto *store = cookieStore();
store->deleteAllCookies();
for(const auto &data : cookies) {
- for(const auto &cookie : QNetworkCookie::parseCookies(data.toByteArray())) {
+ for(auto &cookie : QNetworkCookie::parseCookies(data.toByteArray())) {
store->setCookie(cookie);
}
}
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index 135f25c..38e564a 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -42,21 +42,21 @@ WebView::WebView(WebProfile *profile, cb_createWindow_t cb, QWidget *parent)
setPage(new WebPage(profile, this));
}
-WebView::WebView(const Session::WebView &data, cb_createWindow_t cb, QWidget *parent)
+WebView::WebView(const Session::WebView &webview_data, cb_createWindow_t cb, QWidget *parent)
: WebView(parent)
{
cb_createWindow = cb;
WebProfileManager profileManager;
- auto *profile = profileManager.profile(data.profile);
+ auto *profile = profileManager.profile(webview_data.profile);
if(profile != nullptr) {
setProfile(profile);
}
- if(!data.url.isEmpty())
- load(QUrl::fromUserInput(data.url));
+ if(!webview_data.url.isEmpty())
+ load(QUrl::fromUserInput(webview_data.url));
else {
- QByteArray copy(data.history);
+ QByteArray copy(webview_data.history);
QDataStream historyStream(&copy, QIODevice::ReadOnly);
historyStream >> *history();
}
diff --git a/src/webengine/webview.h b/src/webengine/webview.h
index a9c6866..34c77bf 100644
--- a/src/webengine/webview.h
+++ b/src/webengine/webview.h
@@ -28,7 +28,7 @@ public:
typedef std::function<WebView *(QWebEnginePage::WebWindowType)> cb_createWindow_t;
WebView(WebProfile *profile, cb_createWindow_t cb, QWidget *parent = nullptr);
- WebView(const Session::WebView &data, cb_createWindow_t cb, QWidget *parent = nullptr);
+ WebView(const Session::WebView &webview_data, cb_createWindow_t cb, QWidget *parent = nullptr);
~WebView() = default;
[[nodiscard]] WebProfile *profile() const
diff --git a/src/webengine/webviewcontextmenu.cpp b/src/webengine/webviewcontextmenu.cpp
index 1f6b337..ea5e8c6 100644
--- a/src/webengine/webviewcontextmenu.cpp
+++ b/src/webengine/webviewcontextmenu.cpp
@@ -196,7 +196,7 @@ WebViewContextMenu::WebViewContextMenu(WebView *view)
auto *zoomSlider = new QSlider(Qt::Horizontal);
zoomSlider->setMinimum(5);
zoomSlider->setMaximum(50);
- zoomSlider->setValue(view->zoomFactor() * 10);
+ zoomSlider->setValue(static_cast<int>(view->zoomFactor() * 10));
auto *zoomAction = this->addAction(tr("Zoom: %1x").arg(view->zoomFactor()));
connect(zoomAction, &QAction::triggered, view, [zoomSlider]() {