diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-03-02 17:16:54 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-03-02 17:44:19 +0100 |
commit | 9e2aa53c14b007fe26d30b63926d343fe5ffed7d (patch) | |
tree | b4689ad642279f19df23a505db2e396112708917 /src/qmltyperegistrar/qmltypesclassdescription.cpp | |
parent | 744246b1129f6042c0264eb578a6e5c86e09f80a (diff) |
qmltyperegistrar: Mark non-QObject types as uncreatable
qmlplugindump does so, and in fact they are uncreatable. Also, make
qmlTypeRegistrationMode() more robust. Each classDef should really
either be an object, a gadget, or a namespace.
Change-Id: If39bbbf6f9a4fdb269d095ca10d60ad5d87ca62d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qmltyperegistrar/qmltypesclassdescription.cpp')
-rw-r--r-- | src/qmltyperegistrar/qmltypesclassdescription.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qmltyperegistrar/qmltypesclassdescription.cpp b/src/qmltyperegistrar/qmltypesclassdescription.cpp index c6279998b7..3442dc9d64 100644 --- a/src/qmltyperegistrar/qmltypesclassdescription.cpp +++ b/src/qmltyperegistrar/qmltypesclassdescription.cpp @@ -154,6 +154,9 @@ void QmlTypesClassDescription::collect(const QJsonObject *classDef, revisions.erase(end, revisions.end()); resolvedClass = classDef; + + // If it's not a QObject, it's not creatable + isCreatable = isCreatable && classDef->value(QLatin1String("object")).toBool(); } void QmlTypesClassDescription::collectAttached(const QString &attached, |