diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-20 14:09:00 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-21 08:39:41 +0200 |
commit | ea438b2508f329698e11c6dae6994d441c6e67df (patch) | |
tree | 7a6052b98ba1ff6e0258c52cfc2726e197f53dd2 /src/plugins/platforms/windows | |
parent | a2f319e9fb2f7595fc16d0d79e26438463051a53 (diff) | |
parent | 5f0ec7305e4310123ddeb98d3523087e3c560d9c (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
src/corelib/global/qglobal.cpp
src/corelib/global/qsysinfo.h
src/corelib/kernel/qcoreapplication_win.cpp
src/gui/text/qdistancefield.cpp
src/gui/text/qdistancefield_p.h
src/plugins/platforms/windows/qwindowsglcontext.cpp
src/plugins/platforms/windows/qwindowsglcontext.h
Change-Id: Ib3500acc2b28553bde06758cd9a2e19eb7fe2978
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsglcontext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index 48439e9523..c1eb664324 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -1333,21 +1333,21 @@ QFunctionPointer QWindowsGLContext::getProcAddress(const char *procName) // Even though we use QFunctionPointer, it does not mean the function can be called. // It will need to be cast to the proper function type with the correct calling // convention. QFunctionPointer is nothing more than a glorified void* here. - QFunctionPointer procAddress = reinterpret_cast<QFunctionPointer>(QOpenGLStaticContext::opengl32.wglGetProcAddress(procName)); + PROC procAddress = QOpenGLStaticContext::opengl32.wglGetProcAddress(procName); // We support AllGLFunctionsQueryable, which means this function must be able to // return a function pointer even for functions that are in GL.h and exported // normally from opengl32.dll. wglGetProcAddress() is not guaranteed to work for such // functions, however in QT_OPENGL_DYNAMIC builds QOpenGLFunctions will just blindly // call into here for _any_ OpenGL function. - if (!procAddress || procAddress == reinterpret_cast<void *>(0x1) || procAddress == reinterpret_cast<void *>(0x2) - || procAddress == reinterpret_cast<void *>(0x3) || procAddress == reinterpret_cast<void *>(-1)) - procAddress = reinterpret_cast<QFunctionPointer>(QOpenGLStaticContext::opengl32.resolve(procName)); + if (!procAddress || procAddress == reinterpret_cast<PROC>(0x1) || procAddress == reinterpret_cast<PROC>(0x2) + || procAddress == reinterpret_cast<PROC>(0x3) || procAddress == reinterpret_cast<PROC>(-1)) + procAddress = QOpenGLStaticContext::opengl32.resolve(procName); if (QWindowsContext::verbose > 1) qCDebug(lcQpaGl) << __FUNCTION__ << procName << QOpenGLStaticContext::opengl32.wglGetCurrentContext() << "returns" << procAddress; - return procAddress; + return reinterpret_cast<QFunctionPointer>(procAddress); } QT_END_NAMESPACE |