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/qwindowsbackingstore.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/qwindowsbackingstore.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsbackingstore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp index af9d2a5969..a518c0bb83 100644 --- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp +++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp @@ -93,7 +93,7 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion ®ion, SIZE size = {r.width(), r.height()}; POINT ptDst = {r.x(), r.y()}; POINT ptSrc = {0, 0}; - BLENDFUNCTION blend = {AC_SRC_OVER, 0, (BYTE)(255.0 * rw->opacity()), AC_SRC_ALPHA}; + BLENDFUNCTION blend = {AC_SRC_OVER, 0, BYTE(qRound(255.0 * rw->opacity())), AC_SRC_ALPHA}; if (QWindowsContext::user32dll.updateLayeredWindowIndirect) { RECT dirty = {dirtyRect.x(), dirtyRect.y(), dirtyRect.x() + dirtyRect.width(), dirtyRect.y() + dirtyRect.height()}; @@ -119,7 +119,7 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion ®ion, m_image->hdc(), br.x() + offset.x(), br.y() + offset.y(), SRCCOPY)) { const DWORD lastError = GetLastError(); // QTBUG-35926, QTBUG-29716: may fail after lock screen. if (lastError != ERROR_SUCCESS && lastError != ERROR_INVALID_HANDLE) - qErrnoWarning(lastError, "%s: BitBlt failed", __FUNCTION__); + qErrnoWarning(int(lastError), "%s: BitBlt failed", __FUNCTION__); } rw->releaseDC(); #ifndef Q_OS_WINCE |