From 51cd3b8090c52cab0931e0ab8fab1d83ef914b1e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Date: Mon, 20 Apr 2015 17:42:14 +0200 Subject: [PATCH] Disable gcc warnings by adding pragmas and re-enable headersclean. - IAxServerBase inherits IUnknown which does not have a virtual destructor. - QAxFactory::metaObject(const QString &) hides QObject::metaObject() (false positive). Task-number: QTBUG-45666 Change-Id: I8d1e69903ba6edde84ae9d4b64ee2e6088efad8b Reviewed-by: Andy Shaw <andy.shaw@digia.com> --- src/activeqt/axshared.prx | 2 -- src/activeqt/control/qaxfactory.h | 3 +++ src/activeqt/shared/qaxtypefunctions.h | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/activeqt/axshared.prx b/src/activeqt/axshared.prx index 29643547..6d335e9a 100644 --- a/src/activeqt/axshared.prx +++ b/src/activeqt/axshared.prx @@ -18,8 +18,6 @@ SOURCES = \ shared/qaxtypefunctions.cpp \ shared/qaxutils.cpp -mingw: HEADERSCLEAN_EXCLUDE += shared/qaxtypefunctions.h shared/qaxtypes.h control/qaxfactory.h - MODULE = axbase load(qt_module) QMAKE_DOCS_TARGETDIR = # Make qt_docs.prf default to activeqt instead of qtaxbase diff --git a/src/activeqt/control/qaxfactory.h b/src/activeqt/control/qaxfactory.h index 533ffc5e..ac7a9e9e 100644 --- a/src/activeqt/control/qaxfactory.h +++ b/src/activeqt/control/qaxfactory.h @@ -51,6 +51,8 @@ struct IUnknown; struct IDispatch; QT_BEGIN_NAMESPACE +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Woverloaded-virtual") // gcc complains about QObject::metaObject() being hidden. class QWidget; class QSettings; @@ -288,6 +290,7 @@ public: } \ QT_END_NAMESPACE +QT_WARNING_POP QT_END_NAMESPACE #ifndef Q_COM_METATYPE_DECLARED diff --git a/src/activeqt/shared/qaxtypefunctions.h b/src/activeqt/shared/qaxtypefunctions.h index a3efa619..74dfc890 100644 --- a/src/activeqt/shared/qaxtypefunctions.h +++ b/src/activeqt/shared/qaxtypefunctions.h @@ -48,6 +48,8 @@ #include <QtCore/qvariant.h> QT_BEGIN_NAMESPACE +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor") // gcc complains about IAxServerBase inheriting IUnknown with non virtual destructor. extern GUID IID_IAxServerBase; struct IAxServerBase : public IUnknown @@ -81,6 +83,7 @@ extern void clearVARIANT(VARIANT *var); #define QAX_INPROC_SERVER (0x51540001) #define QAX_OUTPROC_SERVER (0x51540002) +QT_WARNING_POP QT_END_NAMESPACE #endif // QAXTYPEFUNCTIONS_P_H -- GitLab