Skip to content
Permalink
Browse files
Rename isUpsertOnEdit in hasUpsertOnEdit
  • Loading branch information
pblottiere committed Aug 28, 2017
1 parent cad038b commit 97ad226
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
@@ -117,7 +117,7 @@ Returns whether values from the joined layer should be cached in memory to speed
.. versionadded:: 3.0
%End

bool isUpsertOnEdit() const;
bool hasUpsertOnEdit() const;
%Docstring
Returns whether a feature created on the target layer has to impact
the joined layer by creating a new feature if necessary.
@@ -77,7 +77,7 @@ void QgsJoinDialog::setJoinInfo( const QgsVectorLayerJoinInfo &joinInfo )
mCacheInMemoryCheckBox->setChecked( joinInfo.isUsingMemoryCache() );
mDynamicFormCheckBox->setChecked( joinInfo.isDynamicFormEnabled() );
mEditableJoinLayer->setChecked( joinInfo.isEditable() );
mUpsertOnEditCheckBox->setChecked( joinInfo.isUpsertOnEdit() );
mUpsertOnEditCheckBox->setChecked( joinInfo.hasUpsertOnEdit() );
mDeleteCascadeCheckBox->setChecked( joinInfo.isDeleteCascade() );

if ( joinInfo.prefix().isNull() )
@@ -1246,7 +1246,7 @@ void QgsVectorLayerProperties::addJoinToTreeWidget( const QgsVectorLayerJoinInfo
joinItem->setText( 5, QChar( 0x2714 ) );
}

if ( join.isUpsertOnEdit() )
if ( join.hasUpsertOnEdit() )
{
joinItem->setText( 6, QChar( 0x2714 ) );
}
@@ -2677,7 +2677,7 @@ bool QgsVectorLayer::addFeaturesToJoinedLayers( QgsFeatureList &features, Flags
{
QgsVectorLayer *joinLayer = info.joinLayer();

if ( joinLayer && joinLayer->isEditable() && info.isEditable() && info.isUpsertOnEdit() )
if ( joinLayer && joinLayer->isEditable() && info.isEditable() && info.hasUpsertOnEdit() )
{
QgsFeatureList joinFeatures;

@@ -277,7 +277,7 @@ void QgsVectorLayerJoinBuffer::writeXml( QDomNode &layer_node, QDomDocument &doc
joinElem.setAttribute( QStringLiteral( "memoryCache" ), joinIt->isUsingMemoryCache() );
joinElem.setAttribute( QStringLiteral( "dynamicForm" ), joinIt->isDynamicFormEnabled() );
joinElem.setAttribute( QStringLiteral( "editable" ), joinIt->isEditable() );
joinElem.setAttribute( QStringLiteral( "upsertOnEdit" ), joinIt->isUpsertOnEdit() );
joinElem.setAttribute( QStringLiteral( "upsertOnEdit" ), joinIt->hasUpsertOnEdit() );
joinElem.setAttribute( QStringLiteral( "deleteCascade" ), joinIt->isDeleteCascade() );

if ( joinIt->joinFieldNamesSubset() )
@@ -96,7 +96,7 @@ class CORE_EXPORT QgsVectorLayerJoinInfo
* the joined layer by creating a new feature if necessary.
* \since QGIS 3.0
*/
bool isUpsertOnEdit() const { return mUpsertOnEdit; }
bool hasUpsertOnEdit() const { return mUpsertOnEdit; }

/** Sets whether a feature created on the target layer has to impact
* the joined layer by creating a new feature if necessary.

0 comments on commit 97ad226

Please sign in to comment.