D21354: Port to new connect syntax

Albert Astals Cid noreply at phabricator.kde.org
Thu May 23 00:15:39 BST 2019


aacid added inline comments.

INLINE COMMENTS

> ngraham wrote in delegate.cpp:46
> I'd love to, and I tried, but this stuff is pretty new to me and I kept getting `error: cannot define member function` What's wrong with this?
> 
>   connect(comboBox, &QComboBox::activated,
>           [comboBox]() { emit commitData(comboBox); });

without having tried it, you probably still need the QOverload to say which activated version you want, so

connect(comboBox, QOverload<int>::of(&QComboBox::activated), this, [this, comboBox] { emit commitData(comboBox); });

> ngraham wrote in delegate.h:41
> `QComboBox::activated` passes an int argument along that as far as I can tell (I could be wrong) needs to be handled by the function it's connected to

nah, the right hand side needs to be a subset of the left hand side (or be able to convert from one to another)

REPOSITORY
  R432 File Sharing (Samba) integration

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

To: ngraham, #frameworks, apol
Cc: bruns, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190522/9c0562a4/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list