From a3b2eac380bcd7d787e8fcc92a27bd7ed4f80b55 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 16 Jan 2020 11:18:21 +0100 Subject: QColor: add casts to ushort Silence lossy conversion warnings on MSVC. Task-number: QTBUG-80997 Change-Id: I0e5778b9f20b599de6fc8894c4b98fbc1b1510b9 Reviewed-by: Allan Sandfeld Jensen --- src/gui/painting/qcolor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/painting') diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h index f0d7dd23ad..0189f4e5f1 100644 --- a/src/gui/painting/qcolor.h +++ b/src/gui/painting/qcolor.h @@ -72,10 +72,10 @@ public: QColor(Qt::GlobalColor color) noexcept; Q_DECL_CONSTEXPR QColor(int r, int g, int b, int a = 255) noexcept : cspec(isRgbaValid(r, g, b, a) ? Rgb : Invalid), - ct(cspec == Rgb ? a * 0x0101 : 0, - cspec == Rgb ? r * 0x0101 : 0, - cspec == Rgb ? g * 0x0101 : 0, - cspec == Rgb ? b * 0x0101 : 0, + ct(ushort(cspec == Rgb ? a * 0x0101 : 0), + ushort(cspec == Rgb ? r * 0x0101 : 0), + ushort(cspec == Rgb ? g * 0x0101 : 0), + ushort(cspec == Rgb ? b * 0x0101 : 0), 0) {} QColor(QRgb rgb) noexcept; QColor(QRgba64 rgba64) noexcept; -- cgit v1.2.3 From 28f95d4688c28f8c06aa103012c6a00e197db12c Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 15 Jan 2020 14:38:14 +0100 Subject: Doc: Fix qdoc compilation errors qtbase Task-number: QTBUG-79824 Change-Id: I5a39525e3e735415ba96e2d585c5de754deb15de Reviewed-by: Venugopal Shivashankar --- src/gui/painting/qbackingstore.cpp | 2 -- src/gui/painting/qpainter.cpp | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'src/gui/painting') diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index b0393aff95..0a49269c36 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -220,8 +220,6 @@ static bool isRasterSurface(QWindow *window) to the backingstore's top level window. You should call this function after ending painting with endPaint(). - - \sa QWindow::transientParent() */ void QBackingStore::flush(const QRegion ®ion, QWindow *window, const QPoint &offset) { diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 3ce54c20be..75e7dc49fd 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1404,8 +1404,7 @@ void QPainterPrivate::updateState(QPainterState *newState) cases where expensive operations are ok to use, for instance when the result is cached in a QPixmap. - \sa QPaintDevice, QPaintEngine, {Qt SVG}, {Basic Drawing Example}, - {Drawing Utility Functions} + \sa QPaintDevice, QPaintEngine, {Qt SVG}, {Basic Drawing Example}, {}{Drawing Utility Functions} */ /*! -- cgit v1.2.3