From ff0f9e1b390fa391e85d379aff767309bb916526 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 22 Mar 2016 12:37:07 +0100 Subject: 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 Reviewed-by: Oliver Wolff --- src/activeqt/container/qaxwidget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(this); } const char *className() const; explicit QAxWidget(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); -- cgit v1.2.3