diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-16 13:04:17 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:24:48 (GMT) |
commit | 2fd21f04d23d5dd87ca0f6db238ae268492f5528 (patch) | |
tree | 63e38e39415e1f5238a7097721c2f3ee3d95375b /tests/auto | |
parent | 60bef18b1fafffe0508b2c90e0e0b4d7f101c8b1 (diff) | |
download | Qt-2fd21f04d23d5dd87ca0f6db238ae268492f5528.zip Qt-2fd21f04d23d5dd87ca0f6db238ae268492f5528.tar.gz Qt-2fd21f04d23d5dd87ca0f6db238ae268492f5528.tar.bz2 |
QMetaType: add "signed char" as builtin.
According to the c++ specificaiton, 3.9.1 [basic.fundamentals]
Plain char, signed char, and unsigned char are three distinct types
In QMetaType, I decide that 'signed char' alias with 'char'
This allow qint8 to work nice (and which is already registered as
an alias to char (QMetaType::Char)
Reviewed-by: Joao
Task-number: QTBUG-12920
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qmetatype/tst_qmetatype.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qmetatype/tst_qmetatype.cpp b/tests/auto/qmetatype/tst_qmetatype.cpp index 9b75684..cb243f7 100644 --- a/tests/auto/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/qmetatype/tst_qmetatype.cpp @@ -160,6 +160,11 @@ void tst_QMetaType::qMetaTypeId() QCOMPARE(::qMetaTypeId<QString>(), int(QMetaType::QString)); QCOMPARE(::qMetaTypeId<int>(), int(QMetaType::Int)); QCOMPARE(::qMetaTypeId<TestSpace::Foo>(), QMetaType::type("TestSpace::Foo")); + + QCOMPARE(::qMetaTypeId<char>(), QMetaType::type("char")); + QCOMPARE(::qMetaTypeId<uchar>(), QMetaType::type("unsigned char")); + QCOMPARE(::qMetaTypeId<signed char>(), QMetaType::type("signed char")); + QCOMPARE(::qMetaTypeId<qint8>(), QMetaType::type("qint8")); } void tst_QMetaType::properties() |