diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-24 13:28:17 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-24 13:31:14 +0100 |
commit | 1fadc7292b66d4b3984bf5ef36c70b46b07a1c6b (patch) | |
tree | 7a54f6a2612dc469ddbc5afc2cc0010099b661fe /src/plugins/platforms/windows/qwindowsopengltester.cpp | |
parent | ea711d0f59d6272f14b61cb2fd3dc1ede2cc1eb6 (diff) | |
parent | d8e65d5756c937fc3d9be3e5c30b31914a437393 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
src/plugins/platforms/windows/qwindowsfontengine.cpp
src/plugins/platforms/windows/qwindowsnativeimage.cpp
tests/auto/gui/kernel/qwindow/BLACKLIST
tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsopengltester.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsopengltester.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/plugins/platforms/windows/qwindowsopengltester.cpp b/src/plugins/platforms/windows/qwindowsopengltester.cpp index b0856a7441..4ca7f0e413 100644 --- a/src/plugins/platforms/windows/qwindowsopengltester.cpp +++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp @@ -81,10 +81,10 @@ GpuDescription GpuDescription::detect() const HRESULT hr = direct3D9->GetAdapterIdentifier(0, 0, &adapterIdentifier); direct3D9->Release(); if (SUCCEEDED(hr)) { - result.vendorId = int(adapterIdentifier.VendorId); - result.deviceId = int(adapterIdentifier.DeviceId); - result.revision = int(adapterIdentifier.Revision); - result.subSysId = int(adapterIdentifier.SubSysId); + result.vendorId = adapterIdentifier.VendorId; + result.deviceId = adapterIdentifier.DeviceId; + result.revision = adapterIdentifier.Revision; + result.subSysId = adapterIdentifier.SubSysId; QVector<int> version(4, 0); version[0] = HIWORD(adapterIdentifier.DriverVersion.HighPart); // Product version[1] = LOWORD(adapterIdentifier.DriverVersion.HighPart); // Version @@ -335,10 +335,10 @@ bool QWindowsOpenGLTester::testDesktopGL() WNDCLASS wclass; wclass.cbClsExtra = 0; wclass.cbWndExtra = 0; - wclass.hInstance = (HINSTANCE) GetModuleHandle(0); + wclass.hInstance = static_cast<HINSTANCE>(GetModuleHandle(0)); wclass.hIcon = 0; wclass.hCursor = 0; - wclass.hbrBackground = (HBRUSH) (COLOR_BACKGROUND); + wclass.hbrBackground = HBRUSH(COLOR_BACKGROUND); wclass.lpszMenuName = 0; wclass.lpfnWndProc = DefWindowProc; wclass.lpszClassName = className; @@ -377,8 +377,7 @@ bool QWindowsOpenGLTester::testDesktopGL() typedef const GLubyte * (APIENTRY * GetString_t)(GLenum name); GetString_t GetString = reinterpret_cast<GetString_t>(::GetProcAddress(lib, "glGetString")); if (GetString) { - const char *versionStr = (const char *) GetString(GL_VERSION); - if (versionStr) { + if (const char *versionStr = reinterpret_cast<const char *>(GetString(GL_VERSION))) { const QByteArray version(versionStr); const int majorDot = version.indexOf('.'); if (majorDot != -1) { |