diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-18 13:13:49 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-19 11:11:08 +0000 |
commit | b20548f9999d8c111268f3f2287c0801c6c5cbb0 (patch) | |
tree | e3e2aafabf3e1df13ee825dacd62712b437e51f8 /src/plugins/platforms/windows/qwindowseglcontext.cpp | |
parent | 342c909b340cb1bfbb95480fc79dcea21a470c83 (diff) |
Windows QPA: Fix warnings as shown by Qt Creator's Clang based code model.
Code except font, accessibility and file qwindowswindow.cpp.
Task-number: QTBUG-50804
Change-Id: I40848264f9fa16eea00cf70d7be009c484c49e92
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowseglcontext.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowseglcontext.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp index 5983741711..787a072a7a 100644 --- a/src/plugins/platforms/windows/qwindowseglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp @@ -187,9 +187,9 @@ bool QWindowsLibGLESv2::init() qCDebug(lcQpaGl) << "Qt: Using OpenGL ES 2.0 from" << dllName; #if !defined(QT_STATIC) || defined(QT_OPENGL_DYNAMIC) - m_lib = ::LoadLibraryW((const wchar_t *) QString::fromLatin1(dllName).utf16()); + m_lib = ::LoadLibraryW(reinterpret_cast<LPCWSTR>(QString::fromLatin1(dllName).utf16())); if (!m_lib) { - qErrnoWarning(::GetLastError(), "Failed to load %s", dllName); + qErrnoWarning(int(GetLastError()), "Failed to load %s", dllName); return false; } #endif // !QT_STATIC @@ -395,7 +395,7 @@ QWindowsEGLStaticContext *QWindowsEGLStaticContext::create(QWindowsOpenGLTester: Q_UNUSED(preferredType) #endif if (display == EGL_NO_DISPLAY) - display = libEGL.eglGetDisplay((EGLNativeDisplayType)dc); + display = libEGL.eglGetDisplay(dc); if (!display) { qWarning("%s: Could not obtain EGL display", __FUNCTION__); return 0; @@ -427,8 +427,8 @@ QWindowsOpenGLContext *QWindowsEGLStaticContext::createContext(QOpenGLContext *c void *QWindowsEGLStaticContext::createWindowSurface(void *nativeWindow, void *nativeConfig, int *err) { *err = 0; - EGLSurface surface = libEGL.eglCreateWindowSurface(m_display, (EGLConfig) nativeConfig, - (EGLNativeWindowType) nativeWindow, 0); + EGLSurface surface = libEGL.eglCreateWindowSurface(m_display, nativeConfig, + static_cast<EGLNativeWindowType>(nativeWindow), 0); if (surface == EGL_NO_SURFACE) { *err = libEGL.eglGetError(); qWarning("%s: Could not create the EGL window surface: 0x%x", __FUNCTION__, *err); @@ -439,7 +439,7 @@ void *QWindowsEGLStaticContext::createWindowSurface(void *nativeWindow, void *na void QWindowsEGLStaticContext::destroyWindowSurface(void *nativeSurface) { - libEGL.eglDestroySurface(m_display, (EGLSurface) nativeSurface); + libEGL.eglDestroySurface(m_display, nativeSurface); } QSurfaceFormat QWindowsEGLStaticContext::formatFromConfig(EGLDisplay display, EGLConfig config, |