@@ -3695,7 +3695,7 @@ void QgisApp::setupDockWidget( QDockWidget *dockWidget, bool isFloating, const Q
3695
3695
if ( dockGeometry.isEmpty () )
3696
3696
{
3697
3697
// try to guess a nice initial placement for view - about 3/4 along, half way down
3698
- dockWidget->setGeometry ( QRect ( rect ().width () * 0.75 , rect ().height () * 0.5 , 400 , 400 ) );
3698
+ dockWidget->setGeometry ( QRect ( static_cast < int >( rect ().width () * 0.75 ), static_cast < int >( rect ().height () * 0.5 ) , 400 , 400 ) );
3699
3699
addDockWidget ( area, dockWidget );
3700
3700
}
3701
3701
else
@@ -10902,8 +10902,8 @@ void QgisApp::new3DMapCanvas()
10902
10902
dock->setMapSettings ( map );
10903
10903
10904
10904
QgsRectangle extent = mMapCanvas ->extent ();
10905
- float dist = std::max ( extent.width (), extent.height () );
10906
- dock->mapCanvas3D ()->setViewFromTop ( mMapCanvas ->extent ().center (), dist, mMapCanvas ->rotation () );
10905
+ float dist = static_cast < float >( std::max ( extent.width (), extent.height () ) );
10906
+ dock->mapCanvas3D ()->setViewFromTop ( mMapCanvas ->extent ().center (), dist, static_cast < float >( mMapCanvas ->rotation () ) );
10907
10907
}
10908
10908
#endif
10909
10909
}
@@ -11815,7 +11815,8 @@ void QgisApp::markDirty()
11815
11815
void QgisApp::extentChanged ()
11816
11816
{
11817
11817
// allow symbols in the legend update their preview if they use map units
11818
- mLayerTreeView ->layerTreeModel ()->setLegendMapViewData ( mMapCanvas ->mapUnitsPerPixel (), mMapCanvas ->mapSettings ().outputDpi (), mMapCanvas ->scale () );
11818
+ mLayerTreeView ->layerTreeModel ()->setLegendMapViewData ( mMapCanvas ->mapUnitsPerPixel (),
11819
+ static_cast < int >( std::round ( mMapCanvas ->mapSettings ().outputDpi () ) ), mMapCanvas ->scale () );
11819
11820
}
11820
11821
11821
11822
void QgisApp::layersWereAdded ( const QList<QgsMapLayer *> &layers )
@@ -11880,7 +11881,7 @@ void QgisApp::showStatusMessage( const QString &message )
11880
11881
11881
11882
void QgisApp::loadingLayerMessages ( const QString &layerName, const QList<QgsReadWriteContext::ReadWriteMessage> &messages )
11882
11883
{
11883
- for ( const auto message : messages )
11884
+ for ( const auto & message : messages )
11884
11885
{
11885
11886
messageBar ()->pushMessage ( layerName, message.message (), message.categories ().join ( ' \n ' ), message.level () );
11886
11887
}
0 commit comments