Skip to content

Commit 11730d4

Browse files
committed
QtPropertyBrowser: Fix an issue when setting "flagNames"
Setting the "flagNames" attribute causes the QtFlagPropertyManager to re-create its child properties. This causes the QtVariantPropertyManager to re-create its wrapping QtVariantProperty instances. When this happens with a property that is already added to a property browser, the value icon and text were requested before the QtVariantPropertyManager had set up the mapping between the wrapping QtVariantProperty instance and the internal property. This caused the returned icon and text for the child flag properties to be empty. Change-Id: If2166136b4ae3931c229c215f90f8582da81d2c3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
1 parent 9568abd commit 11730d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qtpropertybrowser/src/qtvariantproperty.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,10 @@ QtVariantProperty *QtVariantPropertyManagerPrivate::createSubProperty(QtVariantP
429429
varChild->setStatusTip(internal->statusTip());
430430
varChild->setWhatsThis(internal->whatsThis());
431431

432-
parent->insertSubProperty(varChild, after);
433-
434432
m_internalToProperty[internal] = varChild;
435433
propertyToWrappedProperty()->insert(varChild, internal);
434+
435+
parent->insertSubProperty(varChild, after);
436436
return varChild;
437437
}
438438

0 commit comments

Comments
 (0)