Skip to content

Commit

Permalink
clazy: Use 4-arg connect in videosource.
Browse files Browse the repository at this point in the history
Clazy recommends using the 4-arg variant of Object::connect over the
3-arg version. The main reason for this is that the signal will not be
called if the target object has been deleted.

In this instance, it appears clear that the target object is the
current object, since the lambda is referencing variables in the
CardInput class.

https://github.com/KDE/clazy/blob/master/docs/checks/README-connect-3arg-lambda.md
  • Loading branch information
linuxdude42 committed Nov 6, 2021
1 parent 03855a8 commit 89bf2a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videosource.cpp
Expand Up @@ -3396,7 +3396,7 @@ void CardInput::channelScanner(void)

if (ssd->Create())
{
connect(ssd, &StandardSettingDialog::Exiting,
connect(ssd, &StandardSettingDialog::Exiting, this,
[=]()
{
if (SourceUtil::GetChannelCount(srcid))
Expand Down

0 comments on commit 89bf2a9

Please sign in to comment.