Skip to content

Explicit capture this to fix deprecation warning

Fix the following C++20 deprecation warning by explicitly capturing this by value:

../calindac/alarmnotification.cpp: In lambda function:
../calindac/alarmnotification.cpp:19:72: warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]
   19 |     connect(this, &AlarmNotification::suspend, m_notification_handler, [ = ]() {
      |                                                                        ^

Merge request reports