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 /src | |
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 'src')
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 1 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 5820ded..fcc8a65 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -311,6 +311,7 @@ static const struct { const char * typeName; int typeNameLength; int type; } typ QT_ADD_STATIC_METATYPE("long long", QMetaType::LongLong), QT_ADD_STATIC_METATYPE("unsigned long long", QMetaType::ULongLong), QT_ADD_STATIC_METATYPE("qint8", QMetaType::Char), + QT_ADD_STATIC_METATYPE("signed char", QMetaType::Char), QT_ADD_STATIC_METATYPE("quint8", QMetaType::UChar), QT_ADD_STATIC_METATYPE("qint16", QMetaType::Short), QT_ADD_STATIC_METATYPE("quint16", QMetaType::UShort), diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index a029dee..36131d1 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -353,6 +353,7 @@ Q_DECLARE_BUILTIN_METATYPE(QChar, QChar) Q_DECLARE_BUILTIN_METATYPE(long, Long) Q_DECLARE_BUILTIN_METATYPE(short, Short) Q_DECLARE_BUILTIN_METATYPE(char, Char) +Q_DECLARE_BUILTIN_METATYPE(signed char, Char) Q_DECLARE_BUILTIN_METATYPE(ulong, ULong) Q_DECLARE_BUILTIN_METATYPE(ushort, UShort) Q_DECLARE_BUILTIN_METATYPE(uchar, UChar) |