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

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Fri Mar 15 20:58:24 CET 2024


Il 15/03/24 19:22, Giuseppe D'Angelo via Development ha scritto:
> 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++.

I'm really sorry, I just realized that this can be read in a very 
offensive way: the "you" above was in *no* way directed to Jaroslaw 
Kobus. It was a generic "you" -- as opposed as "I know better", for a 
generic subject "I", not necessarily the writer. I apologize to 
Jaroslaw if this caused a misunderstanding.

-- 
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/42fc8480/attachment.bin>


More information about the Development mailing list