diff options
Diffstat (limited to 'src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp')
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp index b8f998e8fae..8b1907f3d99 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp @@ -202,7 +202,7 @@ void PropertyEditorView::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()); @@ -215,9 +215,9 @@ void PropertyEditorView::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); } } |