diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-02-27 15:49:50 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-01 20:44:49 +0100 |
commit | 3e43b158ce158dc1285593d2c7555351033fc3ce (patch) | |
tree | 3f09137e7d5db6d0c775f06f6b42baa9c36259fe | |
parent | ed55586b82f51629c153f34dd1964e84c639b4dd (diff) | |
download | qttools-3e43b158ce158dc1285593d2c7555351033fc3ce.tar.gz |
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>
-rw-r--r-- | src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp index 354943ff5..2917f586b 100644 --- a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp +++ b/src/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 |