qmax(qreal, double) is not valid as qreal may be float

adjust the call to use qreal for both (floor() returns double)

REVIEW: 118487
This commit is contained in:
Harald Sitter 2014-06-03 14:15:12 +02:00
parent 80195aa149
commit ce329f4402
2 changed files with 2 additions and 2 deletions

View File

@ -308,7 +308,7 @@ void FrameSvgItem::updateDevicePixelRatio()
{
//devicepixelratio is always set integer in the svg, so needs at least 192dpi to double up.
//(it needs to be integer to have lines contained inside a svg piece to keep being pixel aligned)
m_frameSvg->setDevicePixelRatio(qMax((qreal)1.0, floor(m_units.devicePixelRatio())));
m_frameSvg->setDevicePixelRatio(qMax<qreal>(1.0, floor(m_units.devicePixelRatio())));
m_textureChanged = true;
}

View File

@ -216,7 +216,7 @@ void SvgItem::updateDevicePixelRatio()
if (m_svg) {
//devicepixelratio is always set integer in the svg, so needs at least 192dpi to double up.
//(it needs to be integer to have lines contained inside a svg piece to keep being pixel aligned)
m_svg.data()->setDevicePixelRatio(qMax((qreal)1.0, floor(m_units.devicePixelRatio())));
m_svg.data()->setDevicePixelRatio(qMax<qreal>(1.0, floor(m_units.devicePixelRatio())));
}
}