From 6d620429c6e1438c9b479479570a409fc65a0ca5 Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Mon, 21 Nov 2022 21:10:49 +0200 Subject: [PATCH] QmlDesigner: Fix Material/Texture Editors toolbars issues Make sure each toolbar's enum is registered under a different URI. Change-Id: I7613b4018b62188ba3fba5f651d064ada8173066 Reviewed-by: Reviewed-by: Miikka Heikkinen --- .../materialEditorQmlSources/MaterialEditorToolBar.qml | 2 +- .../qmldesigner/textureEditorQmlSource/TextureEditorToolBar.qml | 2 +- .../components/materialeditor/materialeditorcontextobject.cpp | 2 +- .../components/textureeditor/textureeditorcontextobject.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorToolBar.qml b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorToolBar.qml index 065a1a6ba4d..0a1b97f34bb 100644 --- a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorToolBar.qml +++ b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorToolBar.qml @@ -5,7 +5,7 @@ import QtQuick 2.15 import QtQuickDesignerTheme 1.0 import HelperWidgets 2.0 import StudioTheme 1.0 as StudioTheme -import ToolBarAction 1.0 +import MaterialToolBarAction 1.0 Rectangle { id: root diff --git a/share/qtcreator/qmldesigner/textureEditorQmlSource/TextureEditorToolBar.qml b/share/qtcreator/qmldesigner/textureEditorQmlSource/TextureEditorToolBar.qml index 91b46c5da47..ed40b038a72 100644 --- a/share/qtcreator/qmldesigner/textureEditorQmlSource/TextureEditorToolBar.qml +++ b/share/qtcreator/qmldesigner/textureEditorQmlSource/TextureEditorToolBar.qml @@ -5,7 +5,7 @@ import QtQuick 2.15 import QtQuickDesignerTheme 1.0 import HelperWidgets 2.0 import StudioTheme 1.0 as StudioTheme -import ToolBarAction 1.0 +import TextureToolBarAction 1.0 Rectangle { id: root diff --git a/src/plugins/qmldesigner/components/materialeditor/materialeditorcontextobject.cpp b/src/plugins/qmldesigner/components/materialeditor/materialeditorcontextobject.cpp index 7566bd60bcc..57e6eab9e25 100644 --- a/src/plugins/qmldesigner/components/materialeditor/materialeditorcontextobject.cpp +++ b/src/plugins/qmldesigner/components/materialeditor/materialeditorcontextobject.cpp @@ -30,7 +30,7 @@ MaterialEditorContextObject::MaterialEditorContextObject(QQmlContext *context, Q : QObject(parent) , m_qmlContext(context) { - qmlRegisterUncreatableType("ToolBarAction", 1, 0, "ToolBarAction", "Enum type"); + qmlRegisterUncreatableType("MaterialToolBarAction", 1, 0, "ToolBarAction", "Enum type"); } QQmlComponent *MaterialEditorContextObject::specificQmlComponent() diff --git a/src/plugins/qmldesigner/components/textureeditor/textureeditorcontextobject.cpp b/src/plugins/qmldesigner/components/textureeditor/textureeditorcontextobject.cpp index 1bfc1c6c6b1..017661bfcfc 100644 --- a/src/plugins/qmldesigner/components/textureeditor/textureeditorcontextobject.cpp +++ b/src/plugins/qmldesigner/components/textureeditor/textureeditorcontextobject.cpp @@ -28,7 +28,7 @@ TextureEditorContextObject::TextureEditorContextObject(QQmlContext *context, QOb : QObject(parent) , m_qmlContext(context) { - qmlRegisterUncreatableType("ToolBarAction", 1, 0, "ToolBarAction", "Enum type"); + qmlRegisterUncreatableType("TextureToolBarAction", 1, 0, "ToolBarAction", "Enum type"); } QQmlComponent *TextureEditorContextObject::specificQmlComponent()