diff options
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsscreen.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsscreen.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp index 2eaf386d42..a161dc46e9 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.cpp +++ b/src/plugins/platforms/windows/qwindowsscreen.cpp @@ -89,7 +89,7 @@ static bool monitorData(HMONITOR hMonitor, QWindowsScreenData *data) if (data->name == QLatin1String("WinDisc")) { data->flags |= QWindowsScreenData::LockScreen; } else { - if (const HDC hdc = CreateDC(info.szDevice, NULL, NULL, NULL)) { + if (const HDC hdc = CreateDC(info.szDevice, nullptr, nullptr, nullptr)) { const QDpi dpi = monitorDPI(hMonitor); data->dpi = dpi.first ? dpi : deviceDPI(hdc); data->depth = GetDeviceCaps(hdc, BITSPIXEL); @@ -137,7 +137,7 @@ BOOL QT_WIN_CALLBACK monitorEnumCallback(HMONITOR hMonitor, HDC, LPRECT, LPARAM static inline WindowsScreenDataList monitorData() { WindowsScreenDataList result; - EnumDisplayMonitors(0, 0, monitorEnumCallback, reinterpret_cast<LPARAM>(&result)); + EnumDisplayMonitors(nullptr, nullptr, monitorEnumCallback, reinterpret_cast<LPARAM>(&result)); return result; } @@ -209,7 +209,7 @@ QPixmap QWindowsScreen::grabWindow(WId window, int xIn, int yIn, int width, int height = windowSize.height() - yIn; // Create and setup bitmap - HDC display_dc = GetDC(0); + HDC display_dc = GetDC(nullptr); HDC bitmap_dc = CreateCompatibleDC(display_dc); HBITMAP bitmap = CreateCompatibleBitmap(display_dc, width, height); HGDIOBJ null_bitmap = SelectObject(bitmap_dc, bitmap); @@ -226,7 +226,7 @@ QPixmap QWindowsScreen::grabWindow(WId window, int xIn, int yIn, int width, int const QPixmap pixmap = qt_pixmapFromWinHBITMAP(bitmap); DeleteObject(bitmap); - ReleaseDC(0, display_dc); + ReleaseDC(nullptr, display_dc); return pixmap; } @@ -237,7 +237,7 @@ QPixmap QWindowsScreen::grabWindow(WId window, int xIn, int yIn, int width, int QWindow *QWindowsScreen::topLevelAt(const QPoint &point) const { - QWindow *result = 0; + QWindow *result = nullptr; if (QWindow *child = QWindowsScreen::windowAt(point, CWP_SKIPINVISIBLE)) result = QWindowsWindow::topLevelOf(child); qCDebug(lcQpaWindows) <<__FUNCTION__ << point << result; @@ -246,7 +246,7 @@ QWindow *QWindowsScreen::topLevelAt(const QPoint &point) const QWindow *QWindowsScreen::windowAt(const QPoint &screenPoint, unsigned flags) { - QWindow* result = 0; + QWindow* result = nullptr; if (QPlatformWindow *bw = QWindowsContext::instance()-> findPlatformWindowAt(GetDesktopWindow(), screenPoint, flags)) result = bw->window(); @@ -576,7 +576,7 @@ const QWindowsScreen *QWindowsScreenManager::screenAtDp(const QPoint &p) const const QWindowsScreen *QWindowsScreenManager::screenForHwnd(HWND hwnd) const { HMONITOR hMonitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONULL); - if (hMonitor == NULL) + if (hMonitor == nullptr) return nullptr; const auto it = std::find_if(m_screens.cbegin(), m_screens.cend(), |