summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-22 09:24:51 (GMT)
committeraxis <qt-info@nokia.com>2010-03-22 09:24:51 (GMT)
commite48850c6ec90cd5eaa95d07573c2afa1a1c4f67f (patch)
treec53fa338b532c986b4baa1b481e5406f2fa16b5a /src/tools/moc/moc.cpp
parent390d7f64d9afa288fb2c01fc70eddc8b1f5ff585 (diff)
parent7491a2ecfdd0fe883c72d2ee60ca72393c2990d9 (diff)
downloadQt-e48850c6ec90cd5eaa95d07573c2afa1a1c4f67f.zip
Qt-e48850c6ec90cd5eaa95d07573c2afa1a1c4f67f.tar.gz
Qt-e48850c6ec90cd5eaa95d07573c2afa1a1c4f67f.tar.bz2
Merge branch '4.6-s60' into 4.7-s60
Conflicts: configure.exe mkspecs/common/symbian/symbian.conf src/gui/graphicsview/qgraphicswidget.h src/gui/kernel/qapplication.cpp src/gui/text/qtextlayout.cpp src/openvg/qpixmapdata_vg.cpp src/s60installs/s60installs.pro tools/runonphone/main.cpp tools/runonphone/serenum_unix.cpp qtextlayout.cpp fixed up together with Eskil. Kept the configure.exe from 4.7 without recompile.
Diffstat (limited to 'src/tools/moc/moc.cpp')
-rw-r--r--src/tools/moc/moc.cpp44
1 files changed, 39 insertions, 5 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 94ad56f..680b8a5 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -658,6 +658,9 @@ void Moc::parse()
case Q_PRIVATE_SLOT_TOKEN:
parseSlotInPrivate(&def, access);
break;
+ case Q_PRIVATE_PROPERTY_TOKEN:
+ parsePrivateProperty(&def);
+ break;
case ENUM: {
EnumDef enumDef;
if (parseEnum(&enumDef))
@@ -872,11 +875,8 @@ void Moc::parseSignals(ClassDef *def)
}
}
-
-void Moc::parseProperty(ClassDef *def)
+void Moc::createPropertyDef(PropertyDef &propDef)
{
- next(LPAREN);
- PropertyDef propDef;
QByteArray type = parseType().name;
if (type.isEmpty())
error();
@@ -964,7 +964,6 @@ void Moc::parseProperty(ClassDef *def)
error(2);
}
}
- next(RPAREN);
if (propDef.read.isNull()) {
QByteArray msg;
msg += "Property declaration ";
@@ -988,6 +987,41 @@ void Moc::parseProperty(ClassDef *def)
propDef.constant = false;
warning(msg.constData());
}
+}
+
+void Moc::parseProperty(ClassDef *def)
+{
+ next(LPAREN);
+ PropertyDef propDef;
+ createPropertyDef(propDef);
+ next(RPAREN);
+
+
+ if(!propDef.notify.isEmpty())
+ def->notifyableProperties++;
+ def->propertyList += propDef;
+}
+
+void Moc::parsePrivateProperty(ClassDef *def)
+{
+ next(LPAREN);
+ PropertyDef propDef;
+ next(IDENTIFIER);
+ propDef.inPrivateClass = lexem();
+ while (test(SCOPE)) {
+ propDef.inPrivateClass += lexem();
+ next(IDENTIFIER);
+ propDef.inPrivateClass += lexem();
+ }
+ // also allow void functions
+ if (test(LPAREN)) {
+ next(RPAREN);
+ propDef.inPrivateClass += "()";
+ }
+
+ next(COMMA);
+
+ createPropertyDef(propDef);
if(!propDef.notify.isEmpty())
def->notifyableProperties++;