diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-16 13:04:17 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-16 14:22:18 (GMT) |
commit | 8afc6773067bb878020c29b3bebfe8662e3fbfdd (patch) | |
tree | 33714f6a948e0bddc19ba6fabb79b4b668da1e0c /tests | |
parent | 48c296a4efec203c60dcaccf08cb7ff52d692af5 (diff) | |
download | Qt-8afc6773067bb878020c29b3bebfe8662e3fbfdd.zip Qt-8afc6773067bb878020c29b3bebfe8662e3fbfdd.tar.gz Qt-8afc6773067bb878020c29b3bebfe8662e3fbfdd.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')
-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 8558e06..eaa19d0 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() |