D21354: Port to new connect syntax
Nathaniel Graham
noreply at phabricator.kde.org
Wed May 22 23:45:28 BST 2019
ngraham added inline comments.
INLINE COMMENTS
> bruns wrote in delegate.cpp:46
> use a lambda here:
>
> - avoids the single-use `emitCommitData` wrapper
> - avoids the need for `qobject_cast<QWidget*>(sender())`, which is the combobox (just capture it).
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); });
> aacid wrote in delegate.h:41
> why add the int if you're not going to use it?
`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
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/6bdeca01/attachment.html>
More information about the Kde-frameworks-devel
mailing list