Navigation Menu

Skip to content

Commit

Permalink
Add casts to double to fix compilation on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Nov 13, 2014
1 parent 9a2327c commit 4254d4e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposerhtml.cpp
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/core/layertree/qgslayertreemodellegendnode.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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() ) );
}


Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslegendrenderer.cpp
Expand Up @@ -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:
Expand Down

0 comments on commit 4254d4e

Please sign in to comment.