diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-04-16 12:04:34 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2012-04-16 12:04:34 +0200 |
commit | 9bd032355163d92cda5e7e59ecd21214b131f187 (patch) | |
tree | 002fa12558505683143c7eb08949a3d225bf0712 /src/tools/moc/generator.cpp | |
parent | d037d25c3d5236623371cf051aaf6a9e59792ba7 (diff) | |
parent | 41673c45dde2eb95ee21dd918235218399f2be2c (diff) |
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
configure
src/corelib/io/qurl.cpp
src/gui/kernel/qwindow.cpp
src/tools/moc/generator.cpp
src/widgets/kernel/qwidget_qpa.cpp
src/widgets/styles/qstyle.h
src/widgets/widgets/qtabbar.cpp
tests/auto/corelib/codecs/utf8/tst_utf8.cpp
Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
Diffstat (limited to 'src/tools/moc/generator.cpp')
-rw-r--r-- | src/tools/moc/generator.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index cc66ca9963..74cdc5874c 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -1213,8 +1213,14 @@ void Generator::generateSignal(FunctionDef *def,int index) fprintf(out, "%s _t%d%s", a.type.name.constData(), offset++, a.rightType.constData()); } fprintf(out, ")%s\n{\n", constQualifier); - if (def->type.name.size() && def->normalizedType != "void") - fprintf(out, " %s _t0 = %s();\n", noRef(def->normalizedType).constData(), noRef(def->normalizedType).constData()); + if (def->type.name.size() && def->normalizedType != "void") { + QByteArray returnType = noRef(def->normalizedType); + if (returnType.endsWith('*')) { + fprintf(out, " %s _t0 = 0;\n", returnType.constData()); + } else { + fprintf(out, " %s _t0 = %s();\n", returnType.constData(), returnType.constData()); + } + } fprintf(out, " void *_a[] = { "); if (def->normalizedType == "void") { |