summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2021-11-15 21:47:00 +0100
committerMarc Mutz <marc.mutz@qt.io>2021-11-16 11:45:07 +0100
commit30696bf3f7aca37493cd6fb79c4637425ad7d922 (patch)
tree35ab22d417f53605b1c134d893291f265aaaa80e /src
parentd518dd7d0745f9e5c4e65b3f63e5a2204c7fd816 (diff)
FaviconImageResponseRunnable: fix -Werror=deprecated
C++20 deprecates [=]'s implicit capture of this, but the replacement [=, this] isn't available in C++17. So, need to bite the bullet and list every captured variable manually. Pick-to: 6.2 Change-Id: I47c62f9bf93e5d7b6c64cdbdac73bdcc9ecab8b5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/webenginequick/api/qquickwebenginefaviconprovider.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/webenginequick/api/qquickwebenginefaviconprovider.cpp b/src/webenginequick/api/qquickwebenginefaviconprovider.cpp
index 2a335418c..ee3b9bd6a 100644
--- a/src/webenginequick/api/qquickwebenginefaviconprovider.cpp
+++ b/src/webenginequick/api/qquickwebenginefaviconprovider.cpp
@@ -181,7 +181,7 @@ void FaviconImageResponseRunnable::requestIconOnUIThread(QQuickWebEngineView *vi
QTimer *timer = new QTimer();
timer->moveToThread(qApp->thread());
timer->setSingleShot(true);
- QObject::connect(timer, &QTimer::timeout, [=]() {
+ QObject::connect(timer, &QTimer::timeout, [this, view, timer]() {
QtWebEngineCore::ProfileAdapter *profileAdapter = view->d_ptr->profileAdapter();
bool touchIconsEnabled = view->profile()->settings()->touchIconsEnabled();
if (isIconURL(QUrl(m_id))) {
@@ -212,7 +212,7 @@ FaviconImageResponse::FaviconImageResponse(const QString &id, const QSize &reque
QTimer *timer = new QTimer();
timer->moveToThread(qApp->thread());
timer->setSingleShot(true);
- QObject::connect(timer, &QTimer::timeout, [=]() {
+ QObject::connect(timer, &QTimer::timeout, [this, id, requestedSize, views, pool, view, timer]() {
QIcon icon = view->d_ptr->adapter->icon();
if (icon.isNull())
startRunnable(id, requestedSize, views, pool);