Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid double db close in offline editing plugin
  • Loading branch information
nyalldawson committed Jul 16, 2018
1 parent 8bd0e7e commit 5a8619d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -1338,7 +1338,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 Down Expand Up @@ -1376,8 +1375,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 @@ -1405,8 +1402,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 @@ -1441,7 +1436,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 @@ -1474,7 +1468,6 @@ void QgsOfflineEditing::committedGeometriesChanges( const QString &qgisLayerId,
}

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

void QgsOfflineEditing::startListenFeatureChanges()
Expand Down

0 comments on commit 5a8619d

Please sign in to comment.