[Development] Behaviour change in QML in Qt 5.8 regarding null
Chris Adams
chris.adams at qinetic.com.au
Mon Sep 19 03:14:51 CEST 2016
Hi,
Recently, a few unit test failures[1] in the (unreleased) QtPIM module
showed that the recent change[2] which changes the semantics of null
assignment (from JS) to a QVariant Q_PROPERTY can affect existing client
code.
Certainly, the cases which are affected are most likely edge-cases (that
is, specifically testing the type or value of the QVariant within C++ code
to detect "null" assignment), however it is probably worth raising for
discussion.
Why was the change made? The commit message tells us what was changed, but
not the reasoning behind the change. The unit tests were changed, so the
behaviour change was clearly intentional (and the old behaviour considered
problematic), and I assume that there must be very good reasons to make
such a change, but it wasn't discussed on the mailing list, so I don't know
what those reasons are.
Best regards,
Chris.
[1] https://codereview.qt-project.org/#/c/170491/
[2] https://codereview.qt-project.org/#/c/167062/
www.qinetic.com.au - Qt And QML User Experience Specialists
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160919/0f563512/attachment.html>
More information about the Development
mailing list