diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-03-22 12:37:07 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-03-22 12:36:00 +0000 |
commit | ff0f9e1b390fa391e85d379aff767309bb916526 (patch) | |
tree | 4133c1c6b2eb84452130a1aa1a63268752a71656 | |
parent | cc32d8626e4017ef18e4c26ce23bb5f6339008cd (diff) |
Fix C-style cast in QAxWidget::qObject()
It actually is a const_cast followed by an implicit
conversion to the base class, so use a const_cast.
Public Qt header are supposed to compile with
-Wold-style-cast or similar.
Change-Id: Ifa311824aabc2978004c1ff3029073c2bf230157
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-rw-r--r-- | src/activeqt/container/qaxwidget.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/activeqt/container/qaxwidget.h b/src/activeqt/container/qaxwidget.h index 1841958..a663d69 100644 --- a/src/activeqt/container/qaxwidget.h +++ b/src/activeqt/container/qaxwidget.h @@ -56,7 +56,7 @@ class QAxWidget : public QWidget, public QAxBase { Q_OBJECT_FAKE public: - QObject* qObject() const { return (QWidget*)this; } + QObject* qObject() const { return const_cast<QAxWidget *>(this); } const char *className() const; explicit QAxWidget(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); |