Rename isUpsertOnEdit in hasUpsertOnEdit

This commit is contained in:
Blottiere Paul 2017-07-24 16:55:37 +01:00
parent cad038b1bf
commit 97ad226f64
6 changed files with 6 additions and 6 deletions

View File

@ -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.

View File

@ -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() )

View File

@ -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 ) );
}

View File

@ -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;

View File

@ -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() )

View File

@ -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.