diff options
-rw-r--r-- | src/tools/moc/generator.cpp | 12 | ||||
-rw-r--r-- | src/tools/moc/main.cpp | 2 | ||||
-rw-r--r-- | src/tools/moc/moc.cpp | 2 | ||||
-rw-r--r-- | src/tools/moc/preprocessor.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index d829a429a6..d15b6de490 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -186,7 +186,7 @@ bool Generator::registerableMetaType(const QByteArray &propertyType) for (const QByteArray &oneArgTemplateType : oneArgTemplates) { QByteArray ba = oneArgTemplateType + "<"; if (propertyType.startsWith(ba) && propertyType.endsWith(">")) { - const int argumentSize = propertyType.size() - oneArgTemplateType.size() - 1 + const qsizetype argumentSize = propertyType.size() - oneArgTemplateType.size() - 1 // The closing '>' - 1 // templates inside templates have an extra whitespace char to strip. @@ -204,7 +204,7 @@ static bool qualifiedNameEquals(const QByteArray &qualifiedName, const QByteArra { if (qualifiedName == name) return true; - int index = qualifiedName.indexOf("::"); + const qsizetype index = qualifiedName.indexOf("::"); if (index == -1) return false; return qualifiedNameEquals(qualifiedName.mid(index+2), name); @@ -468,7 +468,7 @@ void Generator::generateCode() if (p.type.contains('*') || p.type.contains('<') || p.type.contains('>')) continue; - int s = p.type.lastIndexOf("::"); + const qsizetype s = p.type.lastIndexOf("::"); if (s <= 0) continue; @@ -479,7 +479,7 @@ void Generator::generateCode() QByteArray thisScope = cdef->qualified; do { - int s = thisScope.lastIndexOf("::"); + const qsizetype s = thisScope.lastIndexOf("::"); thisScope = thisScope.left(s); QByteArray currentScope = thisScope.isEmpty() ? unqualifiedScope : thisScope + "::" + unqualifiedScope; scopeIt = knownExtraMetaObject.constFind(currentScope); @@ -505,7 +505,7 @@ void Generator::generateCode() for (auto it = cdef->enumDeclarations.keyBegin(), end = cdef->enumDeclarations.keyEnd(); it != end; ++it) { const QByteArray &enumKey = *it; - int s = enumKey.lastIndexOf("::"); + const qsizetype s = enumKey.lastIndexOf("::"); if (s > 0) { QByteArray scope = enumKey.left(s); if (scope != "Qt" && !qualifiedNameEquals(cdef->qualified, scope) && !extraList.contains(scope)) @@ -1617,7 +1617,7 @@ void Generator::generatePluginMetaData() }; // 'Use' all namespaces. - int pos = cdef->qualified.indexOf("::"); + qsizetype pos = cdef->qualified.indexOf("::"); for ( ; pos != -1 ; pos = cdef->qualified.indexOf("::", pos + 2) ) fprintf(out, "using namespace %s;\n", cdef->qualified.left(pos).constData()); diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp index eb359f4dbb..0d57d3b69e 100644 --- a/src/tools/moc/main.cpp +++ b/src/tools/moc/main.cpp @@ -399,7 +399,7 @@ int runMoc(int argc, char **argv) for (const QString &arg : defines) { QByteArray name = arg.toLocal8Bit(); QByteArray value("1"); - int eq = name.indexOf('='); + const qsizetype eq = name.indexOf('='); if (eq >= 0) { value = name.mid(eq + 1); name = name.left(eq); diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index eee0092a2d..d4973b87ac 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -1629,7 +1629,7 @@ void Moc::parseInterfaces(ClassDef *def) } } // resolve from classnames to interface ids - for (int i = 0; i < iface.size(); ++i) { + for (qsizetype i = 0; i < iface.size(); ++i) { const QByteArray iid = interface2IdMap.value(iface.at(i).className); if (iid.isEmpty()) error("Undefined interface"); diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index d5603696ae..7fed80565a 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -966,7 +966,7 @@ static void mergeStringLiterals(Symbols *_symbols) for (Symbols::iterator i = symbols.begin(); i != symbols.end(); ++i) { if (i->token == STRING_LITERAL) { Symbols::Iterator mergeSymbol = i; - int literalsLength = mergeSymbol->len; + qsizetype literalsLength = mergeSymbol->len; while (++i != symbols.end() && i->token == STRING_LITERAL) literalsLength += i->len - 2; // no quotes @@ -1005,7 +1005,7 @@ static QByteArray searchIncludePaths(const QList<Parser::IncludePath> &includepa break; if (p.isFrameworkPath) { - const int slashPos = include.indexOf('/'); + const qsizetype slashPos = include.indexOf('/'); if (slashPos == -1) continue; fi.setFile(QString::fromLocal8Bit(p.path + '/' + include.left(slashPos) + ".framework/Headers/"), |