Skip to content
Permalink
Browse files

Fix coverity issues

  • Loading branch information
nyalldawson committed Jan 22, 2016
1 parent e83a7c8 commit bfad753f37497f46b0a34837447ca1e946ddbca6
@@ -7480,7 +7480,9 @@ void QgisApp::layerSubsetString()
QgsLayerTreeUtils::insertLayerBelow( QgsProject::instance()->layerTreeRoot(), vlayer, newLayer );
mLayerTreeView->setCurrentLayer( newLayer );
// hide the old layer
QgsProject::instance()->layerTreeRoot()->findLayer( vlayer->id() )->setVisible( Qt::Unchecked );
QgsLayerTreeLayer* vLayerTreeLayer = QgsProject::instance()->layerTreeRoot()->findLayer( vlayer->id() );
if ( vLayerTreeLayer )
vLayerTreeLayer->setVisible( Qt::Unchecked );
vlayer = newLayer;
}
else
@@ -1788,7 +1788,7 @@ void QgsProjectProperties::checkOWS( QgsLayerTreeGroup* treeGroup, QStringList&
owsNames << shortName;
if ( l->type() == QgsMapLayer::VectorLayer )
{
QgsVectorLayer* vl = dynamic_cast<QgsVectorLayer *>( l );
QgsVectorLayer* vl = static_cast<QgsVectorLayer *>( l );
if ( vl->dataProvider()->encoding() == "System" )
encodingMessages << tr( "Update layer \"%1\" encoding" ).arg( l->name() );
}
@@ -399,6 +399,9 @@ QgsLayerTreeLayer* QgsLayerTreeUtils::insertLayerBelow( QgsLayerTreeGroup* group
{
// get the index of the reflayer
QgsLayerTreeLayer* inTree = group->findLayer( refLayer->id() );
if ( !inTree )
return nullptr;

int idx = 0;
foreach ( QgsLayerTreeNode* vl, inTree->parent()->children() )
{
@@ -38,6 +38,7 @@ QgsFileWidget::QgsFileWidget( QWidget *parent )
, mFilter( QString() )
, mDefaultRoot( QString() )
, mStorageMode( GetFile )
, mRelativeStorage( Absolute )
{
setBackgroundRole( QPalette::Window );
setAutoFillBackground( true );
@@ -4056,7 +4056,7 @@ bool QgsSpatiaLiteProvider::changeGeometryValues( const QgsGeometryMap &geometry
if ( toCommit )
{
// ROLLBACK after some previous error
sqlite3_exec( sqliteHandle, "ROLLBACK", nullptr, nullptr, nullptr );
( void )sqlite3_exec( sqliteHandle, "ROLLBACK", nullptr, nullptr, nullptr );
}

return false;

0 comments on commit bfad753

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