summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-11-06 15:50:18 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-11 08:30:39 (GMT)
commitd933aebd1b1be0eba68d7ba4d85f144bad839a8d (patch)
tree6740df676316f7bb9ad8d82cd1f9b522b0038581 /tools
parent07ecdc01a2b369fe330d723af1a00845c0932834 (diff)
downloadQt-d933aebd1b1be0eba68d7ba4d85f144bad839a8d.zip
Qt-d933aebd1b1be0eba68d7ba4d85f144bad839a8d.tar.gz
Qt-d933aebd1b1be0eba68d7ba4d85f144bad839a8d.tar.bz2
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> (cherry picked from qttools/611ac50c1ed80bd6c6c15f2b39e720b6f7c1acb8)
Diffstat (limited to 'tools')
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp9
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h1
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;