The property is a QString when set by the menu or a
PropertySheetStringValue when loading the form.
Breakage introduced by
8695c1753964eeb06b5d9306010b56be5fc151c0 .
Task-number: QTBUG-29234
Change-Id: I84c3de80b99c8a20aaf1f8f7289882b0092d6a0a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
}
// Loading forms: Reload
if (name == m_controlProperty) {
- const qdesigner_internal::PropertySheetStringValue sv = qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value);
- const QString clsid = sv.value();
+ const QString clsid = value.canConvert<qdesigner_internal::PropertySheetStringValue>() ?
+ qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value).value() :
+ value.toString();
if (clsid.isEmpty() || !axWidget()->loadControl(clsid))
reset(index);
else