summaryrefslogtreecommitdiff
path: root/src/tools/moc/moc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc/moc.cpp')
-rw-r--r--src/tools/moc/moc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 74b1ace7d1..4a2ba68b80 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -292,8 +292,8 @@ void Moc::parseFunctionArguments(FunctionDef *def)
arg.rightType += ' ';
arg.rightType += lexem();
}
- arg.normalizedType = normalizeType(arg.type.name + ' ' + arg.rightType);
- arg.typeNameForCast = normalizeType(noRef(arg.type.name) + "(*)" + arg.rightType);
+ arg.normalizedType = normalizeType(QByteArray(arg.type.name + ' ' + arg.rightType));
+ arg.typeNameForCast = normalizeType(QByteArray(noRef(arg.type.name) + "(*)" + arg.rightType));
if (test(EQ))
arg.isDefault = true;
def->arguments += arg;
@@ -356,8 +356,9 @@ bool Moc::testFunctionRevision(FunctionDef *def)
bool Moc::parseFunction(FunctionDef *def, bool inMacro)
{
def->isVirtual = false;
+ def->isStatic = false;
//skip modifiers and attributes
- while (test(INLINE) || test(STATIC) ||
+ while (test(INLINE) || (test(STATIC) && (def->isStatic = true)) ||
(test(VIRTUAL) && (def->isVirtual = true)) //mark as virtual
|| testFunctionAttribute(def) || testFunctionRevision(def)) {}
bool templateFunction = (lookup() == TEMPLATE);
@@ -447,8 +448,9 @@ bool Moc::parseFunction(FunctionDef *def, bool inMacro)
bool Moc::parseMaybeFunction(const ClassDef *cdef, FunctionDef *def)
{
def->isVirtual = false;
+ def->isStatic = false;
//skip modifiers and attributes
- while (test(EXPLICIT) || test(INLINE) || test(STATIC) ||
+ while (test(EXPLICIT) || test(INLINE) || (test(STATIC) && (def->isStatic = true)) ||
(test(VIRTUAL) && (def->isVirtual = true)) //mark as virtual
|| testFunctionAttribute(def) || testFunctionRevision(def)) {}
bool tilde = test(TILDE);