Il 13/12/18 15:55, Edward Welbourne ha scritto:
Not saying it's correct, just stating the fact that function name is
confusing and potentially problematic because it doesn't do what it
states it does.
Aye, there's plenty that isn't perfect, especially in old APIs.  None
the less, the Qt project makes strong backward-compatibility promises;
part of the price of that is that we don't lightly change APIs, even
when they aren't ideally named.

Probably part of the confusion is the fact that it's called "addDays", not "daysAdded" or something like that. In Qt, APIs that use the present imperative usually modify the object itself, while the ones in the past simple return a new modified object (e.g. QString::trimmed).

My 2 c,
--
Giuseppe D'Angelo | [email protected] | 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 - The Qt, C++ and OpenGL Experts

Attachment: smime.p7s
Description: Firma crittografica S/MIME

_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to