summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-11-06 16:50:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-08 08:11:53 +0100
commit611ac50c1ed80bd6c6c15f2b39e720b6f7c1acb8 (patch)
tree979bcf4d1ba9891728623e0e78ab482dbe2d5490
parentd6b55368c6609434f9c5f24f9185c5abc5b8c209 (diff)
Qt Designer: Implement property() for QAxWidgetPropertySheet.
Access the control property of the QAxWidget directly. Task-number: QTBUG-34592 Change-Id: I7d0971ad8fc265d0443da7ae72330e2b7f3a8d70 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r--src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp9
-rw-r--r--src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp
index 2917f586b..f2c12eb2d 100644
--- a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp
+++ b/src/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/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h
index 0bd4b87f2..402ef596d 100644
--- a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h
+++ b/src/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;