summaryrefslogtreecommitdiffstats
path: root/src/tools/moc
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2012-02-29 09:18:59 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2012-02-29 09:23:14 +1000
commit98dd1781d9256f68025d2a2db408f4f5947f3214 (patch)
treedbe1424abd90014edb5546c920ca585ed62b46e3 /src/tools/moc
parent6c1bdc1854a7700c2b3a345b95f6a2fdca84037d (diff)
parentfa1b9070af66edb81b2a3735c1951f78b22bd666 (diff)
Merge master -> api_changes
Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac. Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
Diffstat (limited to 'src/tools/moc')
-rw-r--r--src/tools/moc/generator.cpp12
-rw-r--r--src/tools/moc/outputrevision.h2
-rw-r--r--src/tools/moc/util/generate_keywords.pro8
3 files changed, 9 insertions, 13 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index c7c7d96487..ac602fd6e8 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -951,13 +951,17 @@ void Generator::generateStaticMetacall()
}
fprintf(out, " default: ;\n");
fprintf(out, " }\n");
-
- fprintf(out, " } else if (_c == QMetaObject::IndexOfMethod) {\n");
+ fprintf(out, " }");
+ needElse = true;
+ }
+ if (!cdef->signalList.isEmpty()) {
+ Q_ASSERT(needElse); // if there is signal, there was method.
+ fprintf(out, " else if (_c == QMetaObject::IndexOfMethod) {\n");
fprintf(out, " int *result = reinterpret_cast<int *>(_a[0]);\n");
fprintf(out, " void **func = reinterpret_cast<void **>(_a[1]);\n");
bool anythingUsed = false;
- for (int methodindex = 0; methodindex < methodList.size(); ++methodindex) {
- const FunctionDef &f = methodList.at(methodindex);
+ for (int methodindex = 0; methodindex < cdef->signalList.size(); ++methodindex) {
+ const FunctionDef &f = cdef->signalList.at(methodindex);
if (f.wasCloned || !f.inPrivateClass.isEmpty() || f.isStatic)
continue;
anythingUsed = true;
diff --git a/src/tools/moc/outputrevision.h b/src/tools/moc/outputrevision.h
index 15661a43aa..2ce5b9b765 100644
--- a/src/tools/moc/outputrevision.h
+++ b/src/tools/moc/outputrevision.h
@@ -43,6 +43,6 @@
#define OUTPUTREVISION_H
// if the output revision changes, you MUST change it in qobjectdefs.h too
-enum { mocOutputRevision = 63 }; // moc format output revision
+enum { mocOutputRevision = 64 }; // moc format output revision
#endif // OUTPUTREVISION_H
diff --git a/src/tools/moc/util/generate_keywords.pro b/src/tools/moc/util/generate_keywords.pro
index eb04409922..88e5553f54 100644
--- a/src/tools/moc/util/generate_keywords.pro
+++ b/src/tools/moc/util/generate_keywords.pro
@@ -1,12 +1,4 @@
-######################################################################
-# Automatically generated by qmake (1.08a) Mon Feb 23 13:08:28 2004
-######################################################################
-
-TEMPLATE = app
CONFIG -= moc
mac:CONFIG -= app_bundle
-INCLUDEPATH += .
-# Input
SOURCES += generate_keywords.cpp
-CONFIG += qt create_prl link_prl