Skip to content

Commit

Permalink
Darwin: Capture 'this' via '&' instead of '=' to fix build with C++20
Browse files Browse the repository at this point in the history
qdarwinpermissionplugin.mm:37:35: error: implicit capture of 'this'
with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]

Pick-to: 6.8
Change-Id: I05afd05f43ddceb88cb5fffd85959b494c29ce6a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
  • Loading branch information
thiagomacieira authored and torarnv committed Oct 16, 2024
1 parent eb31aa9 commit 0990bd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/platform/darwin/qdarwinpermissionplugin.mm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
return;
}

[m_handler requestPermission:permission withCallback:[=](Qt::PermissionStatus status) {
[m_handler requestPermission:permission withCallback:[&](Qt::PermissionStatus status) {
// In case the callback comes in on a secondary thread we need to marshal it
// back to the main thread. And if it doesn't, we still want to propagate it
// via an event, to avoid any GCD locks deadlocking the application on iOS
Expand Down

0 comments on commit 0990bd4

Please sign in to comment.