QmlDesigner: fix QML warnings

Change-Id: I955c6b8ae5cdefbbe1e414ebfca1c7fac5df9abe
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tim Jenßen
2025-04-10 15:51:53 +02:00
committed by Tim Jenssen
parent 4e4ffd3cc9
commit c4efb9c96c
4 changed files with 10 additions and 7 deletions

View File

@@ -96,7 +96,10 @@ Item {
HelperWidgets.AbstractButton {
style: StudioTheme.Values.viewBarButtonStyle
buttonIcon: StudioTheme.Constants.add_medium
enabled: hasMaterial && hasModelSelection && hasQuick3DImport && hasMaterialLibrary
enabled: (this.hasMaterial ?? false)
&& hasModelSelection
&& hasQuick3DImport
&& hasMaterialLibrary
tooltip: qsTr("Add a custom bundle folder.")
onClicked: ContentLibraryBackend.rootView.browseBundleFolder()
x: 5 // left margin

View File

@@ -20,8 +20,8 @@ Item {
visible: false
layer.enabled: true
layer.smooth: true
vertexShader: g_propertyData.blur_vs_path
fragmentShader: g_propertyData.blur_fs_path
vertexShader: g_propertyData?.blur_vs_path ?? ""
fragmentShader: g_propertyData?.blur_fs_path ?? ""
}
QtObject {

View File

@@ -298,8 +298,8 @@ Column {
BlurHelper {
id: blurHelper
source: source
property int blurMax: g_propertyData.blur_helper_max_level ? g_propertyData.blur_helper_max_level : 64
property real blurMultiplier: g_propertyData.blurMultiplier ? g_propertyData.blurMultiplier : 0
property int blurMax: g_propertyData?.blur_helper_max_level ?? 64
property real blurMultiplier: g_propertyData?.blurMultiplier ?? 0
}
Item {

View File

@@ -132,7 +132,7 @@ Item {
delegate: ItemDelegate {
id: delegateId
readonly property string styleName: model.display
readonly property string styleName: model?.display ?? ""
width: stylesList.width
height: DialogValues.styleListItemHeight
hoverEnabled: true
@@ -180,7 +180,7 @@ Item {
width: DialogValues.styleImageWidth
height: DialogValues.styleImageHeight
asynchronous: false
source: "image://newprojectdialog_library/" + model.iconName
source: model?.iconName ? "image://newprojectdialog_library/" + model.iconName : ""
}
} // Rectangle