forked from qt-creator/qt-creator
QmlDesigner: Remove some helper widgets warnings on QDS shut down
Change-Id: I843124f2f0644f846faa7a6e6d8e8a9bb6792764 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -15,18 +15,20 @@ SecondColumnLayout {
|
|||||||
property color color
|
property color color
|
||||||
property bool supportGradient: false
|
property bool supportGradient: false
|
||||||
property variant backendValue
|
property variant backendValue
|
||||||
|
|
||||||
property variant value: {
|
property variant value: {
|
||||||
if (colorEditor.backendValue === undefined
|
if (!colorEditor.backendValue || !colorEditor.backendValue.value)
|
||||||
|| colorEditor.backendValue.value === undefined)
|
|
||||||
return "white" // default color for Rectangle
|
return "white" // default color for Rectangle
|
||||||
|
|
||||||
if (colorEditor.isVector3D)
|
if (colorEditor.isVector3D) {
|
||||||
return Qt.rgba(colorEditor.backendValue.value.x,
|
return Qt.rgba(colorEditor.backendValue.value.x,
|
||||||
colorEditor.backendValue.value.y,
|
colorEditor.backendValue.value.y,
|
||||||
colorEditor.backendValue.value.z, 1)
|
colorEditor.backendValue.value.z, 1)
|
||||||
else
|
}
|
||||||
return colorEditor.backendValue.value
|
|
||||||
|
return colorEditor.backendValue.value
|
||||||
}
|
}
|
||||||
|
|
||||||
property alias gradientPropertyName: popupLoader.gradientPropertyName
|
property alias gradientPropertyName: popupLoader.gradientPropertyName
|
||||||
|
|
||||||
property alias gradientThumbnail: gradientThumbnail
|
property alias gradientThumbnail: gradientThumbnail
|
||||||
|
@@ -21,7 +21,7 @@ HelperWidgets.ComboBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property string defaultItem: qsTr("[None]")
|
property string defaultItem: qsTr("[None]")
|
||||||
property string textValue: comboBox.backendValue.expression
|
property string textValue: comboBox.backendValue?.expression ?? ""
|
||||||
property bool block: false
|
property bool block: false
|
||||||
property bool dirty: true
|
property bool dirty: true
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@ StudioControls.TextField {
|
|||||||
lineEdit.text = ""
|
lineEdit.text = ""
|
||||||
} else {
|
} else {
|
||||||
if (lineEdit.writeValueManually)
|
if (lineEdit.writeValueManually)
|
||||||
lineEdit.text = convertColorToString(colorLogic.valueFromBackend)
|
lineEdit.text = convertColorToString?.(colorLogic.valueFromBackend) ?? ""
|
||||||
else
|
else
|
||||||
lineEdit.text = colorLogic.valueFromBackend
|
lineEdit.text = colorLogic.valueFromBackend
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user