summaryrefslogtreecommitdiffstats
path: root/src/tools/moc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc')
-rw-r--r--src/tools/moc/generator.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 3546d2e395..2d48c50c83 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -244,7 +244,7 @@ void Generator::generateCode()
int len = 0;
for (int i = 0; i < strings.size(); ++i)
len += strings.at(i).length() + 1;
- fprintf(out, " char stringdata[%d];\n", len + 1);
+ fprintf(out, " char stringdata[%d];\n", len);
}
fprintf(out, "};\n");
@@ -316,7 +316,8 @@ void Generator::generateCode()
col += spanLen;
}
- fputs("\\0", out);
+ if (i != strings.size() - 1) // skip the last \0 the c++ will add it for us
+ fputs("\\0", out);
col += len + 2;
}
@@ -637,12 +638,6 @@ void Generator::generateFunctions(const QList<FunctionDef>& list, const char *fu
flags |= AccessPublic;
else if (f.access == FunctionDef::Protected)
flags |= AccessProtected;
- if (f.access == FunctionDef::Private)
- flags |= AccessPrivate;
- else if (f.access == FunctionDef::Public)
- flags |= AccessPublic;
- else if (f.access == FunctionDef::Protected)
- flags |= AccessProtected;
if (f.isCompat)
flags |= MethodCompatibility;
if (f.wasCloned)