summaryrefslogtreecommitdiffstats
path: root/src/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-02-19 10:54:30 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-02-19 12:16:28 +0100
commit4ceaf31682039b3a354f5064befa75ce7fc9d6d3 (patch)
tree0864008b78e5dd9c07836369784f3c51950bbe24 /src/designer
parenta2a810a6fc87c1ab1202b2a6ec98213be3178732 (diff)
Qt Designer/Property editor: Change hash keys to const QtProperty *
Allows for removing a lot of const-cast, requiring to add only 2 new ones. Task-number: QTBUG-121823 Pick-to: 6.7 Change-Id: Ia3660fbaa55cc04109b4f316a8d508abb4204fb6 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/designer')
-rw-r--r--src/designer/src/components/propertyeditor/brushpropertymanager.cpp6
-rw-r--r--src/designer/src/components/propertyeditor/brushpropertymanager.h4
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.cpp130
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.h108
-rw-r--r--src/designer/src/components/propertyeditor/fontpropertymanager.h2
5 files changed, 122 insertions, 128 deletions
diff --git a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
index e0e12e8ec..2356e3843 100644
--- a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
@@ -239,7 +239,7 @@ int BrushPropertyManager::setValue(QtVariantPropertyManager *vm, QtProperty *pro
bool BrushPropertyManager::valueText(const QtProperty *property, QString *text) const
{
- const auto brit = m_brushValues.constFind(const_cast<QtProperty *>(property));
+ const auto brit = m_brushValues.constFind(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 auto brit = m_brushValues.constFind(const_cast<QtProperty *>(property));
+ const auto brit = m_brushValues.constFind(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 auto brit = m_brushValues.constFind(const_cast<QtProperty *>(property));
+ const auto brit = m_brushValues.constFind(property);
if (brit == m_brushValues.constEnd())
return false;
v->setValue(brit.value());
diff --git a/src/designer/src/components/propertyeditor/brushpropertymanager.h b/src/designer/src/components/propertyeditor/brushpropertymanager.h
index 478934a49..8bfe7f5c6 100644
--- a/src/designer/src/components/propertyeditor/brushpropertymanager.h
+++ b/src/designer/src/components/propertyeditor/brushpropertymanager.h
@@ -48,13 +48,13 @@ private:
static const QMap<int, QIcon> &brushStyleIcons();
- using PropertyToPropertyMap = QHash<QtProperty *, QtProperty *>;
+ using PropertyToPropertyMap = QHash<const QtProperty *, QtProperty *>;
PropertyToPropertyMap m_brushPropertyToStyleSubProperty;
PropertyToPropertyMap m_brushPropertyToColorSubProperty;
PropertyToPropertyMap m_brushStyleSubPropertyToProperty;
PropertyToPropertyMap m_brushColorSubPropertyToProperty;
- QHash<QtProperty *, QBrush> m_brushValues;
+ QHash<const QtProperty *, QBrush> m_brushValues;
};
}
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
index ed28d0d3b..fbb732f9d 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
@@ -246,7 +246,7 @@ int TranslatablePropertyManager<PropertySheetValue>::setValue(QtVariantPropertyM
template <class PropertySheetValue>
bool TranslatablePropertyManager<PropertySheetValue>::value(const QtProperty *property, QVariant *rc) const
{
- const auto it = m_values.constFind(const_cast<QtProperty *>(property));
+ const auto it = m_values.constFind(property);
if (it == m_values.constEnd())
return false;
*rc = QVariant::fromValue(it.value());
@@ -875,16 +875,14 @@ int DesignerPropertyManager::attributeType(int propertyType, const QString &attr
QVariant DesignerPropertyManager::attributeValue(const QtProperty *property, const QString &attribute) const
{
- QtProperty *prop = const_cast<QtProperty *>(property);
-
if (attribute == resettableAttributeC) {
- const auto it = m_resetMap.constFind(prop);
+ const auto it = m_resetMap.constFind(property);
if (it != m_resetMap.constEnd())
return it.value();
}
if (attribute == flagsAttributeC) {
- const auto it = m_flagValues.constFind(prop);
+ const auto it = m_flagValues.constFind(property);
if (it != m_flagValues.constEnd()) {
QVariant v;
v.setValue(it.value().flags);
@@ -892,35 +890,35 @@ QVariant DesignerPropertyManager::attributeValue(const QtProperty *property, con
}
}
if (attribute == validationModesAttributeC) {
- const auto it = m_stringAttributes.constFind(prop);
+ const auto it = m_stringAttributes.constFind(property);
if (it != m_stringAttributes.constEnd())
return it.value();
}
if (attribute == fontAttributeC) {
- const auto it = m_stringFontAttributes.constFind(prop);
+ const auto it = m_stringFontAttributes.constFind(property);
if (it != m_stringFontAttributes.constEnd())
return it.value();
}
if (attribute == themeAttributeC) {
- const auto it = m_stringThemeAttributes.constFind(prop);
+ const auto it = m_stringThemeAttributes.constFind(property);
if (it != m_stringThemeAttributes.constEnd())
return it.value();
}
if (attribute == superPaletteAttributeC) {
- const auto it = m_paletteValues.constFind(prop);
+ const auto it = m_paletteValues.constFind(property);
if (it != m_paletteValues.cend())
return it.value().superPalette;
}
if (attribute == defaultResourceAttributeC) {
- const auto itPix = m_defaultPixmaps.constFind(prop);
+ const auto itPix = m_defaultPixmaps.constFind(property);
if (itPix != m_defaultPixmaps.constEnd())
return itPix.value();
- const auto itIcon = m_defaultIcons.constFind(prop);
+ const auto itIcon = m_defaultIcons.constFind(property);
if (itIcon != m_defaultIcons.constEnd())
return itIcon.value();
}
@@ -1199,8 +1197,8 @@ bool DesignerPropertyManager::isPropertyTypeSupported(int propertyType) const
QString DesignerPropertyManager::valueText(const QtProperty *property) const
{
- if (m_flagValues.contains(const_cast<QtProperty *>(property))) {
- const FlagData data = m_flagValues.value(const_cast<QtProperty *>(property));
+ if (m_flagValues.contains(property)) {
+ const FlagData data = m_flagValues.value(property);
const uint v = data.val;
QString valueStr;
for (const DesignerIntPair &p : data.flags) {
@@ -1214,21 +1212,21 @@ QString DesignerPropertyManager::valueText(const QtProperty *property) const
}
return valueStr;
}
- if (m_alignValues.contains(const_cast<QtProperty *>(property))) {
- const uint v = m_alignValues.value(const_cast<QtProperty *>(property));
+ if (m_alignValues.contains(property)) {
+ const uint v = m_alignValues.value(property);
return tr("%1, %2").arg(indexHToString(alignToIndexH(v)),
indexVToString(alignToIndexV(v)));
}
- if (m_paletteValues.contains(const_cast<QtProperty *>(property))) {
- const PaletteData data = m_paletteValues.value(const_cast<QtProperty *>(property));
+ if (m_paletteValues.contains(property)) {
+ const PaletteData data = m_paletteValues.value(property);
const auto mask = data.val.resolveMask();
if (mask)
return tr("Customized (%n roles)", nullptr, bitCount(mask));
static const QString inherited = tr("Inherited");
return inherited;
}
- if (m_iconValues.contains(const_cast<QtProperty *>(property))) {
- const PropertySheetIconValue icon = m_iconValues.value(const_cast<QtProperty *>(property));
+ if (m_iconValues.contains(property)) {
+ const PropertySheetIconValue icon = m_iconValues.value(property);
const QString theme = icon.theme();
if (!theme.isEmpty() && QIcon::hasThemeIcon(theme))
return PixmapEditor::msgThemeIcon(theme);
@@ -1238,27 +1236,22 @@ QString DesignerPropertyManager::valueText(const QtProperty *property) const
return QString();
return QFileInfo(it.value().path()).fileName();
}
- if (m_pixmapValues.contains(const_cast<QtProperty *>(property))) {
- const QString path = m_pixmapValues.value(const_cast<QtProperty *>(property)).path();
+ if (m_pixmapValues.contains(property)) {
+ const QString path = m_pixmapValues.value(property).path();
if (path.isEmpty())
return QString();
return QFileInfo(path).fileName();
}
- if (m_uintValues.contains(const_cast<QtProperty *>(property))) {
- return QString::number(m_uintValues.value(const_cast<QtProperty *>(property)));
- }
- if (m_longLongValues.contains(const_cast<QtProperty *>(property))) {
- return QString::number(m_longLongValues.value(const_cast<QtProperty *>(property)));
- }
- if (m_uLongLongValues.contains(const_cast<QtProperty *>(property))) {
- return QString::number(m_uLongLongValues.value(const_cast<QtProperty *>(property)));
- }
- if (m_urlValues.contains(const_cast<QtProperty *>(property))) {
- return m_urlValues.value(const_cast<QtProperty *>(property)).toString();
- }
- if (m_byteArrayValues.contains(const_cast<QtProperty *>(property))) {
- return QString::fromUtf8(m_byteArrayValues.value(const_cast<QtProperty *>(property)));
- }
+ if (m_uintValues.contains(property))
+ return QString::number(m_uintValues.value(property));
+ if (m_longLongValues.contains(property))
+ return QString::number(m_longLongValues.value(property));
+ if (m_uLongLongValues.contains(property))
+ return QString::number(m_uLongLongValues.value(property));
+ if (m_urlValues.contains(property))
+ return m_urlValues.value(property).toString();
+ if (m_byteArrayValues.contains(property))
+ return QString::fromUtf8(m_byteArrayValues.value(property));
const int vType = QtVariantPropertyManager::valueType(property);
if (vType == QMetaType::QString || vType == designerStringTypeId()) {
const QString str = (QtVariantPropertyManager::valueType(property) == QMetaType::QString)
@@ -1289,7 +1282,7 @@ void DesignerPropertyManager::reloadResourceProperties()
{
DesignerIconCache *iconCache = nullptr;
for (auto itIcon = m_iconValues.cbegin(), end = m_iconValues.cend(); itIcon!= end; ++itIcon) {
- QtProperty *property = itIcon.key();
+ auto *property = itIcon.key();
const PropertySheetIconValue &icon = itIcon.value();
QIcon defaultIcon = m_defaultIcons.value(property);
@@ -1311,11 +1304,12 @@ void DesignerPropertyManager::reloadResourceProperties()
defaultIcon.pixmap(16, 16, pair.first, pair.second));
}
- emit propertyChanged(property);
- emit QtVariantPropertyManager::valueChanged(property, QVariant::fromValue(itIcon.value()));
+ auto *ncProperty = const_cast<QtProperty *>(property);
+ emit propertyChanged(ncProperty);
+ emit QtVariantPropertyManager::valueChanged(ncProperty, QVariant::fromValue(itIcon.value()));
}
for (auto itPix = m_pixmapValues.cbegin(), end = m_pixmapValues.cend(); itPix != end; ++itPix) {
- QtProperty *property = itPix.key();
+ auto *property = const_cast<QtProperty *>(itPix.key());
emit propertyChanged(property);
emit QtVariantPropertyManager::valueChanged(property, QVariant::fromValue(itPix.value()));
}
@@ -1323,21 +1317,21 @@ void DesignerPropertyManager::reloadResourceProperties()
QIcon DesignerPropertyManager::valueIcon(const QtProperty *property) const
{
- if (m_iconValues.contains(const_cast<QtProperty *>(property))) {
+ if (m_iconValues.contains(property)) {
if (!property->isModified())
- return m_defaultIcons.value(const_cast<QtProperty *>(property)).pixmap(16, 16);
+ return m_defaultIcons.value(property).pixmap(16, 16);
QDesignerFormWindowInterface *formWindow = QDesignerFormWindowInterface::findFormWindow(m_object);
qdesigner_internal::FormWindowBase *fwb = qobject_cast<qdesigner_internal::FormWindowBase *>(formWindow);
if (fwb)
- return fwb->iconCache()->icon(m_iconValues.value(const_cast<QtProperty *>(property))).pixmap(16, 16);
- } else if (m_pixmapValues.contains(const_cast<QtProperty *>(property))) {
+ return fwb->iconCache()->icon(m_iconValues.value(property)).pixmap(16, 16);
+ } else if (m_pixmapValues.contains(property)) {
if (!property->isModified())
- return m_defaultPixmaps.value(const_cast<QtProperty *>(property));
+ return m_defaultPixmaps.value(property);
QDesignerFormWindowInterface *formWindow = QDesignerFormWindowInterface::findFormWindow(m_object);
qdesigner_internal::FormWindowBase *fwb = qobject_cast<qdesigner_internal::FormWindowBase *>(formWindow);
if (fwb)
- return fwb->pixmapCache()->pixmap(m_pixmapValues.value(const_cast<QtProperty *>(property)));
- } else if (m_stringThemeAttributes.value(const_cast<QtProperty *>(property), false)) {
+ return fwb->pixmapCache()->pixmap(m_pixmapValues.value(property));
+ } else if (m_stringThemeAttributes.value(property, false)) {
return QIcon::fromTheme(value(property).toString());
} else {
QIcon rc;
@@ -1350,32 +1344,32 @@ QIcon DesignerPropertyManager::valueIcon(const QtProperty *property) const
QVariant DesignerPropertyManager::value(const QtProperty *property) const
{
- if (m_flagValues.contains(const_cast<QtProperty *>(property)))
- return m_flagValues.value(const_cast<QtProperty *>(property)).val;
- if (m_alignValues.contains(const_cast<QtProperty *>(property)))
- return m_alignValues.value(const_cast<QtProperty *>(property));
- if (m_paletteValues.contains(const_cast<QtProperty *>(property)))
- return m_paletteValues.value(const_cast<QtProperty *>(property)).val;
- if (m_iconValues.contains(const_cast<QtProperty *>(property)))
- return QVariant::fromValue(m_iconValues.value(const_cast<QtProperty *>(property)));
- if (m_pixmapValues.contains(const_cast<QtProperty *>(property)))
- return QVariant::fromValue(m_pixmapValues.value(const_cast<QtProperty *>(property)));
+ if (m_flagValues.contains(property))
+ return m_flagValues.value(property).val;
+ if (m_alignValues.contains(property))
+ return m_alignValues.value(property);
+ if (m_paletteValues.contains(property))
+ return m_paletteValues.value(property).val;
+ if (m_iconValues.contains(property))
+ return QVariant::fromValue(m_iconValues.value(property));
+ if (m_pixmapValues.contains(property))
+ return QVariant::fromValue(m_pixmapValues.value(property));
QVariant rc;
if (m_stringManager.value(property, &rc)
|| m_keySequenceManager.value(property, &rc)
|| m_stringListManager.value(property, &rc)
|| m_brushManager.value(property, &rc))
return rc;
- if (m_uintValues.contains(const_cast<QtProperty *>(property)))
- return m_uintValues.value(const_cast<QtProperty *>(property));
- if (m_longLongValues.contains(const_cast<QtProperty *>(property)))
- return m_longLongValues.value(const_cast<QtProperty *>(property));
- if (m_uLongLongValues.contains(const_cast<QtProperty *>(property)))
- return m_uLongLongValues.value(const_cast<QtProperty *>(property));
- if (m_urlValues.contains(const_cast<QtProperty *>(property)))
- return m_urlValues.value(const_cast<QtProperty *>(property));
- if (m_byteArrayValues.contains(const_cast<QtProperty *>(property)))
- return m_byteArrayValues.value(const_cast<QtProperty *>(property));
+ if (m_uintValues.contains(property))
+ return m_uintValues.value(property);
+ if (m_longLongValues.contains(property))
+ return m_longLongValues.value(property);
+ if (m_uLongLongValues.contains(property))
+ return m_uLongLongValues.value(property);
+ if (m_urlValues.contains(property))
+ return m_urlValues.value(property);
+ if (m_byteArrayValues.contains(property))
+ return m_byteArrayValues.value(property);
return QtVariantPropertyManager::value(property);
}
@@ -2246,7 +2240,7 @@ QWidget *DesignerEditorFactory::createEditor(QtVariantPropertyManager *manager,
template <class Editor>
bool removeEditor(QObject *object,
- QHash<QtProperty *, QList<Editor>> *propertyToEditors,
+ QHash<const QtProperty *, QList<Editor>> *propertyToEditors,
QHash<Editor, QtProperty *> *editorToProperty)
{
if (!propertyToEditors)
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.h b/src/designer/src/components/propertyeditor/designerpropertymanager.h
index 962a3bcf7..e181fccce 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.h
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.h
@@ -55,7 +55,7 @@ private slots:
void slotPropertyChanged(QtProperty *property);
void slotEditorDestroyed(QObject *object);
private:
- QHash<QtProperty *, QList<ResetWidget *>> m_createdResetWidgets;
+ QHash<const QtProperty *, QList<ResetWidget *>> m_createdResetWidgets;
QHash<ResetWidget *, QtProperty *> m_resetWidgetToProperty;
int m_spacing;
const QDesignerFormEditorInterface *m_core;
@@ -79,16 +79,16 @@ public:
int expectedTypeId, const QVariant &value);
private:
- QHash<QtProperty *, PropertySheetValue> m_values;
- QHash<QtProperty *, QtProperty *> m_valueToComment;
- QHash<QtProperty *, QtProperty *> m_valueToTranslatable;
- QHash<QtProperty *, QtProperty *> m_valueToDisambiguation;
- QHash<QtProperty *, QtProperty *> m_valueToId;
-
- QHash<QtProperty *, QtProperty *> m_commentToValue;
- QHash<QtProperty *, QtProperty *> m_translatableToValue;
- QHash<QtProperty *, QtProperty *> m_disambiguationToValue;
- QHash<QtProperty *, QtProperty *> m_idToValue;
+ QHash<const QtProperty *, PropertySheetValue> m_values;
+ QHash<const QtProperty *, QtProperty *> m_valueToComment;
+ QHash<const QtProperty *, QtProperty *> m_valueToTranslatable;
+ QHash<const QtProperty *, QtProperty *> m_valueToDisambiguation;
+ QHash<const QtProperty *, QtProperty *> m_valueToId;
+
+ QHash<const QtProperty *, QtProperty *> m_commentToValue;
+ QHash<const QtProperty *, QtProperty *> m_translatableToValue;
+ QHash<const QtProperty *, QtProperty *> m_disambiguationToValue;
+ QHash<const QtProperty *, QtProperty *> m_idToValue;
};
class DesignerPropertyManager : public QtVariantPropertyManager
@@ -152,7 +152,7 @@ private Q_SLOTS:
private:
void createIconSubProperty(QtProperty *iconProperty, QIcon::Mode mode, QIcon::State state, const QString &subName);
- QHash<QtProperty *, bool> m_resetMap;
+ QHash<const QtProperty *, bool> m_resetMap;
struct FlagData
{
@@ -161,9 +161,9 @@ private:
QList<uint> values;
};
- QHash<QtProperty *, FlagData> m_flagValues;
- QHash<QtProperty *, QList<QtProperty *>> m_propertyToFlags;
- QHash<QtProperty *, QtProperty *> m_flagToProperty;
+ QHash<const QtProperty *, FlagData> m_flagValues;
+ QHash<const QtProperty *, QList<QtProperty *>> m_propertyToFlags;
+ QHash<const QtProperty *, QtProperty *> m_flagToProperty;
int alignToIndexH(uint align) const;
int alignToIndexV(uint align) const;
@@ -171,16 +171,16 @@ private:
uint indexVToAlign(int idx) const;
QString indexHToString(int idx) const;
QString indexVToString(int idx) const;
- QHash<QtProperty *, uint> m_alignValues;
- using PropertyToPropertyMap = QHash<QtProperty *, QtProperty *>;
+ QHash<const QtProperty *, uint> m_alignValues;
+ using PropertyToPropertyMap = QHash<const QtProperty *, QtProperty *>;
PropertyToPropertyMap m_propertyToAlignH;
PropertyToPropertyMap m_propertyToAlignV;
PropertyToPropertyMap m_alignHToProperty;
PropertyToPropertyMap m_alignVToProperty;
QHash<const QtProperty *, Qt::Alignment> m_alignDefault;
- QHash<QtProperty *, QMap<std::pair<QIcon::Mode, QIcon::State>, QtProperty *>> m_propertyToIconSubProperties;
- QHash<QtProperty *, std::pair<QIcon::Mode, QIcon::State>> m_iconSubPropertyToState;
+ QHash<const QtProperty *, QMap<std::pair<QIcon::Mode, QIcon::State>, QtProperty *>> m_propertyToIconSubProperties;
+ QHash<const QtProperty *, std::pair<QIcon::Mode, QIcon::State>> m_iconSubPropertyToState;
PropertyToPropertyMap m_iconSubPropertyToProperty;
PropertyToPropertyMap m_propertyToTheme;
@@ -193,26 +193,26 @@ private:
QPalette val;
QPalette superPalette;
};
- QHash<QtProperty *, PaletteData> m_paletteValues;
+ QHash<const QtProperty *, PaletteData> m_paletteValues;
- QHash<QtProperty *, qdesigner_internal::PropertySheetPixmapValue> m_pixmapValues;
- QHash<QtProperty *, qdesigner_internal::PropertySheetIconValue> m_iconValues;
+ QHash<const QtProperty *, qdesigner_internal::PropertySheetPixmapValue> m_pixmapValues;
+ QHash<const QtProperty *, qdesigner_internal::PropertySheetIconValue> m_iconValues;
- QHash<QtProperty *, uint> m_uintValues;
- QHash<QtProperty *, qlonglong> m_longLongValues;
- QHash<QtProperty *, qulonglong> m_uLongLongValues;
- QHash<QtProperty *, QUrl> m_urlValues;
- QHash<QtProperty *, QByteArray> m_byteArrayValues;
+ QHash<const QtProperty *, uint> m_uintValues;
+ QHash<const QtProperty *, qlonglong> m_longLongValues;
+ QHash<const QtProperty *, qulonglong> m_uLongLongValues;
+ QHash<const QtProperty *, QUrl> m_urlValues;
+ QHash<const QtProperty *, QByteArray> m_byteArrayValues;
- QHash<QtProperty *, int> m_stringAttributes;
- QHash<QtProperty *, QFont> m_stringFontAttributes;
- QHash<QtProperty *, bool> m_stringThemeAttributes;
+ QHash<const QtProperty *, int> m_stringAttributes;
+ QHash<const QtProperty *, QFont> m_stringFontAttributes;
+ QHash<const QtProperty *, bool> m_stringThemeAttributes;
BrushPropertyManager m_brushManager;
FontPropertyManager m_fontManager;
- QHash<QtProperty *, QPixmap> m_defaultPixmaps;
- QHash<QtProperty *, QIcon> m_defaultIcons;
+ QHash<const QtProperty *, QPixmap> m_defaultPixmaps;
+ QHash<const QtProperty *, QIcon> m_defaultIcons;
bool m_changingSubValue;
QDesignerFormEditorInterface *m_core;
@@ -265,28 +265,28 @@ private:
int m_spacing;
- QHash<QtProperty *, QList<TextEditor *>> m_stringPropertyToEditors;
- QHash<TextEditor *, QtProperty *> m_editorToStringProperty;
- QHash<QtProperty *, QList<QKeySequenceEdit *>> m_keySequencePropertyToEditors;
- QHash<QKeySequenceEdit *, QtProperty *> m_editorToKeySequenceProperty;
- QHash<QtProperty *, QList<PaletteEditorButton *>> m_palettePropertyToEditors;
- QHash<PaletteEditorButton *, QtProperty *> m_editorToPaletteProperty;
- QHash<QtProperty *, QList<PixmapEditor *>> m_pixmapPropertyToEditors;
- QHash<PixmapEditor *, QtProperty *> m_editorToPixmapProperty;
- QHash<QtProperty *, QList<PixmapEditor *>> m_iconPropertyToEditors;
- QHash<PixmapEditor *, QtProperty *> m_editorToIconProperty;
- QHash<QtProperty *, QList<QLineEdit *>> m_uintPropertyToEditors;
- QHash<QLineEdit *, QtProperty *> m_editorToUintProperty;
- QHash<QtProperty *, QList<QLineEdit *>> m_longLongPropertyToEditors;
- QHash<QLineEdit *, QtProperty *> m_editorToLongLongProperty;
- QHash<QtProperty *, QList<QLineEdit *>> m_uLongLongPropertyToEditors;
- QHash<QLineEdit *, QtProperty *> m_editorToULongLongProperty;
- QHash<QtProperty *, QList<TextEditor *>> m_urlPropertyToEditors;
- QHash<TextEditor *, QtProperty *> m_editorToUrlProperty;
- QHash<QtProperty *, QList<TextEditor *>> m_byteArrayPropertyToEditors;
- QHash<TextEditor *, QtProperty *> m_editorToByteArrayProperty;
- QHash<QtProperty *, QList<StringListEditorButton *>> m_stringListPropertyToEditors;
- QHash<StringListEditorButton *, QtProperty *> m_editorToStringListProperty;
+ QHash<const QtProperty *, QList<TextEditor *>> m_stringPropertyToEditors;
+ QHash<TextEditor *, QtProperty *> m_editorToStringProperty;
+ QHash<const QtProperty *, QList<QKeySequenceEdit *>> m_keySequencePropertyToEditors;
+ QHash<QKeySequenceEdit *, QtProperty *> m_editorToKeySequenceProperty;
+ QHash<const QtProperty *, QList<PaletteEditorButton *>> m_palettePropertyToEditors;
+ QHash<PaletteEditorButton *, QtProperty *> m_editorToPaletteProperty;
+ QHash<const QtProperty *, QList<PixmapEditor *>> m_pixmapPropertyToEditors;
+ QHash<PixmapEditor *, QtProperty *> m_editorToPixmapProperty;
+ QHash<const QtProperty *, QList<PixmapEditor *>> m_iconPropertyToEditors;
+ QHash<PixmapEditor *, QtProperty *> m_editorToIconProperty;
+ QHash<const QtProperty *, QList<QLineEdit *>> m_uintPropertyToEditors;
+ QHash<QLineEdit *, QtProperty *> m_editorToUintProperty;
+ QHash<const QtProperty *, QList<QLineEdit *>> m_longLongPropertyToEditors;
+ QHash<QLineEdit *, QtProperty *> m_editorToLongLongProperty;
+ QHash<const QtProperty *, QList<QLineEdit *>> m_uLongLongPropertyToEditors;
+ QHash<QLineEdit *, QtProperty *> m_editorToULongLongProperty;
+ QHash<const QtProperty *, QList<TextEditor *>> m_urlPropertyToEditors;
+ QHash<TextEditor *, QtProperty *> m_editorToUrlProperty;
+ QHash<const QtProperty *, QList<TextEditor *>> m_byteArrayPropertyToEditors;
+ QHash<TextEditor *, QtProperty *> m_editorToByteArrayProperty;
+ QHash<const QtProperty *, QList<StringListEditorButton *>> m_stringListPropertyToEditors;
+ QHash<StringListEditorButton *, QtProperty *> m_editorToStringListProperty;
};
} // namespace qdesigner_internal
diff --git a/src/designer/src/components/propertyeditor/fontpropertymanager.h b/src/designer/src/components/propertyeditor/fontpropertymanager.h
index 904a85a0b..3e628dbf2 100644
--- a/src/designer/src/components/propertyeditor/fontpropertymanager.h
+++ b/src/designer/src/components/propertyeditor/fontpropertymanager.h
@@ -31,7 +31,7 @@ class FontPropertyManager {
public:
FontPropertyManager();
- using ResetMap = QHash<QtProperty *, bool>;
+ using ResetMap = QHash<const QtProperty *, bool>;
using NameMap = QMap<QString, QString>;
// Call before QtVariantPropertyManager::initializeProperty.