mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fix qreal vs double.
In qt4 on arm architectures qreal is defined as float while on other architectures it is defined as double. This can cause problems if qreal and double are carelessly mixed. In this particular case the problem is that qMin/qMax are templates defined to take two parameters of the same type. If two different types are passed in then C++ can't resolve what type the template parameter should be and bails out. The fix is simple, typecast one of the parameters so they match. Author: Peter Michael Green <plugwash@debian.org> Bug-Debian: http://bugs.debian.org/737814
This commit is contained in:
parent
03b028dbf7
commit
7db6ae5412
@ -433,7 +433,7 @@ void QwtPolarCurve::drawLines( QPainter *painter,
|
||||
|
||||
if ( !clipRect.isEmpty() )
|
||||
{
|
||||
double off = qCeil( qMax( 1.0, painter->pen().widthF() ) );
|
||||
double off = qCeil( qMax((qreal)1.0,painter->pen().widthF() ) );
|
||||
clipRect = clipRect.toRect().adjusted( -off, -off, off, off );
|
||||
polyline = QwtClipper::clipPolygonF( clipRect, polyline );
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ QRectF QwtPolarLayout::layoutLegend( Options options, QRectF &rect ) const
|
||||
// We don't allow vertical legends to take more than
|
||||
// half of the available space.
|
||||
|
||||
dim = qMin( hint.width(), rect.width() * d_data->legendRatio );
|
||||
dim = qMin( hint.width(), (qreal)(rect.width() * d_data->legendRatio) );
|
||||
|
||||
if ( !( options & IgnoreScrollbars ) )
|
||||
{
|
||||
@ -293,7 +293,7 @@ QRectF QwtPolarLayout::layoutLegend( Options options, QRectF &rect ) const
|
||||
}
|
||||
else
|
||||
{
|
||||
dim = qMin( hint.height(), rect.height() * d_data->legendRatio );
|
||||
dim = qMin( hint.height(), (qreal)(rect.height() * d_data->legendRatio) );
|
||||
dim = qMax( dim, d_data->layoutData.legend.hScrollBarHeight );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user