diff --git a/src/activeqt/axshared.prx b/src/activeqt/axshared.prx
index 29643547cfc67f339544ca435a0ab7111794d58f..6d335e9ad4fa8b6758c0b8a85e9ed0477921aa61 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 533ffc5e747d5bfd9606fa05c489c6401f5a69fb..ac7a9e9e70faa17816498a8d797df4fbe1b9c279 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 a3efa619ad6ba5fcbe77af39b41a9623d5088279..74dfc8908a9a8ae63db5eca49f625b80f46a3c2e 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