[Development] Should QObject::event() be protected or public?

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Fri Mar 15 19:22:16 CET 2024


Il 15/03/24 19:17, Jaroslaw Kobus via Development ha scritto:
> +1. Typically, the designer of a subclass knows what he is doing. But it
>   also happens that users of this class know better how to use it :)

I'm not sure what this means.

If you override `event()` (public in QObject) as e.g. protected, it's 
either a mistake in good faith (you thought it was protected all along), 
but it's never a "I know better". You clearly *don't* know better, as 
you don't know C++.

My 2 c,

-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - Trusted Software Excellence

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20240315/234d3489/attachment.bin>


More information about the Development mailing list