summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsscreen.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-18 13:13:49 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-19 11:11:08 +0000
commitb20548f9999d8c111268f3f2287c0801c6c5cbb0 (patch)
treee3e2aafabf3e1df13ee825dacd62712b437e51f8 /src/plugins/platforms/windows/qwindowsscreen.cpp
parent342c909b340cb1bfbb95480fc79dcea21a470c83 (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/qwindowsscreen.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index bfcf96ebe7..5accbe87e1 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -152,7 +152,7 @@ BOOL QT_WIN_CALLBACK monitorEnumCallback(HMONITOR hMonitor, HDC, LPRECT, LPARAM
static inline WindowsScreenDataList monitorData()
{
WindowsScreenDataList result;
- EnumDisplayMonitors(0, 0, monitorEnumCallback, (LPARAM)&result);
+ EnumDisplayMonitors(0, 0, monitorEnumCallback, reinterpret_cast<LPARAM>(&result));
return result;
}
@@ -200,7 +200,7 @@ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat =
QPixmap QWindowsScreen::grabWindow(WId window, int x, int y, int width, int height) const
{
RECT r;
- HWND hwnd = window ? (HWND)window : GetDesktopWindow();
+ HWND hwnd = window ? reinterpret_cast<HWND>(window) : GetDesktopWindow();
GetClientRect(hwnd, &r);
if (width < 0) width = r.right - r.left;
@@ -434,7 +434,7 @@ QWindowsScreenManager::QWindowsScreenManager() :
bool QWindowsScreenManager::handleDisplayChange(WPARAM wParam, LPARAM lParam)
{
- const int newDepth = (int)wParam;
+ const int newDepth = int(wParam);
const WORD newHorizontalResolution = LOWORD(lParam);
const WORD newVerticalResolution = HIWORD(lParam);
if (newDepth != m_lastDepth || newHorizontalResolution != m_lastHorizontalResolution