[Development] Removing overloaded signals in Qt6
ville.voutilainen at gmail.com
Fri Nov 29 13:06:40 CET 2019
On Fri, 29 Nov 2019 at 12:21, Sérgio Martins <sergio.martins at kdab.com> wrote:
> On 2019-11-29 08:15, Ville Voutilainen wrote:
> > On Wed, 27 Nov 2019 at 17:52, Sérgio Martins via Development
> > <development at qt-project.org> wrote:
> >> I suggest we rename such signals, as KDE is already doing for KF6
> >> (maybe
> >> leave the old signatures there, to reduce Qt6 SIC)
> >> There's also a new clazy check 'overloaded-signal' to help finding
> >> them.
> > Any thoughts
> > on overloaded slots, or overloaded member functions as slot-targets?
> > The latter are a tad
> > harder to diagnose.
> slots are a different case, since you can simply connect to a lamdba
> that calls the slot. Which is already
> what you do when the slot arguments don't match, too.
> Another difference is that many slots are setters. Renaming setters
> starts to feel weird.
> So I would leave the slots alone.
Sure, mostly agreed - I was wondering whether we are going to try any
diagnostics for slots. The ones
you linked to smell like warnings about declarations, not warnings
about use, and that kinda prompted
my question - we are warning about things that might never be a
problem when we warn about a declaration.
That's the very definition of what "false positive" means.
I think we should have a mild consideration for renaming some of the
overloaded slots. Lambdas are a work-around,
but it's downright unfortunate if simply taking an address of a member
function doesn't work without a cast.
More information about the Development