diff options
-rw-r--r-- | tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp | 9 | ||||
-rw-r--r-- | tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp b/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp index b7cb680..d8a2558 100644 --- a/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp +++ b/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp @@ -100,6 +100,15 @@ bool QAxWidgetPropertySheet::reset(int index) return true; } +QVariant QAxWidgetPropertySheet::property(int index) const +{ + // QTBUG-34592, accessing the 'control' property via meta object system + // may cause crashes during loading for some controls. + return propertyName(index) == m_controlProperty ? + QVariant(axWidget()->control()) : + QDesignerPropertySheet::property(index); +} + void QAxWidgetPropertySheet::setProperty(int index, const QVariant &value) { diff --git a/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h b/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h index 0bd4b87..402ef59 100644 --- a/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h +++ b/tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h @@ -66,6 +66,7 @@ public: explicit QAxWidgetPropertySheet(QDesignerAxWidget *object, QObject *parent = 0); virtual bool isEnabled(int index) const; + virtual QVariant property(int index) const; virtual void setProperty(int index, const QVariant &value); virtual bool reset(int index); int indexOf(const QString &name) const; |