Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[offline editing] Use the vector layer pointer for clarity and avoid …
…needless re-casting
  • Loading branch information
nirvn authored and nyalldawson committed Aug 2, 2021
1 parent 4d2f9af commit c4cd13e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -272,17 +272,17 @@ void QgsOfflineEditing::synchronize()


// remove offline layer properties
layer->removeCustomProperty( CUSTOM_PROPERTY_IS_OFFLINE_EDITABLE );
offlineLayer->removeCustomProperty( CUSTOM_PROPERTY_IS_OFFLINE_EDITABLE );

// remove original layer source and information
layer->removeCustomProperty( CUSTOM_PROPERTY_REMOTE_SOURCE );
layer->removeCustomProperty( CUSTOM_PROPERTY_REMOTE_PROVIDER );
layer->removeCustomProperty( CUSTOM_PROPERTY_ORIGINAL_LAYERID );
layer->removeCustomProperty( CUSTOM_PROPERTY_LAYERNAME_SUFFIX );
offlineLayer->removeCustomProperty( CUSTOM_PROPERTY_REMOTE_SOURCE );
offlineLayer->removeCustomProperty( CUSTOM_PROPERTY_REMOTE_PROVIDER );
offlineLayer->removeCustomProperty( CUSTOM_PROPERTY_ORIGINAL_LAYERID );
offlineLayer->removeCustomProperty( CUSTOM_PROPERTY_LAYERNAME_SUFFIX );

// remove connected signals
disconnect( layer, &QgsVectorLayer::editingStarted, this, &QgsOfflineEditing::startListenFeatureChanges );
disconnect( layer, &QgsVectorLayer::editingStopped, this, &QgsOfflineEditing::stopListenFeatureChanges );
disconnect( offlineLayer, &QgsVectorLayer::editingStarted, this, &QgsOfflineEditing::startListenFeatureChanges );
disconnect( offlineLayer, &QgsVectorLayer::editingStopped, this, &QgsOfflineEditing::stopListenFeatureChanges );

//add constrainst of fields that use defaultValueClauses from provider on original
const auto fields = remoteLayer->fields();
Expand Down

0 comments on commit c4cd13e

Please sign in to comment.