qt5base-lts/tests/auto
Thiago Macieira cf475b91ae Implement proper C++ type numeric promotion for QVariant comparisons
Previously, QVariant would try to convert one operand to the other's
type, which would produce unexpected results: the results would depend
in the order of the operands and whether there was data loss in the
conversion. In addition, ordering comparisons were only done with signed
values, yielding other unexpected results, like
   QVariant(LLONG_MAX / 2) < QVariant(Q_UINT64_C(0)).

Instead, try to obey the C++ standard rules for type promotion in
expressions. Our code is a little simpler than the standard would seem
to require since we know some more details from the ABI.

[ChangeLog][Important Behavior Changes][QVariant] QVariant now obeys the
C++ type promotion rules when comparing numeric types (integrals, float
and double), including the fact that unsigned comparisons are preferred
for types of the same rank (that is, now QVariant(-1) > QVariant(0U)).

Task-number: QTBUG-42722
Change-Id: Ie7b19073dcb45485354710975e561bcdb1a753f1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2014-12-03 18:09:00 +01:00
..
android Update license headers and add new license files 2014-09-24 12:26:19 +02:00
bic/data
cmake Update license headers and add new license files 2014-09-24 12:26:19 +02:00
compilerwarnings/data
concurrent Update license headers and add new license files 2014-09-24 12:26:19 +02:00
corelib Implement proper C++ type numeric promotion for QVariant comparisons 2014-12-03 18:09:00 +01:00
dbus Autotest: synchronize with the peer before emitting more signals 2014-10-31 03:57:24 +01:00
gui Merge remote-tracking branch 'origin/5.4' into dev 2014-11-24 13:39:13 +01:00
guiapplauncher
installed_cmake
network SSL: Add support for selecting which curves should be used by an elliptic cipher 2014-11-26 22:07:56 +01:00
opengl Fixed QtGui's GL paint engine getting out of sync when using QtOpenGL 2014-11-11 19:24:34 +01:00
other Merge remote-tracking branch 'origin/5.4' into dev 2014-11-24 13:39:13 +01:00
printsupport Make it possible to disable font embedding 2014-11-15 08:49:15 +01:00
shared Android: Keyboard doesn't hide from done button 2014-10-25 07:19:35 +02:00
sql Expose QSqlDriverPrivate dbmsType in public QSqlDriver api 2014-09-24 14:44:49 +02:00
testlib Update license headers and add new license files 2014-09-24 12:26:19 +02:00
tools Merge remote-tracking branch 'origin/5.4' into dev 2014-11-24 13:39:13 +01:00
widgets QAbstractScrollArea: add a getter for the margins 2014-12-03 18:03:09 +01:00
xml Fix QDomDocument::importNode() crashing on null nodes 2014-10-07 23:08:18 +02:00
auto.pro iOS: Enable building of basic tests 2014-01-22 12:35:17 +01:00
network-settings.h Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qtest-config.h Update license headers and add new license files 2014-09-24 12:26:19 +02:00
test.pl Update license headers and add new license files 2014-09-24 12:26:19 +02:00