summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2012-03-14 15:15:17 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-22 11:52:23 +0100
commit5ea56e93f74c0df88aa956199e6bb0db2f17bfba (patch)
tree80e409f9b5ceeed8d8149cf8163de5bfb9b6b4aa /tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
parent55fa3c189f88933d390177ad5606d3de9deacf93 (diff)
Reserve more space for built-in types in id space.
We are running out of type ids for built-in types, 255 is not enough. QMetaType already contains about ~70 types, situation is maybe not tragic now, but there is a great chance that we will want to add more built-in types from different modules like jsondb or declarative. Then it might be tight, because we are not allowed to reorganize type ids (it would be a binary incompatible change). This change was not possible up to now. Old moc generated code assumes that type id can be safely stored in 8 bits. This is source compatible change. Change-Id: Iec600adf6b6196a9f3f06ca6d865911084390cc2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp')
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index b6cb6b3632..1e382dde3a 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -2827,7 +2827,7 @@ Q_DECLARE_METATYPE( MyClass )
void tst_QVariant::loadUnknownUserType()
{
qRegisterMetaType<MyClass>("MyClass");
- char data[] = {0, 0, 1, 0, 0, 0, 0, 0, 8, 77, 121, 67, 108, 97, 115, 115, 0};
+ char data[] = {0, 0, QMetaType::User >> 8 , char(QMetaType::User), 0, 0, 0, 0, 8, 'M', 'y', 'C', 'l', 'a', 's', 's', 0};
QByteArray ba(data, sizeof(data));
QDataStream ds(&ba, QIODevice::ReadOnly);