aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp')
-rw-r--r--src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
index 96e0107290..01d55d13db 100644
--- a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
+++ b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
@@ -149,7 +149,7 @@ void MaterialEditorView::changeValue(const QString &name)
if (name == "state" && castedValue.toString() == "base state")
castedValue = "";
- if (castedValue.type() == QVariant::Color) {
+ if (castedValue.typeId() == QVariant::Color) {
QColor color = castedValue.value<QColor>();
QColor newColor = QColor(color.name());
newColor.setAlpha(color.alpha());
@@ -161,9 +161,9 @@ void MaterialEditorView::changeValue(const QString &name)
} else {
// QVector*D(0, 0, 0) detects as null variant though it is valid value
if (castedValue.isValid()
- && (!castedValue.isNull() || castedValue.type() == QVariant::Vector2D
- || castedValue.type() == QVariant::Vector3D
- || castedValue.type() == QVariant::Vector4D)) {
+ && (!castedValue.isNull() || castedValue.typeId() == QVariant::Vector2D
+ || castedValue.typeId() == QVariant::Vector3D
+ || castedValue.typeId() == QVariant::Vector4D)) {
commitVariantValueToModel(propertyName, castedValue);
}
}