summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-13 01:01:04 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-03-13 10:10:09 +0100
commit76be4abbbcfb2fbb14ce532413e0895198e7f0f1 (patch)
tree5d6ca9c4425df15a93b6f74dc8e4dbb38db74d91 /tools
parent587d789fa5929f462b5744ba33a25db6c77b36fc (diff)
parent70d726e91e4ef27002b2271805de19077e25809c (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/animations/qsequentialanimationgroupjob.cpp Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlcachegen/qtquickcompiler.prf1
-rw-r--r--tools/qmlplugindump/main.cpp34
2 files changed, 23 insertions, 12 deletions
diff --git a/tools/qmlcachegen/qtquickcompiler.prf b/tools/qmlcachegen/qtquickcompiler.prf
index c7899c5100..9c8c7a7b1e 100644
--- a/tools/qmlcachegen/qtquickcompiler.prf
+++ b/tools/qmlcachegen/qtquickcompiler.prf
@@ -1,3 +1,4 @@
+qtc_run: return()
qtPrepareTool(QML_CACHEGEN, qmlcachegen, _FILTER)
qtPrepareTool(QMAKE_RCC, rcc, _DEP)
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 565152d5d2..f3b931fbbf 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -163,10 +163,6 @@ public:
*/
static QHash<QByteArray, QSet<QQmlType> > qmlTypesByCppName;
-/* A composite type is completely specified by name, major version and minor version.
-*/
-static QMap<QString, QSet<QQmlType> > qmlTypesByCompositeName;
-
static QHash<QByteArray, QByteArray> cppToId;
/* Takes a C++ type name, such as Qt::LayoutDirection or QString and
@@ -208,14 +204,15 @@ QByteArray convertToId(const QMetaObject *mo)
// Collect all metaobjects for types registered with qmlRegisterType() without parameters
-void collectReachableMetaObjectsWithoutQmlName(QQmlEnginePrivate *engine, QSet<const QMetaObject *>& metas ) {
+void collectReachableMetaObjectsWithoutQmlName(QQmlEnginePrivate *engine, QSet<const QMetaObject *>& metas,
+ QMap<QString, QSet<QQmlType>> &compositeTypes) {
const auto qmlAllTypes = QQmlMetaType::qmlAllTypes();
for (const QQmlType &ty : qmlAllTypes) {
if (!metas.contains(ty.baseMetaObject())) {
if (!ty.isComposite()) {
collectReachableMetaObjects(engine, ty, &metas);
} else {
- qmlTypesByCompositeName[ty.elementName()].insert(ty);
+ compositeTypes[ty.elementName()].insert(ty);
}
}
}
@@ -224,6 +221,7 @@ void collectReachableMetaObjectsWithoutQmlName(QQmlEnginePrivate *engine, QSet<c
QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
QSet<const QMetaObject *> &noncreatables,
QSet<const QMetaObject *> &singletons,
+ QMap<QString, QSet<QQmlType>> &compositeTypes,
const QList<QQmlType> &skip = QList<QQmlType>())
{
QSet<const QMetaObject *> metas;
@@ -239,7 +237,7 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
qmlTypesByCppName[ty.baseMetaObject()->className()].insert(ty);
collectReachableMetaObjects(QQmlEnginePrivate::get(engine), ty, &metas);
} else {
- qmlTypesByCompositeName[ty.elementName()].insert(ty);
+ compositeTypes[ty.elementName()].insert(ty);
}
}
@@ -304,7 +302,7 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
}
}
- collectReachableMetaObjectsWithoutQmlName(QQmlEnginePrivate::get(engine), metas);
+ collectReachableMetaObjectsWithoutQmlName(QQmlEnginePrivate::get(engine), metas, compositeTypes);
return metas;
}
@@ -1184,7 +1182,8 @@ int main(int argc, char *argv[])
// find all QMetaObjects reachable from the builtin module
QSet<const QMetaObject *> uncreatableMetas;
QSet<const QMetaObject *> singletonMetas;
- QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(&engine, uncreatableMetas, singletonMetas);
+ QMap<QString, QSet<QQmlType>> defaultCompositeTypes;
+ QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(&engine, uncreatableMetas, singletonMetas, defaultCompositeTypes);
QList<QQmlType> defaultTypes = QQmlMetaType::qmlTypes();
// add some otherwise unreachable QMetaObjects
@@ -1195,6 +1194,9 @@ int main(int argc, char *argv[])
// this will hold the meta objects we want to dump information of
QSet<const QMetaObject *> metas;
+ // composite types we want to dump information of
+ QMap<QString, QSet<QQmlType>> compositeTypes;
+
if (action == Builtins) {
for (const QMetaObject *m : qAsConst(defaultReachable)) {
if (m->className() == QLatin1String("Qt")) {
@@ -1268,9 +1270,17 @@ int main(int argc, char *argv[])
}
}
- QSet<const QMetaObject *> candidates = collectReachableMetaObjects(&engine, uncreatableMetas, singletonMetas, defaultTypes);
+ QSet<const QMetaObject *> candidates = collectReachableMetaObjects(&engine, uncreatableMetas, singletonMetas, compositeTypes, defaultTypes);
candidates.subtract(defaultReachable);
+ for (QString iter: compositeTypes.keys()) {
+ if (defaultCompositeTypes.contains(iter)) {
+ QSet<QQmlType> compositeTypesByName = compositeTypes.value(iter);
+ compositeTypesByName.subtract(defaultCompositeTypes.value(iter));
+ compositeTypes[iter] = compositeTypesByName;
+ }
+ }
+
// Also eliminate meta objects with the same classname.
// This is required because extended objects seem not to share
// a single meta object instance.
@@ -1324,8 +1334,8 @@ int main(int argc, char *argv[])
dumper.dump(QQmlEnginePrivate::get(&engine), meta, uncreatableMetas.contains(meta), singletonMetas.contains(meta));
}
- QMap<QString, QSet<QQmlType> >::const_iterator iter = qmlTypesByCompositeName.constBegin();
- for (; iter != qmlTypesByCompositeName.constEnd(); ++iter)
+ QMap<QString, QSet<QQmlType> >::const_iterator iter = compositeTypes.constBegin();
+ for (; iter != compositeTypes.constEnd(); ++iter)
dumper.dumpComposite(&engine, iter.value(), defaultReachableNames);
// define QEasingCurve as an extension of QQmlEasingValueType, this way