diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2022-06-17 17:33:37 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2022-06-20 17:53:33 +0200 |
commit | 1c106b37c75adc96df33cd59e8a5e3822385b099 (patch) | |
tree | 45caad38d84d30d7a1867eabe650b8cb630b8d1d /src | |
parent | a7203a89202fff5b91d16956568c5f6587f2f8e8 (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<QDBusObjectPath> reply = *watcher; // Any error means the dialog is not shown and we need to fallback d->failedToOpen = reply.isError(); |