summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsopengltester.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-01-24 08:54:38 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-01-28 21:14:58 +0000
commit61d50cbc96e5331218a6a4e5614f50211f06c718 (patch)
tree83571cad118c7c5cd70126ae2a6db01d2d462d93 /src/plugins/platforms/windows/qwindowsopengltester.cpp
parent850858cce6191593aaab3176932bc04a6f97f202 (diff)
Windows/Direct2d QPA: Use nullptr
Change-Id: I6ce01caa58de78e0eb61e243ee1e7b05cc1f5568 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsopengltester.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsopengltester.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/platforms/windows/qwindowsopengltester.cpp b/src/plugins/platforms/windows/qwindowsopengltester.cpp
index 3efccf0f32..2046135725 100644
--- a/src/plugins/platforms/windows/qwindowsopengltester.cpp
+++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp
@@ -330,10 +330,10 @@ bool QWindowsOpenGLTester::testDesktopGL()
typedef BOOL (WINAPI *MakeCurrentType)(HDC, HGLRC);
typedef PROC (WINAPI *WglGetProcAddressType)(LPCSTR);
- HMODULE lib = 0;
- HWND wnd = 0;
- HDC dc = 0;
- HGLRC context = 0;
+ HMODULE lib = nullptr;
+ HWND wnd = nullptr;
+ HDC dc = nullptr;
+ HGLRC context = nullptr;
LPCTSTR className = L"qtopengltest";
CreateContextType CreateContext = nullptr;
@@ -367,18 +367,18 @@ bool QWindowsOpenGLTester::testDesktopGL()
WNDCLASS wclass;
wclass.cbClsExtra = 0;
wclass.cbWndExtra = 0;
- wclass.hInstance = static_cast<HINSTANCE>(GetModuleHandle(0));
- wclass.hIcon = 0;
- wclass.hCursor = 0;
+ wclass.hInstance = static_cast<HINSTANCE>(GetModuleHandle(nullptr));
+ wclass.hIcon = nullptr;
+ wclass.hCursor = nullptr;
wclass.hbrBackground = HBRUSH(COLOR_BACKGROUND);
- wclass.lpszMenuName = 0;
+ wclass.lpszMenuName = nullptr;
wclass.lpfnWndProc = DefWindowProc;
wclass.lpszClassName = className;
wclass.style = CS_OWNDC;
if (!RegisterClass(&wclass))
goto cleanup;
wnd = CreateWindow(className, L"qtopenglproxytest", WS_OVERLAPPED,
- 0, 0, 640, 480, 0, 0, wclass.hInstance, 0);
+ 0, 0, 640, 480, nullptr, nullptr, wclass.hInstance, nullptr);
if (!wnd)
goto cleanup;
dc = GetDC(wnd);
@@ -447,14 +447,14 @@ bool QWindowsOpenGLTester::testDesktopGL()
cleanup:
if (MakeCurrent)
- MakeCurrent(0, 0);
+ MakeCurrent(nullptr, nullptr);
if (context)
DeleteContext(context);
if (dc && wnd)
ReleaseDC(wnd, dc);
if (wnd) {
DestroyWindow(wnd);
- UnregisterClass(className, GetModuleHandle(0));
+ UnregisterClass(className, GetModuleHandle(nullptr));
}
// No FreeLibrary. Some implementations, Mesa in particular, deadlock when trying to unload.