diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-03 15:54:27 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-18 13:59:34 +0000 |
commit | 43573c8df170c5662b350703a06537c457c2d2fd (patch) | |
tree | e57e2f7235fc51467d2f761ed2753bc5e76ad3c9 /src/qml/qml/qqmlengine_p.h | |
parent | 851387d40662cd82ff44a1792825265f82fe7ddf (diff) |
Clean up type registration
The QML-specific types need to be registered only for "QtQml". Make sure
we don't accidentally add new QML-specific types to QtQuick.
We also don't want the base types to be registered under any random URI
and version. Formally qmlRegisterBaseTypes() is a public function, but
it _really_ should not be called by anyone.
Finally, split the types into ones that should belong to QtQml.Models
and ones that belong to QtQml proper. Add a plugin that handles QtQml
itself rather than using the QQmlEngine ctor for this.
[ChangeLog] The accidentally exported function qmlRegisterBaseTypes()
was removed.
Change-Id: I8bf9f8515e18b016750c721fe694d4cda076780b
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine_p.h')
-rw-r--r-- | src/qml/qml/qqmlengine_p.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 20d451d607..dab4e54cd6 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -249,9 +249,10 @@ public: static QList<QQmlError> qmlErrorFromDiagnostics(const QString &fileName, const QList<QQmlJS::DiagnosticMessage> &diagnosticMessages); - static void registerBaseTypes(const char *uri, int versionMajor, int versionMinor); - static void registerQtQuick2Types(const char *uri, int versionMajor, int versionMinor); - static void defineQtQuick2Module(); + static void defineModule(); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + static void registerQuickTypes(); +#endif static bool designerMode(); static void activateDesignerMode(); |