From bc03cbe1cb00dd19406d5999950f4abb28c8de0e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 18 Nov 2013 18:15:17 +0200 Subject: Fix MinGW-warnings about narrowing/invalid conversions. Change-Id: I9b49dd6d12a5e59c6f2674ab3c82a8a7ec583775 Reviewed-by: Joerg Bornemann --- src/corelib/kernel/qcoreapplication_win.cpp | 2 +- src/gui/kernel/qwidget_win.cpp | 2 +- src/gui/painting/qwindowsurface_raster.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 0df1b6e..025690b 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -583,7 +583,7 @@ struct FLAG_STRING_STRUCT const char* str; }; -FLAG_STRING_STRUCT FLAG_STRING(int value = 0, const char *c = 0) +FLAG_STRING_STRUCT FLAG_STRING(uint value = 0, const char *c = 0) { FLAG_STRING_STRUCT s = {value, c}; return s; diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index c90cd9c..16265e9 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -1922,7 +1922,7 @@ void QWidgetPrivate::setWindowOpacity_sys(qreal level) if (!isOpaque && ptrUpdateLayeredWindow && (data.window_flags & Qt::FramelessWindowHint)) { if (GetWindowLong(q->internalWinId(), GWL_EXSTYLE) & Q_WS_EX_LAYERED) { - 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}; ptrUpdateLayeredWindow(q->internalWinId(), NULL, NULL, NULL, NULL, NULL, 0, &blend, Q_ULW_ALPHA); } return; diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp index 3493dd8..2b8af81 100644 --- a/src/gui/painting/qwindowsurface_raster.cpp +++ b/src/gui/painting/qwindowsurface_raster.cpp @@ -186,7 +186,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi 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 * window()->windowOpacity()), Q_AC_SRC_ALPHA}; + BLENDFUNCTION blend = {AC_SRC_OVER, 0, (BYTE)(255.0 * window()->windowOpacity()), Q_AC_SRC_ALPHA}; RECT dirty = {dirtyRect.x(), dirtyRect.y(), dirtyRect.x() + dirtyRect.width(), dirtyRect.y() + dirtyRect.height()}; Q_UPDATELAYEREDWINDOWINFO info = {sizeof(info), NULL, &ptDst, &size, d->image->hdc, &ptSrc, 0, &blend, Q_ULW_ALPHA, &dirty}; -- cgit v0.12