Skip to content
Permalink
Browse files

Fix minor Coverity issues

  • Loading branch information
nyalldawson committed Jul 10, 2016
1 parent b94fbc0 commit 8828197a038d39340ef755b9cd6b31f8d088a78b
@@ -3351,7 +3351,7 @@ bool QgsAuthManager::authDbCommit() const
const char* err = QT_TR_NOOP( "Auth db FAILED to rollback changes" );
QgsDebugMsg( err );
emit messageOut( tr( err ), authManTag(), WARNING );
authDbConnection().rollback();
( void )authDbConnection().rollback();
return false;
}

@@ -3378,7 +3378,7 @@ bool QgsAuthManager::authDbTransactionQuery( QSqlQuery *query ) const
const char* err = QT_TR_NOOP( "Auth db FAILED to rollback changes" );
QgsDebugMsg( err );
emit messageOut( tr( err ), authManTag(), WARNING );
authDbConnection().rollback();
( void )authDbConnection().rollback();
return false;
}

@@ -19,6 +19,7 @@

QgsAttributeTableConfig::QgsAttributeTableConfig()
: mActionWidgetStyle( DropDown )
, mSortOrder( Qt::AscendingOrder )
{

}
@@ -790,7 +790,7 @@ void QgsAttributeTableModel::prefetchSortData( const QString& expressionString )

if ( mSortCacheExpression.isField() )
{
QString fieldName = dynamic_cast<const QgsExpression::NodeColumnRef*>( mSortCacheExpression.rootNode() )->name();
QString fieldName = static_cast<const QgsExpression::NodeColumnRef*>( mSortCacheExpression.rootNode() )->name();
mSortFieldIndex = mLayerCache->layer()->fieldNameIndex( fieldName );
}

@@ -932,7 +932,11 @@ bool QgsDb2Provider::addFeatures( QgsFeatureList & flist )
return false;
}
}
mDatabase.transaction();
if ( !mDatabase.transaction() )
{
QgsDebugMsg( "transaction failed" );
return false;
}
QSqlQuery query = QSqlQuery( mDatabase );
query.setForwardOnly( true );
QSqlQuery queryFid = QSqlQuery( mDatabase );

0 comments on commit 8828197

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