summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-05 14:54:04 +0200
committerLars Knoll <lars.knoll@qt.io>2020-04-15 19:55:06 +0200
commitbc726ed5d96161b70a22b9a11e0943acca219cfc (patch)
tree3899fdc07cf5d21baa8ab126aa2aa80ce2f61d3f /src/gui
parente80544ebca7bc3083df460607931bb4ea55d6a6a (diff)
Compile fixes for clang10
Fix some warnings that are flagged as errors on clang10. Change-Id: I906634c8b2bd94db42d74a7f3d10efb086e373cc Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qdrawhelper.cpp18
-rw-r--r--src/gui/painting/qregion.cpp2
-rw-r--r--src/gui/text/qfontengine.cpp8
-rw-r--r--src/gui/util/qvalidator.cpp2
4 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 793986467e..abf13d5953 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -2842,15 +2842,15 @@ static void QT_FASTCALL fetchTransformedBilinearARGB32PM_fast_rotate_helper(uint
fy += fdy;
++b;
}
- uint *boundedEnd = end; \
- if (fdx > 0) \
- boundedEnd = qMin(boundedEnd, b + (max_fx - fx) / fdx); \
- else if (fdx < 0) \
- boundedEnd = qMin(boundedEnd, b + (min_fx - fx) / fdx); \
- if (fdy > 0) \
- boundedEnd = qMin(boundedEnd, b + (max_fy - fy) / fdy); \
- else if (fdy < 0) \
- boundedEnd = qMin(boundedEnd, b + (min_fy - fy) / fdy); \
+ uint *boundedEnd = end;
+ if (fdx > 0)
+ boundedEnd = qMin(boundedEnd, b + (max_fx - fx) / fdx);
+ else if (fdx < 0)
+ boundedEnd = qMin(boundedEnd, b + (min_fx - fx) / fdx);
+ if (fdy > 0)
+ boundedEnd = qMin(boundedEnd, b + (max_fy - fy) / fdy);
+ else if (fdy < 0)
+ boundedEnd = qMin(boundedEnd, b + (min_fy - fy) / fdy);
// until boundedEnd we can now have a fast middle part without boundary checks
#if defined(__SSE2__)
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 387c23cad8..a10a2cb2d0 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -2845,7 +2845,7 @@ static bool RectInRegion(QRegionPrivate *region, int rx, int ry, uint rwidth, ui
break;
}
}
- return partIn ? ((ry <= prect->bottom()) ? RectanglePart : RectangleIn) : RectangleOut;
+ return partIn;
}
// END OF Region.c extract
// START OF poly.h extract
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 32fbd8cfed..7712ce71c6 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -609,10 +609,10 @@ Q_GUI_EXPORT void qt_addBitmapToPath(qreal x0, qreal y0, const uchar *image_data
// set up edges
for (int y = 0; y <= h; ++y) {
for (int x = 0; x <= w; ++x) {
- bool topLeft = (x == 0)|(y == 0) ? false : SET(x - 1, y - 1);
- bool topRight = (x == w)|(y == 0) ? false : SET(x, y - 1);
- bool bottomLeft = (x == 0)|(y == h) ? false : SET(x - 1, y);
- bool bottomRight = (x == w)|(y == h) ? false : SET(x, y);
+ bool topLeft = (x == 0 || y == 0) ? false : SET(x - 1, y - 1);
+ bool topRight = (x == w || y == 0) ? false : SET(x, y - 1);
+ bool bottomLeft = (x == 0 || y == h) ? false : SET(x - 1, y);
+ bool bottomRight = (x == w || y == h) ? false : SET(x, y);
GRID(x, y) = 0;
if ((!topRight) & bottomRight)
diff --git a/src/gui/util/qvalidator.cpp b/src/gui/util/qvalidator.cpp
index ede4ccd482..b968592c01 100644
--- a/src/gui/util/qvalidator.cpp
+++ b/src/gui/util/qvalidator.cpp
@@ -693,7 +693,7 @@ QValidator::State QDoubleValidatorPrivate::validateWithLocale(QString &input, QL
if (notation == QDoubleValidator::StandardNotation) {
double max = qMax(qAbs(q->b), qAbs(q->t));
- if (max < LLONG_MAX) {
+ if (max < double(LLONG_MAX)) {
qlonglong n = pow10(numDigits(qlonglong(max)));
// In order to get the highest possible number in the intermediate
// range we need to get 10 to the power of the number of digits