Fix Windows platform plugin narrowing conversion compile errors
Implicit conversions from int to BYTE (unsigned char) result in compile errors when compiling with the GCC -std=c++0x option. Change-Id: Iaf8190426207bf15ab4b337300510596d70659ed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
90e4a5b5f0
commit
3fe5715b9a
@ -99,7 +99,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, (int)(255.0 * rw->opacity()), AC_SRC_ALPHA};
|
||||
BLENDFUNCTION blend = {AC_SRC_OVER, 0, (BYTE)(255.0 * rw->opacity()), AC_SRC_ALPHA};
|
||||
RECT dirty = {dirtyRect.x(), dirtyRect.y(),
|
||||
dirtyRect.x() + dirtyRect.width(), dirtyRect.y() + dirtyRect.height()};
|
||||
UPDATELAYEREDWINDOWINFO info = {sizeof(info), NULL, &ptDst, &size, m_image->hdc(), &ptSrc, 0, &blend, ULW_ALPHA, &dirty};
|
||||
|
@ -223,7 +223,7 @@ static void setWindowOpacity(HWND hwnd, Qt::WindowFlags flags, qreal level)
|
||||
if ((wl & WS_EX_LAYERED) == 0)
|
||||
SetWindowLong(hwnd, GWL_EXSTYLE, wl | WS_EX_LAYERED);
|
||||
if (flags & Qt::FramelessWindowHint) {
|
||||
BLENDFUNCTION blend = {AC_SRC_OVER, 0, (int)(255.0 * level), AC_SRC_ALPHA};
|
||||
BLENDFUNCTION blend = {AC_SRC_OVER, 0, (BYTE)(255.0 * level), AC_SRC_ALPHA};
|
||||
QWindowsContext::user32dll.updateLayeredWindow(hwnd, NULL, NULL, NULL, NULL, NULL, 0, &blend, ULW_ALPHA);
|
||||
} else {
|
||||
QWindowsContext::user32dll.setLayeredWindowAttributes(hwnd, 0, (int)(level * 255), LWA_ALPHA);
|
||||
|
Loading…
Reference in New Issue
Block a user