diff options
author | Marc Mutz <marc.mutz@qt.io> | 2021-11-15 21:47:00 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-11-16 20:02:05 +0000 |
commit | 54c0b739f20cb9080422ca2c88bdf760f3050614 (patch) | |
tree | 96869b3e2709347b6196345a3592da0411a216c8 /src | |
parent | d4e4613b3df17e26f86bffe9847bd2a4738101b6 (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.
Change-Id: I47c62f9bf93e5d7b6c64cdbdac73bdcc9ecab8b5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 30696bf3f7aca37493cd6fb79c4637425ad7d922)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/webenginequick/api/qquickwebenginefaviconprovider.cpp | 4 |
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); |