Avoid implicit capture of 'this' via '[=]' as deprecated in C++20

This commit is contained in:
Marco Mattiolo 2024-08-12 14:23:54 +02:00 committed by Devin Lin
parent d79274cbe7
commit bfdc6d938a

View file

@ -78,7 +78,7 @@ ScreenShotUtil::ScreenShotUtil(QObject *parent)
void ScreenShotUtil::takeScreenShot() void ScreenShotUtil::takeScreenShot()
{ {
// wait ~200 ms to wait for rest of animations // wait ~200 ms to wait for rest of animations
QTimer::singleShot(SCREENSHOT_DELAY, [=]() { QTimer::singleShot(SCREENSHOT_DELAY, [this]() {
int lPipeFds[2]; int lPipeFds[2];
if (pipe2(lPipeFds, O_CLOEXEC) != 0) { if (pipe2(lPipeFds, O_CLOEXEC) != 0) {
qWarning() << "Could not take screenshot"; qWarning() << "Could not take screenshot";