tests: fix deprecated implicit capture of this via [=]
Fixes compiler warnings: warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated] Change-Id: Ia7cf50f491e92f39162c69afb2a8320afedba056 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
8c97f51425
commit
0ed1f8b54e
@ -293,7 +293,7 @@ public:
|
|||||||
#if !defined(Q_OS_MACOS)
|
#if !defined(Q_OS_MACOS)
|
||||||
// FIXME: All platforms should send window-state change events, regardless
|
// FIXME: All platforms should send window-state change events, regardless
|
||||||
// of the sync/async nature of the the underlying platform, but they don't.
|
// of the sync/async nature of the the underlying platform, but they don't.
|
||||||
connect(this, &QWindow::windowStateChanged, [=]() {
|
connect(this, &QWindow::windowStateChanged, [this]() {
|
||||||
lastReceivedWindowState = windowState();
|
lastReceivedWindowState = windowState();
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
@ -363,7 +363,7 @@ void tst_QHostInfo::lookupConnectToLambda()
|
|||||||
QFETCH(QString, addresses);
|
QFETCH(QString, addresses);
|
||||||
|
|
||||||
lookupDone = false;
|
lookupDone = false;
|
||||||
QHostInfo::lookupHost(hostname, [=](const QHostInfo &hostInfo) {
|
QHostInfo::lookupHost(hostname, [this](const QHostInfo &hostInfo) {
|
||||||
resultsReady(hostInfo);
|
resultsReady(hostInfo);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ QNetworkInterface tst_QUdpSocket::interfaceForGroup(const QHostAddress &multicas
|
|||||||
if (!scope.isEmpty())
|
if (!scope.isEmpty())
|
||||||
return QNetworkInterface::interfaceFromName(scope);
|
return QNetworkInterface::interfaceFromName(scope);
|
||||||
|
|
||||||
static QNetworkInterface ipv6if = [=]() {
|
static QNetworkInterface ipv6if = [&]() {
|
||||||
// find any link local address in the allAddress list
|
// find any link local address in the allAddress list
|
||||||
for (const QHostAddress &addr: qAsConst(allAddresses)) {
|
for (const QHostAddress &addr: qAsConst(allAddresses)) {
|
||||||
if (addr.isLoopback())
|
if (addr.isLoopback())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user