mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Fix coverity ignored return value warnings
This commit is contained in:
parent
b0a36e9bb1
commit
75c99800d0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user