From a7b18f7860c5c7e8ff66dc4c1c4efa3d21236edb Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 19 Sep 2022 16:55:06 +0200 Subject: [PATCH] QmlDesigner: Register QML types already in the plugin The states editor is using some of the types, too. We have to move the type registration out of the property editor in the future. Change-Id: I8a8b38180592a5785592e2482f35aad70208e62c Reviewed-by: Qt CI Bot Reviewed-by: Aleksei German --- .../components/propertyeditor/propertyeditorview.cpp | 1 - src/plugins/qmldesigner/qmldesignerplugin.cpp | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp index fb1be16dc73..26b93bfbd34 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp @@ -97,7 +97,6 @@ PropertyEditorView::PropertyEditorView(AsynchronousImageCache &imageCache) m_stackedWidget->insertWidget(0, new QWidget(m_stackedWidget)); - Quick2PropertyEditorView::registerQmlTypes(); m_stackedWidget->setWindowTitle(tr("Properties")); } diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp index 69d3db51c32..4890205f42d 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.cpp +++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp @@ -26,14 +26,15 @@ #include "qmldesignerplugin.h" #include "designmodecontext.h" #include "designmodewidget.h" +#include "dynamiclicensecheck.h" #include "exception.h" #include "generateresource.h" #include "nodeinstanceview.h" #include "openuiqmlfiledialog.h" #include "qmldesignerconstants.h" #include "qmldesignerprojectmanager.h" +#include "quick2propertyeditorview.h" #include "settingspage.h" -#include "dynamiclicensecheck.h" #include #include @@ -280,7 +281,8 @@ bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *e designerActionManager().addDesignerAction(shutDownNanotraceAction); #endif - + //TODO Move registering those types out of the property editor, since they are used also in the states editor + Quick2PropertyEditorView::registerQmlTypes(); return true; }