diff --git a/tools/mtc/src/main.cpp b/tools/mtc/src/main.cpp index 562dd6e02e..7a546ab529 100644 --- a/tools/mtc/src/main.cpp +++ b/tools/mtc/src/main.cpp @@ -120,7 +120,7 @@ void generateOutput (QTextStream& out, const QList& streamables) { out << "QHash " << name << "::createFieldIndices() {\n"; out << " QHash indices;\n"; - out << " int index = 0;\n"; + out << " int index = 1;\n"; foreach (const QString& base, str.clazz.bases) { out << " foreach (const MetaField& field, " << base << "::getMetaFields()) {\n"; out << " indices.insert(field.getName(), index++);\n";