QmlDesigner: Remove TextureSpecifics and fix new panes

MaterialPane now includes MaterialSection and TexturePane includes
TextureSection. Removed those sections from any subtype specifics.

Added hack to ignore specifics for Texture types.

Fixes: QDS-14878
Change-Id: Iffea1be81dc7e12372434cee9135942c7c117082
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Miikka Heikkinen
2025-03-06 16:40:45 +02:00
parent 77455efafa
commit 0c5d7ce4dc
9 changed files with 12 additions and 45 deletions

View File

@@ -1,15 +0,0 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
// CubeMapTexture inherits Texture but doesn't provide any extra properties itself
TextureSection {
width: parent.width
}
}

View File

@@ -11,8 +11,4 @@ Column {
CustomMaterialSection {
width: parent.width
}
MaterialSection {
width: parent.width
}
}

View File

@@ -11,8 +11,4 @@ Column {
DefaultMaterialSection {
width: parent.width
}
MaterialSection {
width: parent.width
}
}

View File

@@ -112,6 +112,10 @@ Item {
width: itemPane.width
source: specificsUrl
}
MaterialSection {
width: itemPane.width
}
}
}

View File

@@ -11,8 +11,4 @@ Column {
PrincipledMaterialSection {
width: parent.width
}
MaterialSection {
width: parent.width
}
}

View File

@@ -11,8 +11,4 @@ Column {
SpecularGlossyMaterialSection {
width: parent.width
}
MaterialSection {
width: parent.width
}
}

View File

@@ -77,6 +77,10 @@ Rectangle {
anchors.right: parent.right
source: specificsUrl
}
TextureSection {
width: itemPane.width
}
}
}
}

View File

@@ -1,14 +0,0 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
TextureSection {
width: parent.width
}
}

View File

@@ -607,6 +607,10 @@ void PropertyEditorView::setupQmlBackend()
auto [diffClassMetaInfo, qmlSpecificsFile] = diffType(commonAncestor, specificsClassMetaInfo);
// Hack to fix Textures in property views in case obsolete specifics are loaded from module
if (qmlFileUrl.toLocalFile().endsWith("TexturePane.qml"))
qmlSpecificsFile = QUrl{};
QString specificQmlData = getSpecificQmlData(commonAncestor, m_selectedNode, diffClassMetaInfo);
PropertyEditorQmlBackend *currentQmlBackend = getQmlBackend(m_qmlBackendHash,