Skip to content
Permalink
Browse files

Add casts to double to fix compilation on ARM

  • Loading branch information
manisandro committed Nov 13, 2014
1 parent 9a2327c commit 4254d4e615b913bb1350f8975c35849b5c1a8098
@@ -233,7 +233,7 @@ double QgsComposerHtml::maxFrameWidth() const
QList<QgsComposerFrame*>::const_iterator frameIt = mFrameItems.constBegin();
for ( ; frameIt != mFrameItems.constEnd(); ++frameIt )
{
maxWidth = qMax( maxWidth, ( *frameIt )->boundingRect().width() );
maxWidth = qMax( maxWidth, ( double )(( *frameIt )->boundingRect().width() ) );
}

return maxWidth;
@@ -62,7 +62,7 @@ QgsLayerTreeModelLegendNode::ItemMetrics QgsLayerTreeModelLegendNode::draw( cons
// itemHeight here is not realy item height, it is only for symbol
// vertical alignment purpose, i.e. ok take single line height
// if there are more lines, thos run under the symbol
double itemHeight = qMax( settings.symbolSize().height(), textHeight );
double itemHeight = qMax(( double ) settings.symbolSize().height(), textHeight );

ItemMetrics im;
im.symbolSize = drawSymbol( settings, ctx, itemHeight );
@@ -334,8 +334,8 @@ QSizeF QgsSymbolV2LegendNode::drawSymbol( const QgsLegendSettings& settings, Ite
p->restore();
}

return QSizeF( qMax( width + 2 * widthOffset, settings.symbolSize().width() ),
qMax( height + 2 * heightOffset, settings.symbolSize().height() ) );
return QSizeF( qMax( width + 2 * widthOffset, ( double ) settings.symbolSize().width() ),
qMax( height + 2 * heightOffset, ( double ) settings.symbolSize().height() ) );
}


@@ -375,7 +375,7 @@ QSizeF QgsLegendRenderer::drawTitle( QPainter* painter, QPointF point, Qt::Align
switch ( halignment )
{
case Qt::AlignHCenter:
textBoxWidth = ( qMin( point.x(), legendWidth - point.x() ) - mSettings.boxSpace() ) * 2.0;
textBoxWidth = ( qMin(( double ) point.x(), legendWidth - point.x() ) - mSettings.boxSpace() ) * 2.0;
textBoxLeft = point.x() - textBoxWidth / 2.;
break;
case Qt::AlignRight:

0 comments on commit 4254d4e

Please sign in to comment.
You can’t perform that action at this time.