summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-06-10 09:12:47 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-06-10 11:29:20 +0200
commit46ffaed90df8c14d67b4b16fdf5e0b87ab227c88 (patch)
tree0a70c6a0ec57119a94be6728c9d965244147e001
parent90d876c43cbdccf4b0b5fbeb6913888c317c43a6 (diff)
Qt Designer: Fix crash in the property editorv6.7.26.7.2
The order of statements when destroying the property is relevant. Amends c3aa524ec33d329b275680d9dd36b283b35a4154. Fixes: QTBUG-126182 Task-number: QTBUG-121823 Change-Id: Ic4583796e80525f29f5f517d6f4f3087bdb95708 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 3b609b112f5a27d41c35666fad137e494c8fa3a6)
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
index 5bcf68c10..a880cc512 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
@@ -1894,13 +1894,13 @@ void DesignerPropertyManager::uninitializeProperty(QtProperty *property)
m_keySequenceManager.uninitialize(property);
if (QtProperty *iconTheme = m_propertyToTheme.value(property)) {
- delete iconTheme;
+ delete iconTheme; // Delete first (QTBUG-126182)
m_iconSubPropertyToProperty.remove(iconTheme);
}
if (QtProperty *iconThemeEnum = m_propertyToThemeEnum.value(property)) {
+ delete iconThemeEnum; // Delete first (QTBUG-126182)
m_iconSubPropertyToProperty.remove(iconThemeEnum);
- delete iconThemeEnum;
}
m_propertyToAlignH.remove(property);