summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-02-27 14:49:50 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-05 06:07:12 (GMT)
commita536365ad52ced4e4befe1d3717fa13d74d54072 (patch)
treec001aca4ad31e05c45f9d7a39a09cf60c9cc6a5e /tools
parent7d3bae1292ee3adfc4bcba4827d2a456c703627e (diff)
downloadQt-a536365ad52ced4e4befe1d3717fa13d74d54072.zip
Qt-a536365ad52ced4e4befe1d3717fa13d74d54072.tar.gz
Qt-a536365ad52ced4e4befe1d3717fa13d74d54072.tar.bz2
Active X plugin: Fix setting a control by task menu.
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> (cherry picked from qttools/3e43b158ce158dc1285593d2c7555351033fc3ce)
Diffstat (limited to 'tools')
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp b/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp
index fa8ecb0..b7cb680 100644
--- a/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp
+++ b/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp
@@ -112,8 +112,9 @@ void QAxWidgetPropertySheet::setProperty(int index, const QVariant &value)
}
// 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