summaryrefslogtreecommitdiffstats
path: root/src/tools/moc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc')
-rw-r--r--src/tools/moc/generator.cpp43
-rw-r--r--src/tools/moc/moc.cpp12
-rw-r--r--src/tools/moc/moc.h2
-rw-r--r--src/tools/moc/outputrevision.h2
4 files changed, 8 insertions, 51 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 2278ba2603..d2fe5fa446 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -363,11 +363,7 @@ void Generator::generateCode()
- cdef->constructorList.count(); // "this" parameters don't have names
fprintf(out, " %4d, %4d, // properties\n", cdef->propertyList.count(), cdef->propertyList.count() ? index : 0);
- index += cdef->propertyList.count() * 3;
- if(cdef->notifyableProperties)
- index += cdef->propertyList.count();
- if (cdef->revisionedProperties)
- index += cdef->propertyList.count();
+ index += cdef->propertyList.count() * QMetaObjectPrivate::IntsPerProperty;
fprintf(out, " %4d, %4d, // enums/sets\n", cdef->enumList.count(), cdef->enumList.count() ? index : 0);
int enumsIndex = index;
@@ -888,12 +884,6 @@ void Generator::generateProperties()
if (p.user != "false")
flags |= User;
- if (p.notifyId != -1)
- flags |= Notify;
-
- if (p.revision > 0)
- flags |= Revisioned;
-
if (p.constant)
flags |= Constant;
if (p.final)
@@ -906,32 +896,13 @@ void Generator::generateProperties()
fprintf(out, " %4d, ", stridx(p.name));
generateTypeInfo(p.type);
- fprintf(out, ", 0x%.8x,\n", flags);
- }
-
- if(cdef->notifyableProperties) {
- fprintf(out, "\n // properties: notify_signal_id\n");
- for (int i = 0; i < cdef->propertyList.count(); ++i) {
- const PropertyDef &p = cdef->propertyList.at(i);
- if (p.notifyId == -1) {
- fprintf(out, " %4d,\n",
- 0);
- } else if (p.notifyId > -1) {
- fprintf(out, " %4d,\n",
- p.notifyId);
- } else {
- const int indexInStrings = strings.indexOf(p.notify);
- fprintf(out, " %4d,\n",
- indexInStrings | IsUnresolvedSignal);
- }
- }
- }
- if (cdef->revisionedProperties) {
- fprintf(out, "\n // properties: revision\n");
- for (int i = 0; i < cdef->propertyList.count(); ++i) {
- const PropertyDef &p = cdef->propertyList.at(i);
- fprintf(out, " %4d,\n", p.revision);
+ int notifyId = p.notifyId;
+ if (p.notifyId < -1) {
+ // signal is in parent class
+ const int indexInStrings = strings.indexOf(p.notify);
+ notifyId = indexInStrings | IsUnresolvedSignal;
}
+ fprintf(out, ", 0x%.8x, uint(%d), %d,\n", flags, notifyId, p.revision);
}
}
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index bfbcde1507..8bb70a76dc 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -1415,10 +1415,6 @@ void Moc::parseProperty(ClassDef *def)
createPropertyDef(propDef);
next(RPAREN);
- if(!propDef.notify.isEmpty())
- def->notifyableProperties++;
- if (propDef.revision > 0)
- ++def->revisionedProperties;
def->propertyList += propDef;
}
@@ -1512,11 +1508,6 @@ void Moc::parsePrivateProperty(ClassDef *def)
createPropertyDef(propDef);
- if(!propDef.notify.isEmpty())
- def->notifyableProperties++;
- if (propDef.revision > 0)
- ++def->revisionedProperties;
-
def->propertyList += propDef;
}
@@ -1550,9 +1541,6 @@ void Moc::parsePrivateQProperty(ClassDef *def)
next(RPAREN);
- if (!propDef.notify.isEmpty())
- def->notifyableProperties++;
-
def->propertyList += propDef;
}
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index 84ddf47a89..4d918c4dbf 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -201,9 +201,7 @@ struct ClassDef : BaseDef {
QVector<PropertyDef> propertyList;
QVector<PrivateQPropertyDef> privateQProperties;
QSet<QByteArray> qPropertyMembers;
- int notifyableProperties = 0;
int revisionedMethods = 0;
- int revisionedProperties = 0;
bool hasQObject = false;
bool hasQGadget = false;
diff --git a/src/tools/moc/outputrevision.h b/src/tools/moc/outputrevision.h
index 594775ca6b..e8d2d1b1b9 100644
--- a/src/tools/moc/outputrevision.h
+++ b/src/tools/moc/outputrevision.h
@@ -30,6 +30,6 @@
#define OUTPUTREVISION_H
// if the output revision changes, you MUST change it in qobjectdefs.h too
-enum { mocOutputRevision = 67 }; // moc format output revision
+enum { mocOutputRevision = 68 }; // moc format output revision
#endif // OUTPUTREVISION_H