Skip to content
Permalink
Browse files

Some very minor Coverity related fixes

  • Loading branch information
nyalldawson committed Feb 16, 2015
1 parent da092bf commit 2d8feebbde1106afb56297cddecb371a64660047
Showing with 12 additions and 14 deletions.
  1. +0 −2 src/providers/ogr/qgsogrprovider.cpp
  2. +12 −12 tests/qt_modeltest/modeltest.cpp
@@ -650,7 +650,6 @@ QStringList QgsOgrProvider::subLayers() const
OGRFeatureH fet;
while (( fet = OGR_L_GetNextFeature( layer ) ) )
{
if ( !fet ) continue;
OGRGeometryH geom = OGR_F_GetGeometryRef( fet );
if ( geom )
{
@@ -2502,7 +2501,6 @@ void QgsOgrProvider::recalculateFeatureCount()
OGRFeatureH fet;
while (( fet = OGR_L_GetNextFeature( ogrLayer ) ) )
{
if ( !fet ) continue;
OGRGeometryH geom = OGR_F_GetGeometryRef( fet );
if ( geom )
{
@@ -133,23 +133,23 @@ void ModelTest::nonDestructiveBasicTest()
Qt::ItemFlags flags = model->flags( QModelIndex() );
Q_ASSERT( flags == Qt::ItemIsDropEnabled || flags == 0 );
( void )model->hasChildren( QModelIndex() );
model->hasIndex( 0, 0 );
model->headerData( 0, Qt::Horizontal );
model->index( 0, 0 );
model->itemData( QModelIndex() );
( void )model->hasIndex( 0, 0 );
( void )model->headerData( 0, Qt::Horizontal );
( void )model->index( 0, 0 );
( void )model->itemData( QModelIndex() );
QVariant cache;
model->match( QModelIndex(), -1, cache );
model->mimeTypes();
( void )model->match( QModelIndex(), -1, cache );
( void )model->mimeTypes();
Q_ASSERT( model->parent( QModelIndex() ) == QModelIndex() );
Q_ASSERT( model->rowCount() >= 0 );
QVariant variant;
model->setData( QModelIndex(), variant, -1 );
model->setHeaderData( -1, Qt::Horizontal, QVariant() );
model->setHeaderData( 999999, Qt::Horizontal, QVariant() );
( void )model->setData( QModelIndex(), variant, -1 );
( void )model->setHeaderData( -1, Qt::Horizontal, QVariant() );
( void )model->setHeaderData( 999999, Qt::Horizontal, QVariant() );
QMap<int, QVariant> roles;
model->sibling( 0, 0, QModelIndex() );
model->span( QModelIndex() );
model->supportedDropActions();
( void )model->sibling( 0, 0, QModelIndex() );
( void )model->span( QModelIndex() );
( void )model->supportedDropActions();
}

/*!

0 comments on commit 2d8feeb

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