Il 23/05/19 09:36, Simon Hausmann ha scritto:
I think a well-formed state is more likely to enable our users to have a productive time. Operating - by accident - on a partially-formed object and either

     (1) seeing a back-trace that points into Qt, not my application code

     (2) spending time in the debugger stepping through Qt code

is IMHO a direction that we should avoid.

To nitpick, in the proposed scenario, (2) shouldn't ever happen. In such a scenario, the d-pointer checks would be replaced by something like Q_ASSERT_X(d_ptr, "This object has been moved from"), which would fire in a debug build of Qt. (1) is a bit more tricky as it wouldn't be obvious at all what the problem is, although again, a debug build would identify it immediately.

Thanks,
--
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