Skip to content
Permalink
Browse files

Fix clang-tidy warnings

  • Loading branch information
m-kuhn committed Mar 9, 2019
1 parent a14ddc8 commit cc08771d11562f55862a09536e1a1139427042c2
Showing with 6 additions and 5 deletions.
  1. +2 −2 src/app/qgsvectorlayerproperties.cpp
  2. +4 −3 src/core/qgsmaprendererjob.cpp
@@ -233,7 +233,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(

if ( mLayer->dataProvider() )//enable spatial index button group if supported by provider
{
int capabilities = mLayer->dataProvider()->capabilities();
QgsVectorDataProvider::Capabilities capabilities = mLayer->dataProvider()->capabilities();
if ( !( capabilities & QgsVectorDataProvider::CreateSpatialIndex ) )
{
pbnIndex->setEnabled( false );
@@ -1669,7 +1669,7 @@ void QgsVectorLayerProperties::updateAuxiliaryStoragePage()
mAuxiliaryStorageKeyLineEdit->setText( alayer->joinInfo().targetFieldName() );

// update feature count
int features = alayer->featureCount();
long features = alayer->featureCount();
mAuxiliaryStorageFeaturesLineEdit->setText( QString::number( features ) );

// update actions
@@ -87,7 +87,8 @@ bool QgsMapRendererJob::prepareLabelCache() const

// calculate which layers will be labeled
QSet< QgsMapLayer * > labeledLayers;
Q_FOREACH ( const QgsMapLayer *ml, mSettings.layers() )
const QList<QgsMapLayer *> layers = mSettings.layers();
for ( const QgsMapLayer *ml : layers )
{
QgsVectorLayer *vl = const_cast< QgsVectorLayer * >( qobject_cast<const QgsVectorLayer *>( ml ) );
if ( vl && QgsPalLabeling::staticWillUseLayer( vl ) )
@@ -314,7 +315,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter *painter, QgsLabelingEn
job.cached = true;
job.imageInitialized = true;
job.img = new QImage( mCache->cacheImage( ml->id() ) );
job.img->setDevicePixelRatio( mSettings.devicePixelRatio() );
job.img->setDevicePixelRatio( static_cast<qreal>( mSettings.devicePixelRatio() ) );
job.renderer = nullptr;
job.context.setPainter( nullptr );
continue;
@@ -328,7 +329,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter *painter, QgsLabelingEn
// Flattened image for drawing when a blending mode is set
QImage *mypFlattenedImage = new QImage( mSettings.deviceOutputSize(),
mSettings.outputImageFormat() );
mypFlattenedImage->setDevicePixelRatio( mSettings.devicePixelRatio() );
mypFlattenedImage->setDevicePixelRatio( static_cast<qreal>( mSettings.devicePixelRatio() ) );
if ( mypFlattenedImage->isNull() )
{
mErrors.append( Error( ml->id(), tr( "Insufficient memory for image %1x%2" ).arg( mSettings.outputSize().width() ).arg( mSettings.outputSize().height() ) ) );

0 comments on commit cc08771

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