Skip to content
Permalink
Browse files

Fix coverity ignored return value warnings

  • Loading branch information
nyalldawson committed Dec 5, 2017
1 parent b0a36e9 commit 75c99800d0f16d92264cb7f1b24e561c9c5d57a9
@@ -174,10 +174,17 @@ void QgsFileDownloader::onFinished()
QUrl newUrl = mUrl.resolved( redirectionTarget.toUrl() );
mUrl = newUrl;
mReply->deleteLater();
mFile.open( QIODevice::WriteOnly );
mFile.resize( 0 );
mFile.close();
startDownload();
if ( !mFile.open( QIODevice::WriteOnly ) )
{
mFile.remove();
error( tr( "Cannot open output file: %1" ).arg( mFile.fileName() ) );
}
else
{
mFile.resize( 0 );
mFile.close();
startDownload();
}
return;
}
else
@@ -289,9 +289,11 @@ void QgsAttributeTableModel::attributeValueChanged( QgsFeatureId fid, int idx, c
{
if ( mSortFieldIndex == -1 )
{
loadFeatureAtId( fid );
mExpressionContext.setFeature( mFeat );
mSortCache[fid] = mSortCacheExpression.evaluate( &mExpressionContext );
if ( loadFeatureAtId( fid ) )
{
mExpressionContext.setFeature( mFeat );
mSortCache[fid] = mSortCacheExpression.evaluate( &mExpressionContext );
}
}
else
{
@@ -187,7 +187,7 @@ QgsGdalProvider::QgsGdalProvider( const QString &uri, bool update, GDALDatasetH
}
else
{
initIfNeeded();
( void )initIfNeeded();
}
}

@@ -301,7 +301,7 @@ bool TestQgsDxfExport::fileContainsText( const QString &path, const QString &tex
{
QStringList searchLines = text.split( '\n' );
QFile file( path );
file.open( QIODevice::ReadOnly );
QVERIFY( file.open( QIODevice::ReadOnly ) );
QTextStream in( &file );
QString line;
do

0 comments on commit 75c9980

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