summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-04-22 04:47:24 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-04-22 04:47:24 (GMT)
commit2366667fc97eb6a56203b2dd7dac776ff4164abd (patch)
treeb2acb6cc6bfe475d7e619e4788973b61fff775e0 /src/tools
parent2c762f3b8b284a7c6dc0c499b7052013bad5b707 (diff)
downloadQt-2366667fc97eb6a56203b2dd7dac776ff4164abd.zip
Qt-2366667fc97eb6a56203b2dd7dac776ff4164abd.tar.gz
Qt-2366667fc97eb6a56203b2dd7dac776ff4164abd.tar.bz2
Initial import of kinetic-dui branch from the old kinetic
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/moc/generator.cpp16
-rw-r--r--src/tools/moc/keywords.cpp162
-rw-r--r--src/tools/moc/moc.cpp11
-rw-r--r--src/tools/moc/moc.h7
-rw-r--r--src/tools/moc/token.h1
-rw-r--r--src/tools/moc/util/generate_keywords.cpp1
6 files changed, 115 insertions, 83 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index ae8a76e..7d617a3 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -66,7 +66,8 @@ enum PropertyFlags {
ResolveEditable = 0x00080000,
User = 0x00100000,
ResolveUser = 0x00200000,
- Notify = 0x00400000
+ Notify = 0x00400000,
+ Dynamic = 0x00800000
};
enum MethodFlags {
AccessPrivate = 0x00,
@@ -194,10 +195,10 @@ void Generator::generateCode()
QByteArray qualifiedClassNameIdentifier = cdef->qualified;
qualifiedClassNameIdentifier.replace(':', '_');
- int index = 12;
+ int index = 13;
fprintf(out, "static const uint qt_meta_data_%s[] = {\n", qualifiedClassNameIdentifier.constData());
fprintf(out, "\n // content:\n");
- fprintf(out, " %4d, // revision\n", 2);
+ fprintf(out, " %4d, // revision\n", 3);
fprintf(out, " %4d, // classname\n", strreg(cdef->qualified));
fprintf(out, " %4d, %4d, // classinfo\n", cdef->classInfoList.count(), cdef->classInfoList.count() ? index : 0);
index += cdef->classInfoList.count() * 2;
@@ -217,6 +218,9 @@ void Generator::generateCode()
fprintf(out, " %4d, %4d, // constructors\n", isConstructible ? cdef->constructorList.count() : 0,
isConstructible ? index : 0);
+ fprintf(out, " %4d, // flags\n", 0);
+
+
//
// Build classinfo array
//
@@ -371,7 +375,7 @@ void Generator::generateCode()
if (isQt || !cdef->hasQObject)
return;
- fprintf(out, "\nconst QMetaObject *%s::metaObject() const\n{\n return &staticMetaObject;\n}\n",
+ fprintf(out, "\nconst QMetaObject *%s::metaObject() const\n{\n return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;\n}\n",
cdef->qualified.constData());
//
// Generate smart cast function
@@ -394,8 +398,8 @@ void Generator::generateCode()
fprintf(out, " if (!strcmp(_clname, %s))\n return ", iface.at(j).interfaceId.constData());
for (int k = j; k >= 0; --k)
fprintf(out, "static_cast< %s*>(", iface.at(k).className.constData());
- fprintf(out, "const_cast< %s*>(this)%s;\n",
- cdef->classname.constData(), QByteArray(j+1, ')').constData());
+ fprintf(out, "%sconst_cast< %s*>(this)%s;\n",
+ (iface.at(j).isCast?"*":""), cdef->classname.constData(), QByteArray(j+1, ')').constData());
}
}
if (!purestSuperClass.isEmpty() && !isQObject) {
diff --git a/src/tools/moc/keywords.cpp b/src/tools/moc/keywords.cpp
index 2a4fbf9..62c16ee 100644
--- a/src/tools/moc/keywords.cpp
+++ b/src/tools/moc/keywords.cpp
@@ -43,12 +43,12 @@
// DO NOT EDIT.
static const short keyword_trans[][128] = {
- {0,0,0,0,0,0,0,0,0,525,522,0,0,0,0,0,
+ {0,0,0,0,0,0,0,0,0,539,536,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 525,252,523,526,0,38,239,524,25,26,236,234,30,235,27,237,
+ 539,252,537,540,0,38,239,538,25,26,236,234,30,235,27,237,
22,22,22,22,22,22,22,22,22,22,34,41,23,39,24,43,
0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
- 8,21,8,8,8,8,8,8,8,8,8,31,527,32,238,8,
+ 8,21,8,8,8,8,8,8,8,8,8,31,541,32,238,8,
0,1,2,3,4,5,6,7,8,9,8,8,10,11,12,13,
14,8,15,16,17,18,19,20,8,8,8,36,245,37,248,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -129,7 +129,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,290,222,0,0,461,0,0,0,
+ 0,0,0,0,0,0,0,0,290,222,0,0,475,0,0,0,
0,0,0,0,55,0,0,330,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -168,7 +168,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,485,0,0,0,0,0,0,0,0,0,0,357,
+ 0,0,0,0,499,0,0,0,0,0,0,0,0,0,0,357,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -190,7 +190,7 @@ static const short keyword_trans[][128] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,42,0,0,0,28,0,
- 530,530,530,530,530,530,530,530,530,530,0,0,0,0,0,0,
+ 544,544,544,544,544,544,544,544,544,544,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -349,7 +349,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,529,0,0,0,0,528,
+ 0,0,0,0,0,0,0,0,0,0,543,0,0,0,0,542,
0,0,0,0,0,0,0,0,0,0,0,0,0,258,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -385,7 +385,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,458,0,0,0,300,0,0,0,0,0,0,0,0,0,0,
+ 0,472,0,0,0,300,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -399,7 +399,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,475,0,0,0,0,0,372,
+ 0,0,0,0,0,0,0,0,0,489,0,0,0,0,0,372,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
@@ -415,7 +415,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,513,0,437,0,0,0,465,0,0,471,0,0,0,
+ 0,0,0,527,0,437,0,0,0,479,0,0,485,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
@@ -423,16 +423,24 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,458,0,0,0,0,0,0,0,0,0,0,440,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,450,0,506,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,497,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,486,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,450,0,520,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,500,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
@@ -884,7 +892,7 @@ static const struct
{CHARACTER, 46, 0, 0, CHARACTER},
{CHARACTER, 0, 84, 438, CHARACTER},
{CHARACTER, 0, 83, 387, CHARACTER},
- {CHARACTER, 0, 76, 440, CHARACTER},
+ {CHARACTER, 47, 0, 0, CHARACTER},
{CHARACTER, 0, 65, 441, CHARACTER},
{CHARACTER, 0, 83, 442, CHARACTER},
{CHARACTER, 0, 83, 443, CHARACTER},
@@ -894,7 +902,7 @@ static const struct
{CHARACTER, 0, 79, 447, CHARACTER},
{Q_CLASSINFO_TOKEN, 0, 0, 0, CHARACTER},
{CHARACTER, 0, 78, 449, CHARACTER},
- {CHARACTER, 47, 0, 0, CHARACTER},
+ {CHARACTER, 48, 0, 0, CHARACTER},
{CHARACTER, 0, 69, 451, CHARACTER},
{CHARACTER, 0, 82, 452, CHARACTER},
{CHARACTER, 0, 70, 453, CHARACTER},
@@ -903,69 +911,83 @@ static const struct
{CHARACTER, 0, 69, 456, CHARACTER},
{CHARACTER, 0, 83, 457, CHARACTER},
{Q_INTERFACES_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 108, 459, CHARACTER},
- {CHARACTER, 0, 115, 460, CHARACTER},
+ {CHARACTER, 0, 83, 459, CHARACTER},
+ {CHARACTER, 0, 84, 460, CHARACTER},
+ {CHARACTER, 0, 95, 461, CHARACTER},
+ {CHARACTER, 0, 73, 462, CHARACTER},
+ {CHARACTER, 0, 78, 463, CHARACTER},
+ {CHARACTER, 0, 84, 464, CHARACTER},
+ {CHARACTER, 0, 69, 465, CHARACTER},
+ {CHARACTER, 0, 82, 466, CHARACTER},
+ {CHARACTER, 0, 70, 467, CHARACTER},
+ {CHARACTER, 0, 65, 468, CHARACTER},
+ {CHARACTER, 0, 67, 469, CHARACTER},
+ {CHARACTER, 0, 69, 470, CHARACTER},
+ {CHARACTER, 0, 83, 471, CHARACTER},
+ {Q_CAST_INTERFACES_TOKEN, 0, 0, 0, CHARACTER},
+ {CHARACTER, 0, 108, 473, CHARACTER},
+ {CHARACTER, 0, 115, 474, CHARACTER},
{SIGNALS, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 111, 462, CHARACTER},
- {CHARACTER, 0, 116, 463, CHARACTER},
- {CHARACTER, 0, 115, 464, CHARACTER},
+ {CHARACTER, 0, 111, 476, CHARACTER},
+ {CHARACTER, 0, 116, 477, CHARACTER},
+ {CHARACTER, 0, 115, 478, CHARACTER},
{SLOTS, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 71, 466, CHARACTER},
- {CHARACTER, 0, 78, 467, CHARACTER},
- {CHARACTER, 0, 65, 468, CHARACTER},
- {CHARACTER, 0, 76, 469, CHARACTER},
- {Q_SIGNAL_TOKEN, 0, 83, 470, CHARACTER},
+ {CHARACTER, 0, 71, 480, CHARACTER},
+ {CHARACTER, 0, 78, 481, CHARACTER},
+ {CHARACTER, 0, 65, 482, CHARACTER},
+ {CHARACTER, 0, 76, 483, CHARACTER},
+ {Q_SIGNAL_TOKEN, 0, 83, 484, CHARACTER},
{Q_SIGNALS_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 79, 472, CHARACTER},
- {CHARACTER, 0, 84, 473, CHARACTER},
- {Q_SLOT_TOKEN, 0, 83, 474, CHARACTER},
+ {CHARACTER, 0, 79, 486, CHARACTER},
+ {CHARACTER, 0, 84, 487, CHARACTER},
+ {Q_SLOT_TOKEN, 0, 83, 488, CHARACTER},
{Q_SLOTS_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 86, 476, CHARACTER},
- {CHARACTER, 0, 65, 477, CHARACTER},
- {CHARACTER, 0, 84, 478, CHARACTER},
- {CHARACTER, 0, 69, 479, CHARACTER},
- {CHARACTER, 0, 95, 480, CHARACTER},
- {CHARACTER, 0, 83, 481, CHARACTER},
- {CHARACTER, 0, 76, 482, CHARACTER},
- {CHARACTER, 0, 79, 483, CHARACTER},
- {CHARACTER, 0, 84, 484, CHARACTER},
+ {CHARACTER, 0, 86, 490, CHARACTER},
+ {CHARACTER, 0, 65, 491, CHARACTER},
+ {CHARACTER, 0, 84, 492, CHARACTER},
+ {CHARACTER, 0, 69, 493, CHARACTER},
+ {CHARACTER, 0, 95, 494, CHARACTER},
+ {CHARACTER, 0, 83, 495, CHARACTER},
+ {CHARACTER, 0, 76, 496, CHARACTER},
+ {CHARACTER, 0, 79, 497, CHARACTER},
+ {CHARACTER, 0, 84, 498, CHARACTER},
{Q_PRIVATE_SLOT_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 48, 0, 0, CHARACTER},
- {CHARACTER, 0, 77, 487, CHARACTER},
- {CHARACTER, 0, 79, 488, CHARACTER},
- {CHARACTER, 0, 67, 489, CHARACTER},
- {CHARACTER, 0, 95, 490, CHARACTER},
- {CHARACTER, 0, 67, 491, CHARACTER},
- {CHARACTER, 0, 79, 492, CHARACTER},
- {CHARACTER, 0, 77, 493, CHARACTER},
- {CHARACTER, 0, 80, 494, CHARACTER},
- {CHARACTER, 0, 65, 495, CHARACTER},
- {CHARACTER, 0, 84, 496, CHARACTER},
+ {CHARACTER, 49, 0, 0, CHARACTER},
+ {CHARACTER, 0, 77, 501, CHARACTER},
+ {CHARACTER, 0, 79, 502, CHARACTER},
+ {CHARACTER, 0, 67, 503, CHARACTER},
+ {CHARACTER, 0, 95, 504, CHARACTER},
+ {CHARACTER, 0, 67, 505, CHARACTER},
+ {CHARACTER, 0, 79, 506, CHARACTER},
+ {CHARACTER, 0, 77, 507, CHARACTER},
+ {CHARACTER, 0, 80, 508, CHARACTER},
+ {CHARACTER, 0, 65, 509, CHARACTER},
+ {CHARACTER, 0, 84, 510, CHARACTER},
{Q_MOC_COMPAT_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 95, 498, CHARACTER},
- {CHARACTER, 0, 83, 499, CHARACTER},
- {CHARACTER, 0, 85, 500, CHARACTER},
- {CHARACTER, 0, 80, 501, CHARACTER},
- {CHARACTER, 0, 80, 502, CHARACTER},
- {CHARACTER, 0, 79, 503, CHARACTER},
- {CHARACTER, 0, 82, 504, CHARACTER},
- {CHARACTER, 0, 84, 505, CHARACTER},
+ {CHARACTER, 0, 95, 512, CHARACTER},
+ {CHARACTER, 0, 83, 513, CHARACTER},
+ {CHARACTER, 0, 85, 514, CHARACTER},
+ {CHARACTER, 0, 80, 515, CHARACTER},
+ {CHARACTER, 0, 80, 516, CHARACTER},
+ {CHARACTER, 0, 79, 517, CHARACTER},
+ {CHARACTER, 0, 82, 518, CHARACTER},
+ {CHARACTER, 0, 84, 519, CHARACTER},
{Q_QT3_SUPPORT_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 79, 507, CHARACTER},
- {CHARACTER, 0, 75, 508, CHARACTER},
- {CHARACTER, 0, 65, 509, CHARACTER},
- {CHARACTER, 0, 66, 510, CHARACTER},
- {CHARACTER, 0, 76, 511, CHARACTER},
- {CHARACTER, 0, 69, 512, CHARACTER},
+ {CHARACTER, 0, 79, 521, CHARACTER},
+ {CHARACTER, 0, 75, 522, CHARACTER},
+ {CHARACTER, 0, 65, 523, CHARACTER},
+ {CHARACTER, 0, 66, 524, CHARACTER},
+ {CHARACTER, 0, 76, 525, CHARACTER},
+ {CHARACTER, 0, 69, 526, CHARACTER},
{Q_INVOKABLE_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 82, 514, CHARACTER},
- {CHARACTER, 0, 73, 515, CHARACTER},
- {CHARACTER, 0, 80, 516, CHARACTER},
- {CHARACTER, 0, 84, 517, CHARACTER},
- {CHARACTER, 0, 65, 518, CHARACTER},
- {CHARACTER, 0, 66, 519, CHARACTER},
- {CHARACTER, 0, 76, 520, CHARACTER},
- {CHARACTER, 0, 69, 521, CHARACTER},
+ {CHARACTER, 0, 82, 528, CHARACTER},
+ {CHARACTER, 0, 73, 529, CHARACTER},
+ {CHARACTER, 0, 80, 530, CHARACTER},
+ {CHARACTER, 0, 84, 531, CHARACTER},
+ {CHARACTER, 0, 65, 532, CHARACTER},
+ {CHARACTER, 0, 66, 533, CHARACTER},
+ {CHARACTER, 0, 76, 534, CHARACTER},
+ {CHARACTER, 0, 69, 535, CHARACTER},
{Q_SCRIPTABLE_TOKEN, 0, 0, 0, CHARACTER},
{NEWLINE, 0, 0, 0, NOTOKEN},
{QUOTE, 0, 0, 0, NOTOKEN},
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index a6a0ba1..74ca1ad 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -654,8 +654,11 @@ void Moc::parse()
case Q_CLASSINFO_TOKEN:
parseClassInfo(&def);
break;
+ case Q_CAST_INTERFACES_TOKEN:
+ parseInterfaces(&def, true);
+ break;
case Q_INTERFACES_TOKEN:
- parseInterfaces(&def);
+ parseInterfaces(&def, false);
break;
case Q_PRIVATE_SLOT_TOKEN:
parseSlotInPrivate(&def, access);
@@ -1025,12 +1028,12 @@ void Moc::parseClassInfo(ClassDef *def)
def->classInfoList += infoDef;
}
-void Moc::parseInterfaces(ClassDef *def)
+void Moc::parseInterfaces(ClassDef *def, bool isCast)
{
next(LPAREN);
while (test(IDENTIFIER)) {
QList<ClassDef::Interface> iface;
- iface += ClassDef::Interface(lexem());
+ iface += ClassDef::Interface(lexem(), isCast);
while (test(SCOPE)) {
iface.last().className += lexem();
next(IDENTIFIER);
@@ -1038,7 +1041,7 @@ void Moc::parseInterfaces(ClassDef *def)
}
while (test(COLON)) {
next(IDENTIFIER);
- iface += ClassDef::Interface(lexem());
+ iface += ClassDef::Interface(lexem(), isCast);
while (test(SCOPE)) {
iface.last().className += lexem();
next(IDENTIFIER);
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index 689104c..c02864a 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -144,10 +144,11 @@ struct ClassDef {
struct Interface
{
- inline explicit Interface(const QByteArray &_className)
- : className(_className) {}
+ inline explicit Interface(const QByteArray &_className, bool _isCast)
+ : className(_className), isCast(_isCast) {}
QByteArray className;
QByteArray interfaceId;
+ bool isCast;
};
QList<QList<Interface> >interfaceList;
@@ -217,7 +218,7 @@ public:
void parseEnumOrFlag(ClassDef *def, bool isFlag);
void parseFlag(ClassDef *def);
void parseClassInfo(ClassDef *def);
- void parseInterfaces(ClassDef *def);
+ void parseInterfaces(ClassDef *def, bool isCast);
void parseDeclareInterface();
void parseDeclareMetatype();
void parseSlotInPrivate(ClassDef *def, FunctionDef::Access access);
diff --git a/src/tools/moc/token.h b/src/tools/moc/token.h
index 13c9a1d..7734a63 100644
--- a/src/tools/moc/token.h
+++ b/src/tools/moc/token.h
@@ -176,6 +176,7 @@ enum Token {
Q_DECLARE_METATYPE_TOKEN,
Q_CLASSINFO_TOKEN,
Q_INTERFACES_TOKEN,
+ Q_CAST_INTERFACES_TOKEN,
Q_SIGNALS_TOKEN,
Q_SLOTS_TOKEN,
Q_SIGNAL_TOKEN,
diff --git a/src/tools/moc/util/generate_keywords.cpp b/src/tools/moc/util/generate_keywords.cpp
index 116be2b..a1a8215 100644
--- a/src/tools/moc/util/generate_keywords.cpp
+++ b/src/tools/moc/util/generate_keywords.cpp
@@ -237,6 +237,7 @@ static const Keyword keywords[] = {
{ "Q_SETS", "Q_FLAGS_TOKEN" },
{ "Q_CLASSINFO", "Q_CLASSINFO_TOKEN" },
{ "Q_INTERFACES", "Q_INTERFACES_TOKEN" },
+ { "Q_CAST_INTERFACES", "Q_CAST_INTERFACES_TOKEN" },
{ "signals", "SIGNALS" },
{ "slots", "SLOTS" },
{ "Q_SIGNALS", "Q_SIGNALS_TOKEN" },