diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-03-12 21:03:49 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2012-03-12 21:03:49 +0100 |
commit | d5098f2802255da10b749b93705084ad1fdfc6a5 (patch) | |
tree | 6462008a4ab7d13435d93490fed96c62c516cbdf /src/corelib/kernel/qmetatype.cpp | |
parent | d5a85940f785459d7b982d5fdf59a9fd18825092 (diff) | |
parent | b5b41c18345719612e5411cc482466d2dbafdaf7 (diff) |
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
Diffstat (limited to 'src/corelib/kernel/qmetatype.cpp')
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index a5dc179113..8474635fe7 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -375,8 +375,9 @@ void QMetaType::registerStreamOperators(int idx, SaveOperator saveOp, \sa type(), isRegistered(), Type */ -const char *QMetaType::typeName(int type) +const char *QMetaType::typeName(int typeId) { + const uint type = typeId; // In theory it can be filled during compilation time, but for some reason template code // that is able to do it causes GCC 4.6 to generate additional 3K of executable code. Probably // it is not worth of it. @@ -398,7 +399,7 @@ const char *QMetaType::typeName(int type) } else { const QVector<QCustomTypeInfo> * const ct = customTypes(); QReadLocker locker(customTypesLock()); - return ct && ct->count() > type - QMetaType::User && !ct->at(type - QMetaType::User).typeName.isEmpty() + return ct && uint(ct->count()) > type - QMetaType::User && !ct->at(type - QMetaType::User).typeName.isEmpty() ? ct->at(type - QMetaType::User).typeName.constData() : 0; } |