From aa855afa44bbbdd17125b88f0ec277b0b3f510c8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 14 Feb 2015 22:27:54 -0800 Subject: Fix compilation with ICC: failure to parse placement of Q_DECL_OVERRIDE This is the right way: void (*getProcAddress(const QByteArray &procName)) () Q_DECL_OVERRIDE; However, ICC and GCC do not get it. They expect it in the form: void (*getProcAddress(const QByteArray &procName) Q_DECL_OVERRIDE) (); ICC complains with an error, so this needs a workaround. GCC ignores the incorrectly-placed "override", so it just looks to GCC like no "override" was added. See also: https://groups.google.com/a/isocpp.org/forum/#!topic/std-discussion/IjVB8CWiS5A Change-Id: I1a800c709d3543699131ffff13c2ffc9cee46245 Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Marc Mutz --- src/plugins/platforms/offscreen/qoffscreenintegration_x11.h | 2 +- src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h index 9ead6287fb..644ff7f7de 100644 --- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h +++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h @@ -85,7 +85,7 @@ public: bool makeCurrent(QPlatformSurface *surface) Q_DECL_OVERRIDE; void doneCurrent() Q_DECL_OVERRIDE; void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE; - void (*getProcAddress(const QByteArray &procName)) () Q_DECL_OVERRIDE; + QFunctionPointer getProcAddress(const QByteArray &procName) Q_DECL_OVERRIDE; QSurfaceFormat format() const Q_DECL_OVERRIDE; bool isSharing() const Q_DECL_OVERRIDE; diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h index 15e11e7d0c..7725855327 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h @@ -57,7 +57,7 @@ public: bool makeCurrent(QPlatformSurface *surface) Q_DECL_OVERRIDE; void doneCurrent() Q_DECL_OVERRIDE; void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE; - void (*getProcAddress(const QByteArray &procName)) () Q_DECL_OVERRIDE; + QFunctionPointer getProcAddress(const QByteArray &procName) Q_DECL_OVERRIDE; QSurfaceFormat format() const Q_DECL_OVERRIDE; bool isSharing() const Q_DECL_OVERRIDE; -- cgit v1.2.3