[Interest] Are slots even needed these days?

Bob Hood bhood2 at comcast.net
Wed Mar 16 23:41:33 CET 2016


On 3/16/2016 3:37 PM, André Pönitz wrote:
> On Wed, Mar 16, 2016 at 02:31:33PM +0000, Gian Maxera wrote:
>>> I can connect to Foo::bar either way. If I don't intend to ever use
>>> the old-style connect syntax, is there a reason to have "public
>>> slots:" anymore?
>> One reason that for me it’s fundamental: Readability of your code !!!
> It doesn't make the code more readable then a comment
>
>     // This is a slot !!!
>     void foo();

I would argument that it /does/when you have legions of people out there 
already conditioned to this:

    ...
    public slots:
        void  bar();
        void  foo();
    ...

instead of:

    ...
        // This is a slot!!!
        void foo();
    ...
        // Oh, hey, this is a slot too!!!
        void bar();
    ...

As a Qt developer, I find the former more elegant and self-documenting.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160316/16014d21/attachment.html>


More information about the Interest mailing list