Skip to content

Commit

Permalink
Avoid double db close in offline editing plugin
Browse files Browse the repository at this point in the history
(cherry-picked from 5a8619d)
  • Loading branch information
nyalldawson committed Jul 17, 2018
1 parent a6cd87d commit 4c3174c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/core/qgsofflineediting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,6 @@ void QgsOfflineEditing::committedAttributesAdded( const QString &qgisLayerId, co
}

increaseCommitNo( database.get() );
sqlite3_close( database.get() );
}

void QgsOfflineEditing::committedFeaturesAdded( const QString &qgisLayerId, const QgsFeatureList &addedFeatures )
Expand All @@ -1302,8 +1301,6 @@ void QgsOfflineEditing::committedFeaturesAdded( const QString &qgisLayerId, cons
.arg( newFeatureIds.at( i ) );
sqlExec( database.get(), sql );
}

sqlite3_close( database.get() );
}

void QgsOfflineEditing::committedFeaturesRemoved( const QString &qgisLayerId, const QgsFeatureIds &deletedFeatureIds )
Expand Down Expand Up @@ -1331,8 +1328,6 @@ void QgsOfflineEditing::committedFeaturesRemoved( const QString &qgisLayerId, co
sqlExec( database.get(), sql );
}
}

sqlite3_close( database.get() );
}

void QgsOfflineEditing::committedAttributeValuesChanges( const QString &qgisLayerId, const QgsChangedAttributesMap &changedAttrsMap )
Expand Down Expand Up @@ -1367,7 +1362,6 @@ void QgsOfflineEditing::committedAttributeValuesChanges( const QString &qgisLaye
}

increaseCommitNo( database.get() );
sqlite3_close( database.get() );
}

void QgsOfflineEditing::committedGeometriesChanges( const QString &qgisLayerId, const QgsGeometryMap &changedGeometries )
Expand Down Expand Up @@ -1400,7 +1394,6 @@ void QgsOfflineEditing::committedGeometriesChanges( const QString &qgisLayerId,
}

increaseCommitNo( database.get() );
sqlite3_close( database.get() );
}

void QgsOfflineEditing::startListenFeatureChanges()
Expand Down

0 comments on commit 4c3174c

Please sign in to comment.