mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
drop unused extra data of QMetaObject
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
6ff87ca550
commit
2fa4e0cdc5
5 changed files with 2 additions and 40 deletions
|
@ -32,7 +32,7 @@ class QByteArray;
|
||||||
|
|
||||||
class QString;
|
class QString;
|
||||||
|
|
||||||
#define Q_MOC_OUTPUT_REVISION 66
|
#define Q_MOC_OUTPUT_REVISION 67
|
||||||
|
|
||||||
// The following macros are our "extensions" to C++
|
// The following macros are our "extensions" to C++
|
||||||
// They are used, strictly speaking, only by the moc.
|
// They are used, strictly speaking, only by the moc.
|
||||||
|
@ -359,7 +359,6 @@ struct Q_CORE_EXPORT QMetaObject
|
||||||
#else
|
#else
|
||||||
const QMetaObject **relatedMetaObjects;
|
const QMetaObject **relatedMetaObjects;
|
||||||
#endif
|
#endif
|
||||||
void *extradata; //reserved for future use
|
|
||||||
} d;
|
} d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,7 @@ void QDBusAdaptorConnector::qt_static_metacall(QObject *_o, QMetaObject::Call _c
|
||||||
|
|
||||||
const QMetaObject QDBusAdaptorConnector::staticMetaObject = {
|
const QMetaObject QDBusAdaptorConnector::staticMetaObject = {
|
||||||
{ &QObject::staticMetaObject, qt_meta_stringdata_QDBusAdaptorConnector,
|
{ &QObject::staticMetaObject, qt_meta_stringdata_QDBusAdaptorConnector,
|
||||||
qt_meta_data_QDBusAdaptorConnector, qt_static_metacall, nullptr, nullptr }
|
qt_meta_data_QDBusAdaptorConnector, qt_static_metacall, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef Q_NO_DATA_RELOCATION
|
#ifdef Q_NO_DATA_RELOCATION
|
||||||
|
|
|
@ -464,7 +464,6 @@ void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj)
|
||||||
obj->d.data = uint_data;
|
obj->d.data = uint_data;
|
||||||
obj->d.relatedMetaObjects = 0;
|
obj->d.relatedMetaObjects = 0;
|
||||||
obj->d.static_metacall = 0;
|
obj->d.static_metacall = 0;
|
||||||
obj->d.extradata = 0;
|
|
||||||
obj->d.stringdata = string_data;
|
obj->d.stringdata = string_data;
|
||||||
obj->d.superdata = &QDBusAbstractInterface::staticMetaObject;
|
obj->d.superdata = &QDBusAbstractInterface::staticMetaObject;
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,37 +269,6 @@ void Generator::generateCode()
|
||||||
if (cdef->hasQObject && !isQt)
|
if (cdef->hasQObject && !isQt)
|
||||||
generateStaticMetacall();
|
generateStaticMetacall();
|
||||||
|
|
||||||
//
|
|
||||||
// Build extra array
|
|
||||||
//
|
|
||||||
QList<QByteArray> extraList;
|
|
||||||
for (int i = 0; i < cdef->propertyList.count(); ++i) {
|
|
||||||
const PropertyDef &p = cdef->propertyList.at(i);
|
|
||||||
if (!isVariantType(p.type.constData()) && !metaTypes.contains(p.type) && !p.type.contains('*') &&
|
|
||||||
!p.type.contains('<') && !p.type.contains('>')) {
|
|
||||||
int s = p.type.lastIndexOf("::");
|
|
||||||
if (s > 0) {
|
|
||||||
QByteArray scope = p.type.left(s);
|
|
||||||
if (scope != "Qt" && scope != cdef->classname && !extraList.contains(scope))
|
|
||||||
extraList += scope;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!extraList.isEmpty()) {
|
|
||||||
fprintf(out, "#ifdef Q_NO_DATA_RELOCATION\n");
|
|
||||||
fprintf(out, "static const QMetaObjectAccessor qt_meta_extradata_%s[] = {\n ", qualifiedClassNameIdentifier.constData());
|
|
||||||
for (int i = 0; i < extraList.count(); ++i) {
|
|
||||||
fprintf(out, " %s::getStaticMetaObject,\n", extraList.at(i).constData());
|
|
||||||
}
|
|
||||||
fprintf(out, "#else\n");
|
|
||||||
fprintf(out, "static const QMetaObject *qt_meta_extradata_%s[] = {\n ", qualifiedClassNameIdentifier.constData());
|
|
||||||
for (int i = 0; i < extraList.count(); ++i) {
|
|
||||||
fprintf(out, " &%s::staticMetaObject,\n", extraList.at(i).constData());
|
|
||||||
}
|
|
||||||
fprintf(out, "#endif //Q_NO_DATA_RELOCATION\n");
|
|
||||||
fprintf(out, " nullptr\n};\n\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Finally create and initialize the static meta object
|
// Finally create and initialize the static meta object
|
||||||
//
|
//
|
||||||
|
@ -321,10 +290,6 @@ void Generator::generateCode()
|
||||||
else
|
else
|
||||||
fprintf(out, " nullptr, ");
|
fprintf(out, " nullptr, ");
|
||||||
|
|
||||||
if (extraList.isEmpty())
|
|
||||||
fprintf(out, "nullptr, ");
|
|
||||||
else
|
|
||||||
fprintf(out, "qt_meta_extradata_%s, ", qualifiedClassNameIdentifier.constData());
|
|
||||||
fprintf(out, "nullptr}\n};\n\n");
|
fprintf(out, "nullptr}\n};\n\n");
|
||||||
|
|
||||||
if(isQt)
|
if(isQt)
|
||||||
|
|
|
@ -257,7 +257,6 @@ void MocParser::parse(const char *fname, QIODevice *io, int lineNum)
|
||||||
mo.d.superdata = &QObject::staticMetaObject;
|
mo.d.superdata = &QObject::staticMetaObject;
|
||||||
mo.d.stringdata = stringdata;
|
mo.d.stringdata = stringdata;
|
||||||
mo.d.data = data;
|
mo.d.data = data;
|
||||||
mo.d.extradata = 0;
|
|
||||||
objects.append(mo);
|
objects.append(mo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue