Fix compiler issues when qreal is float
Change-Id: Ide3b5a3b0f2d93708409edac8aa999eb25c3ab54 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
f4093d02ff
commit
4886514fc3
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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 };
|
||||
|
Loading…
Reference in New Issue
Block a user