D14074: Use context argument in lambda connect

Kai Uwe Broulik noreply at phabricator.kde.org
Thu Jul 12 13:38:35 BST 2018


broulik added inline comments.

INLINE COMMENTS

> daemon.cpp:94
>      KGlobalAccel::self()->setGlobalShortcut(action, switchDisplayShortcuts);
> -    connect(action, &QAction::triggered, [&](bool) { displayButton(); });
> +    connect(action, &QAction::triggered, this, [&](bool) { displayButton(); });
>  

You could also connect it to the method directly

  connect(action, &QAction::triggered, this, &KScreenDaemon::displayButton);

REPOSITORY
  R104 KScreen

REVISION DETAIL
  https://phabricator.kde.org/D14074

To: gladhorn, #plasma, apol
Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180712/58a02841/attachment.html>


More information about the Plasma-devel mailing list