diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2019-12-11 18:13:28 +0100 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2020-02-20 16:11:02 +0100 |
commit | 4dbac23e5354638224d8d99ba3342067c015a04b (patch) | |
tree | ac262e76f0e6b04378fb653192b216a6f8d1ef68 /src/corelib/kernel/qmetaobject.cpp | |
parent | 33cd680ddbaccf6139e215d851a39e657ae36394 (diff) |
Normalize types at compile time
This also fix the normalization algorithm:
- Some 'const' after pointers were not removed as they should.
- No need to keep the space in '> >' and '< :' in C++11 anymore
- Fix normalization of 'long unsigned int' and similar
Change-Id: I2b72f0fede96c1063e7b155d9f25a85fccfc7bf9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
-rw-r--r-- | src/corelib/kernel/qmetaobject.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index f4d0a88529..62de104c30 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -1315,17 +1315,7 @@ static char *qNormalizeType(char *d, int &templdepth, QByteArray &result) */ QByteArray QMetaObject::normalizedType(const char *type) { - QByteArray result; - - if (!type || !*type) - return result; - - QVarLengthArray<char> stackbuf(qstrlen(type) + 1); - qRemoveWhitespace(type, stackbuf.data()); - int templdepth = 0; - qNormalizeType(stackbuf.data(), templdepth, result); - - return result; + return normalizeTypeInternal(type, type + qstrlen(type)); } /*! |