#endif
// This code is shared with moc.cpp
-static inline QByteArray normalizeTypeInternal(const char *t, const char *e, bool fixScope = false, bool adjustConst = true)
+static inline QByteArray normalizeTypeInternal(const char *t, const char *e, bool adjustConst = true)
{
int len = e - t;
/*
*/
QByteArray constbuf;
for (int i = 1; i < len; i++) {
- if ( t[i] == 'c'
- && strncmp(t + i + 1, "onst", 4) == 0
+ if ( strncmp(t + i, "const", 5) == 0
&& (i + 5 >= len || !is_ident_char(t[i + 5]))
&& !is_ident_char(t[i-1])
) {
bool star = false;
while (t != e) {
char c = *t++;
- if (fixScope && c == ':' && *t == ':' ) {
- ++t;
- c = *t++;
- int i = result.size() - 1;
- while (i >= 0 && is_ident_char(result.at(i)))
- --i;
- result.resize(i + 1);
- }
star = star || c == '*';
result += c;
if (c == '<') {
if (c == '>')
--templdepth;
if (templdepth == 0 || (templdepth == 1 && c == ',')) {
- result += normalizeTypeInternal(tt, t-1, fixScope, false);
+ result += normalizeTypeInternal(tt, t-1, false);
result += c;
if (templdepth == 0) {
if (*t == '>')
QT_BEGIN_NAMESPACE
// only moc needs this function
-static QByteArray normalizeType(const char *s, bool fixScope = false)
+static QByteArray normalizeType(const char *s)
{
int len = qstrlen(s);
char stackbuf[64];
*d = '\0';
QByteArray result;
if (strncmp("void", buf, d - buf) != 0)
- result = normalizeTypeInternal(buf, d, fixScope);
+ result = normalizeTypeInternal(buf, d);
if (buf != stackbuf)
delete [] buf;
return result;