summaryrefslogtreecommitdiffstats
path: root/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/designer/src/components/propertyeditor/brushpropertymanager.cpp')
-rw-r--r--src/designer/src/components/propertyeditor/brushpropertymanager.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
index a814fa80e..38b4b6a9d 100644
--- a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
@@ -147,24 +147,24 @@ void BrushPropertyManager::initializeProperty(QtVariantPropertyManager *vm, QtPr
bool BrushPropertyManager::uninitializeProperty(QtProperty *property)
{
- const PropertyBrushMap::iterator brit = m_brushValues.find(property); // Brushes
+ const auto brit = m_brushValues.find(property); // Brushes
if (brit == m_brushValues.end())
return false;
m_brushValues.erase(brit);
// style
- PropertyToPropertyMap::iterator subit = m_brushPropertyToStyleSubProperty.find(property);
- if (subit != m_brushPropertyToStyleSubProperty.end()) {
- QtProperty *styleProp = subit.value();
+ const auto styleIt = m_brushPropertyToStyleSubProperty.find(property);
+ if (styleIt != m_brushPropertyToStyleSubProperty.end()) {
+ QtProperty *styleProp = styleIt .value();
m_brushStyleSubPropertyToProperty.remove(styleProp);
- m_brushPropertyToStyleSubProperty.erase(subit);
+ m_brushPropertyToStyleSubProperty.erase(styleIt );
delete styleProp;
}
// color
- subit = m_brushPropertyToColorSubProperty.find(property);
- if (subit != m_brushPropertyToColorSubProperty.end()) {
- QtProperty *colorProp = subit.value();
+ const auto colorIt = m_brushPropertyToColorSubProperty.find(property);
+ if (colorIt != m_brushPropertyToColorSubProperty.end()) {
+ QtProperty *colorProp = colorIt .value();
m_brushColorSubPropertyToProperty.remove(colorProp);
- m_brushPropertyToColorSubProperty.erase(subit);
+ m_brushPropertyToColorSubProperty.erase(colorIt );
delete colorProp;
}
return true;
@@ -172,7 +172,7 @@ bool BrushPropertyManager::uninitializeProperty(QtProperty *property)
void BrushPropertyManager::slotPropertyDestroyed(QtProperty *property)
{
- PropertyToPropertyMap::iterator subit = m_brushStyleSubPropertyToProperty.find(property);
+ auto subit = m_brushStyleSubPropertyToProperty.find(property);
if (subit != m_brushStyleSubPropertyToProperty.end()) {
m_brushPropertyToStyleSubProperty[subit.value()] = 0;
m_brushStyleSubPropertyToProperty.erase(subit);
@@ -221,7 +221,7 @@ int BrushPropertyManager::setValue(QtVariantPropertyManager *vm, QtProperty *pro
{
if (value.metaType().id() != QMetaType::QBrush)
return DesignerPropertyManager::NoMatch;
- const PropertyBrushMap::iterator brit = m_brushValues.find(property);
+ const auto brit = m_brushValues.find(property);
if (brit == m_brushValues.end())
return DesignerPropertyManager::NoMatch;
@@ -239,7 +239,7 @@ int BrushPropertyManager::setValue(QtVariantPropertyManager *vm, QtProperty *pro
bool BrushPropertyManager::valueText(const QtProperty *property, QString *text) const
{
- const PropertyBrushMap::const_iterator brit = m_brushValues.constFind(const_cast<QtProperty *>(property));
+ const auto brit = m_brushValues.constFind(const_cast<QtProperty *>(property));
if (brit == m_brushValues.constEnd())
return false;
const QBrush &brush = brit.value();
@@ -251,7 +251,7 @@ bool BrushPropertyManager::valueText(const QtProperty *property, QString *text)
bool BrushPropertyManager::valueIcon(const QtProperty *property, QIcon *icon) const
{
- const PropertyBrushMap::const_iterator brit = m_brushValues.constFind(const_cast<QtProperty *>(property));
+ const auto brit = m_brushValues.constFind(const_cast<QtProperty *>(property));
if (brit == m_brushValues.constEnd())
return false;
*icon = QtPropertyBrowserUtils::brushValueIcon(brit.value());
@@ -260,7 +260,7 @@ bool BrushPropertyManager::valueIcon(const QtProperty *property, QIcon *icon) co
bool BrushPropertyManager::value(const QtProperty *property, QVariant *v) const
{
- const PropertyBrushMap::const_iterator brit = m_brushValues.constFind(const_cast<QtProperty *>(property));
+ const auto brit = m_brushValues.constFind(const_cast<QtProperty *>(property));
if (brit == m_brushValues.constEnd())
return false;
v->setValue(brit.value());