From 1c106b37c75adc96df33cd59e8a5e3822385b099 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 17 Jun 2022 17:33:37 +0200 Subject: QXdgDesktopPortalFileDialog: fix C++20 build In a lambda, capturing of `*this` by reference via `=` is deprecated, and breaks the build. Capture everything needed instead. Amends fb981a0954119ed0dfa4a402fdef78e7257ffc96. Change-Id: I5d3d192e71662b96154cb5979898277bd0720a90 Reviewed-by: Thiago Macieira --- .../platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platformthemes/xdgdesktopportal') diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp index 54e600fcbe..ecc5545e76 100644 --- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp +++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp @@ -266,7 +266,7 @@ void QXdgDesktopPortalFileDialog::openPortal(Qt::WindowFlags windowFlags, Qt::Wi QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(message); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall); - connect(watcher, &QDBusPendingCallWatcher::finished, this, [=] (QDBusPendingCallWatcher *watcher) { + connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, d, windowFlags, windowModality, parent] (QDBusPendingCallWatcher *watcher) { QDBusPendingReply reply = *watcher; // Any error means the dialog is not shown and we need to fallback d->failedToOpen = reply.isError(); -- cgit v1.2.3