diff options
Diffstat (limited to 'src/designer/src/components/propertyeditor/brushpropertymanager.cpp')
-rw-r--r-- | src/designer/src/components/propertyeditor/brushpropertymanager.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp index 41887cda2..aa94e17f3 100644 --- a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp +++ b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp @@ -159,7 +159,8 @@ void BrushPropertyManager::initializeProperty(QtVariantPropertyManager *vm, QtPr m_brushPropertyToStyleSubProperty.insert(property, styleSubProperty); m_brushStyleSubPropertyToProperty.insert(styleSubProperty, property); // color - QtVariantProperty *colorSubProperty = vm->addProperty(QVariant::Color, QCoreApplication::translate("BrushPropertyManager", "Color")); + QtVariantProperty *colorSubProperty = + vm->addProperty(QMetaType::QColor, QCoreApplication::translate("BrushPropertyManager", "Color")); property->addSubProperty(colorSubProperty); m_brushPropertyToColorSubProperty.insert(property, colorSubProperty); m_brushColorSubPropertyToProperty.insert(colorSubProperty, property); @@ -207,8 +208,8 @@ void BrushPropertyManager::slotPropertyDestroyed(QtProperty *property) int BrushPropertyManager::valueChanged(QtVariantPropertyManager *vm, QtProperty *property, const QVariant &value) { - switch (value.type()) { - case QVariant::Int: // Style subproperty? + switch (value.metaType().id()) { + case QMetaType::Int: // Style subproperty? if (QtProperty *brushProperty = m_brushStyleSubPropertyToProperty.value(property, 0)) { const QBrush oldValue = m_brushValues.value(brushProperty); QBrush newBrush = oldValue; @@ -220,7 +221,7 @@ int BrushPropertyManager::valueChanged(QtVariantPropertyManager *vm, QtProperty return DesignerPropertyManager::Changed; } break; - case QVariant::Color: // Color subproperty? + case QMetaType::QColor: // Color subproperty? if (QtProperty *brushProperty = m_brushColorSubPropertyToProperty.value(property, 0)) { const QBrush oldValue = m_brushValues.value(brushProperty); QBrush newBrush = oldValue; @@ -239,7 +240,7 @@ int BrushPropertyManager::valueChanged(QtVariantPropertyManager *vm, QtProperty int BrushPropertyManager::setValue(QtVariantPropertyManager *vm, QtProperty *property, const QVariant &value) { - if (value.type() != QVariant::Brush) + if (value.metaType().id() != QMetaType::QBrush) return DesignerPropertyManager::NoMatch; const PropertyBrushMap::iterator brit = m_brushValues.find(property); if (brit == m_brushValues.end()) |