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(); QList<QgsComposerFrame*>::const_iterator frameIt = mFrameItems.constBegin();
for ( ; frameIt != mFrameItems.constEnd(); ++frameIt ) for ( ; frameIt != mFrameItems.constEnd(); ++frameIt )
{ {
maxWidth = qMax( maxWidth, ( *frameIt )->boundingRect().width() ); maxWidth = qMax( maxWidth, ( double )(( *frameIt )->boundingRect().width() ) );
} }


return maxWidth; 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 // itemHeight here is not realy item height, it is only for symbol
// vertical alignment purpose, i.e. ok take single line height // vertical alignment purpose, i.e. ok take single line height
// if there are more lines, thos run under the symbol // 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; ItemMetrics im;
im.symbolSize = drawSymbol( settings, ctx, itemHeight ); im.symbolSize = drawSymbol( settings, ctx, itemHeight );
Expand Down Expand Up @@ -334,8 +334,8 @@ QSizeF QgsSymbolV2LegendNode::drawSymbol( const QgsLegendSettings& settings, Ite
p->restore(); p->restore();
} }


return QSizeF( qMax( width + 2 * widthOffset, settings.symbolSize().width() ), return QSizeF( qMax( width + 2 * widthOffset, ( double ) settings.symbolSize().width() ),
qMax( height + 2 * heightOffset, settings.symbolSize().height() ) ); 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 ) switch ( halignment )
{ {
case Qt::AlignHCenter: 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.; textBoxLeft = point.x() - textBoxWidth / 2.;
break; break;
case Qt::AlignRight: case Qt::AlignRight:
Expand Down

0 comments on commit 4254d4e

Please sign in to comment.