Align QVariant::UserType and QMetaType::User
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>
Mon, 30 Jan 2012 11:21:43 +0000 (12:21 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 7 Feb 2012 07:52:32 +0000 (08:52 +0100)
commit56265031b763736163f1a229a7e7e6b7aaec8a36
tree74adf46c46a98ddda122f7bcc150af67af2388a1
parenta6505007295c7363ef1b0ee4aa81d15a2b470a7e
Align QVariant::UserType and QMetaType::User

There is no point in keeping separate values which should mean the
same.

QVariant::UserType was used also to construct a valid, null QVariant,
containing an instance of unknown custom type. The concept was strange
and useless as there was no operation that could be done on such
QVariant. Therefore it was dropped.

Please note that the patch slightly changes behavior of different
functions accepting a type id as parameter. Before QVariant::UserType
was an invalid type from QMetaType perspective (id 127 was not assigned
to any built-in type), but QMetaType::User points to the first registered
custom type.

Change-Id: I5c7d541a9affdcdacf53a4eda2272bdafaa87b71
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
dist/changes-5.0.0
src/corelib/kernel/qmetaobject.cpp
src/corelib/kernel/qvariant.cpp
src/corelib/kernel/qvariant.h
src/corelib/kernel/qvariant_p.h
tests/auto/corelib/kernel/qobject/tst_qobject.cpp
tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
tests/auto/dbus/qdbusmarshall/common.h