Commit e54998ff authored by Jonathan Riddell's avatar Jonathan Riddell 🏄

build fixes for armhf where qreal!=double

parent 36e5b4f2
......@@ -97,7 +97,7 @@ public:
qreal nu2 = (-qB + sqrtD) * m_qD_div;
if (nu2 < 0.0 || nu2 > 1.0) {
nu = qBound(0.0, nu, 1.0);
nu = qBound(qreal(0.0), nu, qreal(1.0));
} else {
nu = nu2;
}
......
......@@ -550,7 +550,7 @@ KisGradientShapeStrategy* createPolygonShapeStrategy(const QPolygonF &polygon)
const QRect selectionRect = polygon.boundingRect().toAlignedRect();
const qreal step =
qMin(8.0, KritaUtils::maxDimensionPortion(selectionRect, 0.01, 3.0));
qMin(qreal(8.0), KritaUtils::maxDimensionPortion(selectionRect, 0.01, 3.0));
return new KisCachedGradientShapeStrategy(selectionRect, step, step, strategy);
}
......
......@@ -219,7 +219,7 @@ KisPolygonalGradientShapeStrategy::KisPolygonalGradientShapeStrategy(const QPoly
const qreal lengthStep =
KritaUtils::maxDimensionPortion(selection.boundingRect(),
0.01, 3.0);
const qreal portionStep = qMin(lengthStep / length, 0.01);
const qreal portionStep = qMin(lengthStep / length, qreal(0.01));
for (qreal t = 0.0; t < 1.0; t += portionStep) {
m_selection << p.pointAtPercent(t);
......
......@@ -219,7 +219,7 @@ void KisFloatColorInput::update()
m_dblNumInput->setMaximum(m_maxValue);
// ensure at least 3 significant digits are always shown
int newPrecision = 2 + qMax(0.0, std::ceil(-std::log10(m_maxValue)));
int newPrecision = 2 + qMax(qreal(0.0), std::ceil(-std::log10(m_maxValue)));
if (newPrecision != m_dblNumInput->decimals()) {
m_dblNumInput->setDecimals(newPrecision);
m_dblNumInput->updateGeometry();
......
......@@ -451,10 +451,10 @@ void KisToolFreehandHelper::paint(KoPointerEvent *event)
m_d->haveTangent = true;
m_d->previousTangent =
(info.pos() - m_d->previousPaintInformation.pos()) /
qMax(1.0, info.currentTime() - m_d->previousPaintInformation.currentTime());
qMax(qreal(1.0), info.currentTime() - m_d->previousPaintInformation.currentTime());
} else {
QPointF newTangent = (info.pos() - m_d->olderPaintInformation.pos()) /
qMax(1.0, info.currentTime() - m_d->olderPaintInformation.currentTime());
qMax(qreal(1.0), info.currentTime() - m_d->olderPaintInformation.currentTime());
paintBezierSegment(m_d->olderPaintInformation, m_d->previousPaintInformation,
m_d->previousTangent, newTangent);
......
......@@ -796,8 +796,8 @@ QList<QPointF> KoPathSegment::intersections(const KoPathSegment &segment) const
d1 = d->distanceFromChord(d->first->controlPoint2());
else
d1 = d->distanceFromChord(d->second->controlPoint1());
dmin = qMin(qreal(0.0), 0.5 * d1);
dmax = qMax(qreal(0.0), 0.5 * d1);
dmin = qMin(qreal(0.0), qreal(0.5 * d1));
dmax = qMax(qreal(0.0), qreal(0.5 * d1));
} else {
qreal d1 = d->distanceFromChord(d->first->controlPoint2());
qreal d2 = d->distanceFromChord(d->second->controlPoint1());
......
......@@ -144,7 +144,7 @@ void KoUnitDoubleSpinBox::setUnit( KoUnit unit )
if (unit.type() == KoUnit::Pixel) {
// limit the pixel step by 1.0
step = qMax(1.0, step);
step = qMax(qreal(1.0), step);
}
QDoubleSpinBox::setSingleStep( step );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment