qopengl.h: Move C header #include(s) out of the QT_NAMESPACE

The Clang backend of MSVC declares nullptr_t in namespace std there,
then expects to find it under ::std::nullptr_t to define a ::nullptr_t.
That breaks with a namespaced build, of course.

Fix by moving the QT_BEGIN_NAMESPACE to just before the first typedef
that declares a Qt-owned name.

Done-with: Marc Mutz <marc.mutz@qt.io>
Pick-to: 5.15 6.2 6.3
Fixes: QTBUG-95309
Change-Id: I56f2709c4664a7d0de84918f43b6d53cb3710612
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Patrick Stewart 2021-07-21 13:26:18 +01:00 committed by Marc Mutz
parent dc6453694e
commit 806ba27419

View File

@ -157,8 +157,6 @@ typedef char GLchar;
# endif
#endif
QT_BEGIN_NAMESPACE
// When all else fails we provide sensible fallbacks - this is needed to
// allow compilation on OS X 10.6
@ -287,6 +285,7 @@ typedef GLintptr GLvdpauSurfaceNV;
// End of block copied from glext.h
#endif
QT_BEGIN_NAMESPACE
// Types that aren't defined in all system's gl.h files.
typedef ptrdiff_t qopengl_GLintptr;