diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 2df5933879..6550725faa 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -720,7 +720,7 @@ QGuiApplication::~QGuiApplication() QGuiApplicationPrivate::desktopFileName = nullptr; QGuiApplicationPrivate::mouse_buttons = Qt::NoButton; QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier; - QGuiApplicationPrivate::lastCursorPosition = {qInf(), qInf()}; + QGuiApplicationPrivate::lastCursorPosition = {qreal(qInf()), qreal(qInf())}; QGuiApplicationPrivate::currentMousePressWindow = QGuiApplicationPrivate::currentMouseWindow = nullptr; QGuiApplicationPrivate::applicationState = Qt::ApplicationInactive; QGuiApplicationPrivate::highDpiScalingUpdated = false; diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp index 7cd700a84a..a97cdf0b30 100644 --- a/src/gui/painting/qemulationpaintengine.cpp +++ b/src/gui/painting/qemulationpaintengine.cpp @@ -104,7 +104,7 @@ void QEmulationPaintEngine::fill(const QVectorPath &path, const QBrush &brush) } } else if (style == Qt::TexturePattern) { qreal dpr = qHasPixmapTexture(brush) ? brush.texture().devicePixelRatioF() : brush.textureImage().devicePixelRatioF(); - if (!qFuzzyCompare(dpr, 1.0)) { + if (!qFuzzyCompare(dpr, qreal(1.0))) { QBrush copy = brush; combineXForm(©, QRectF(0, 0, 1.0/dpr, 1.0/dpr)); real_engine->fill(path, copy); diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 80feb2dbaa..d2d6b99f67 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -951,7 +951,7 @@ void QPaintEngineEx::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, con { QBrush brush(state()->pen.color(), pixmap); QTransform xform = QTransform::fromTranslate(r.x() - s.x(), r.y() - s.y()); - if (!qFuzzyCompare(pixmap.devicePixelRatioF(), 1.0)) + if (!qFuzzyCompare(pixmap.devicePixelRatioF(), qreal(1.0))) xform.scale(1.0/pixmap.devicePixelRatioF(), 1.0/pixmap.devicePixelRatioF()); brush.setTransform(xform); diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 8d16b44944..077e28b3e0 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -197,9 +197,9 @@ void QPainterPrivate::checkEmulation() if (state->brush.style() == Qt::TexturePattern) { if (qHasPixmapTexture(state->brush)) - doEmulation |= !qFuzzyCompare(state->brush.texture().devicePixelRatioF(), 1.0); + doEmulation |= !qFuzzyCompare(state->brush.texture().devicePixelRatioF(), qreal(1.0)); else - doEmulation |= !qFuzzyCompare(state->brush.textureImage().devicePixelRatioF(), 1.0); + doEmulation |= !qFuzzyCompare(state->brush.textureImage().devicePixelRatioF(), qreal(1.0)); } if (doEmulation && extended->flags() & QPaintEngineEx::DoNotEmulate) diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index c402446df1..763431ecfe 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -856,7 +856,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPointF points[6]; qreal scaleh = opt->rect.width() / 12.0; qreal scalev = opt->rect.height() / 12.0; - points[0] = { opt->rect.x() + 3.5 * scaleh, opt->rect.y() + 5.5 * scalev }; + points[0] = { opt->rect.x() + qreal(3.5) * scaleh, opt->rect.y() + qreal(5.5) * scalev }; points[1] = { points[0].x(), points[0].y() + 2 * scalev }; points[2] = { points[1].x() + 2 * scaleh, points[1].y() + 2 * scalev }; points[3] = { points[2].x() + 4 * scaleh, points[2].y() - 4 * scalev };