Skip to content

Commit

Permalink
Coverity fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 26, 2015
1 parent 95a7408 commit 7af658f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/app/qgsmaptooldeletepart.cpp
Expand Up @@ -138,6 +138,7 @@ QgsGeometry* QgsMapToolDeletePart::partUnderPoint( QPoint point, QgsFeatureId& f
{
fid = match.featureId();
partNum = snapVertex;
delete geomPart;
return QgsGeometry::fromPoint( match.point() );
}
if ( g->wkbType() == QGis::WKBMultiLineString || g->wkbType() == QGis::WKBMultiLineString25D )
Expand All @@ -149,6 +150,7 @@ QgsGeometry* QgsMapToolDeletePart::partUnderPoint( QPoint point, QgsFeatureId& f
{
fid = match.featureId();
partNum = part;
delete geomPart;
return QgsGeometry::fromPolyline( mline[part] );
}
snapVertex -= mline[part].count();
Expand Down Expand Up @@ -178,6 +180,7 @@ QgsGeometry* QgsMapToolDeletePart::partUnderPoint( QPoint point, QgsFeatureId& f
{
fid = f.id();
partNum = part;
delete geomPart;
return partGeo;
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/gui/attributetable/qgsfeaturemodel.h
Expand Up @@ -7,6 +7,9 @@
class QgsFeatureModel
{
public:
~ QgsFeatureModel()
{}

virtual QModelIndex fidToIndex( QgsFeatureId fid ) = 0;
};

Expand Down
3 changes: 0 additions & 3 deletions src/providers/postgres/qgspostgresexpressioncompiler.h
Expand Up @@ -35,15 +35,12 @@ class QgsPostgresExpressionCompiler

Result compile( const QgsExpression* exp );

inline Result success() { return mSuccess; }

const QString& result() { return mResult; }

private:
Result compile( const QgsExpression::Node* node, QString& str );

private:
Result mSuccess;
QString mResult;
QgsPostgresFeatureSource* mSource;
};
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgsfields.cpp
Expand Up @@ -230,7 +230,7 @@ void TestQgsFields::remove()
fields.remove( 0 );
QCOMPARE( fields.count(), 1 );
QCOMPARE( fields.at( 0 ).name(), QString( "testfield2" ) );
QCOMPARE( fields.indexFromName(QString( "testfield2" )), 0);
QCOMPARE( fields.indexFromName( "testfield2" ), 0 );
}

void TestQgsFields::extend()
Expand Down

0 comments on commit 7af658f

Please sign in to comment.