aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-01-17 20:25:44 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2020-01-17 21:27:00 +0200
commitcb30cee7a065a074394347f112451decc4847674 (patch)
tree25f0ef36bb776a5e1938232e132b0a464fd5a9bc /src/webengine
parentMerge branch 'firefox-bookmarks-json-importer' (diff)
downloadsmolbote-cb30cee7a065a074394347f112451decc4847674.tar.xz
Fix various gcc and clazy compile warnings
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/urlinterceptor.cpp4
-rw-r--r--src/webengine/webprofilemanager.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/webengine/urlinterceptor.cpp b/src/webengine/urlinterceptor.cpp
index 490dea6..29cd869 100644
--- a/src/webengine/urlinterceptor.cpp
+++ b/src/webengine/urlinterceptor.cpp
@@ -37,7 +37,7 @@ void UrlRequestInterceptor::removeFilter(UrlFilter *filter)
void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{
- for(const auto *filter : filters) {
+ for(const auto *filter : qAsConst(filters)) {
const auto match = filter->match(info.firstPartyUrl(), info.requestUrl(), info.resourceType());
// skip if no match
@@ -57,7 +57,7 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
}
// set headers
- for(const auto &header : headers) {
+ for(const auto &header : qAsConst(headers)) {
info.setHttpHeader(header.first, header.second);
}
for(auto i = m_profile->headers().constBegin(); i != m_profile->headers().constEnd(); ++i) {
diff --git a/src/webengine/webprofilemanager.cpp b/src/webengine/webprofilemanager.cpp
index 80762f7..bdd10f0 100644
--- a/src/webengine/webprofilemanager.cpp
+++ b/src/webengine/webprofilemanager.cpp
@@ -30,7 +30,7 @@ WebProfileManager::WebProfileManager(QObject *parent)
WebProfileManager::~WebProfileManager()
{
- for(Profile p : profiles) {
+ for(Profile p : qAsConst(profiles)) {
if(p.selfDestruct && p.settings != nullptr) {
if(!p.ptr->isOffTheRecord()) {
if(!p.ptr->persistentStoragePath().isEmpty())
@@ -160,7 +160,7 @@ void profileMenu(QMenu *menu, const std::function<void(WebProfile *)> &callback,
auto *group = new QActionGroup(menu);
QObject::connect(menu, &QMenu::aboutToHide, group, &QActionGroup::deleteLater);
- for(const auto &profile : s_instance->profiles) {
+ for(const auto &profile : qAsConst(s_instance->profiles)) {
auto *action = menu->addAction(profile.ptr->name(), profile.ptr, [profile, callback]() {
callback(profile.ptr);
});