Skip to content

Commit

Permalink
Merge pull request #3840 from DelazJ/selectedfeaturesids
Browse files Browse the repository at this point in the history
Replace selectedFeaturesIds by selectedFeatureIds
  • Loading branch information
nyalldawson committed Dec 7, 2016
2 parents ea661e5 + e0912b8 commit 8a3c1ef
Show file tree
Hide file tree
Showing 45 changed files with 108 additions and 99 deletions.
9 changes: 9 additions & 0 deletions doc/api_break.dox
Expand Up @@ -199,12 +199,14 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
<tr><td>QgsApplication<td>defaultStyleV2Path<td>defaultStylePath
<tr><td>QgsApplication<td>userStyleV2Path<td>userStylePath
<tr><td>QgsComposerShape<td>setUseSymbolV2<td>setUseSymbol
<tr><td>QgsIFeatureSelectionManager<td>selectedFeaturesIds<td>selectedFeatureIds
<tr><td>QgsSymbolLayerUtils<td>createSymbolLayerV2ListFromSld<td>createSymbolLayerListFromSld
<tr><td>QgsVectorLayer<td>editorWidgetV2Config<td>editorWidgetConfig
<tr><td>QgsVectorLayer<td>editorWidgetV2Text<td>editorWidgetText
<tr><td>QgsVectorLayer<td>editorWidgetV2Type<td>editorWidgetType
<tr><td>QgsVectorLayer<td>deleteVertexV2<td>deleteVertex
<tr><td>QgsVectorLayer<td>rendererV2<td>renderer
<tr><td>QgsVectorLayer<td>selectedFeaturesIds<td>selectedFeatureIds
<tr><td>QgsVectorLayerEditUtils<td>deleteVertexV2<td>deleteVertex
<tr><td>QgsComposerSymbolItem<td>symbolV2<td>symbol
<tr><td>QgsServerInterface<td>capabiblitiesCache<td>capabilitiesCache
Expand Down Expand Up @@ -988,6 +990,12 @@ QgsHighlight {#qgis_api_break_3_0_QgsHighlight}
- The QgsHighlight constructor now takes a geometry reference, not a pointer.


QgsIFeatureSelectionManager {#qgis_api_break_3_0_QgsIFeatureSelectionManager}
---------------------------

- selectedFeaturesIds() has been renamed to selectedFeatureIds()


QgsJSONExporter {#qgis_api_break_3_0_QgsJSONExporter}
---------------

Expand Down Expand Up @@ -1578,6 +1586,7 @@ displayExpression instead. For the map tip use mapTipTemplate() instead.
- Signal layerDeleted() has been removed. Replaced by Qt signal destroyed().
- Deprecated editor widget methods and enums and structs: struct RangeData, enum FeatureFormSuppress, enum EditType, addAttributeEditorWidget(), editorWidgetV2(), editorWidgetConfig(), attributeEditorElements(), editType(), setEditType(), editorLayout(), setEditorLayout, setEditorWidgetV2Config(), setCheckedState(), editForm(), setEditForm(), featureFormSuppress(), setFeatureFormSuppress(), editFormInit(), setEditFormInit(), valueMap(), range(), dateFormat(), fieldEditable(), labelOnTop(), setFieldEditable() and setLabelOnTop(). Use editFormConfig()
- select() replaced by selectByRect()
- selectedFeaturesIds() replaced by selectedFeatureIds()
- setSelectedFeatures() replaced by selectByIds()
- applyNamedStyle() replaced by applyNamedStyle()
- isReadOnly() use readOnly()
Expand Down
6 changes: 3 additions & 3 deletions python/core/qgsvectorlayer.sip
Expand Up @@ -572,7 +572,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
*
* @return A list of { @link QgsFeature } 's
*
* @see selectedFeaturesIds()
* @see selectedFeatureIds()
* @see selectedFeaturesIterator() which is more memory friendly when handling large selections
*/
QgsFeatureList selectedFeatures() const;
Expand All @@ -585,7 +585,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
*
* @return Iterator over the selected features
*
* @see selectedFeaturesIds()
* @see selectedFeatureIds()
* @see selectedFeatures()
*/
QgsFeatureIterator selectedFeaturesIterator( QgsFeatureRequest request = QgsFeatureRequest() ) const;
Expand All @@ -596,7 +596,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
* @return A list of { @link QgsFeatureId } 's
* @see selectedFeatures()
*/
const QgsFeatureIds &selectedFeaturesIds() const;
const QgsFeatureIds &selectedFeatureIds() const;

/** Returns the bounding box of the selected features. If there is no selection, QgsRectangle(0,0,0,0) is returned */
QgsRectangle boundingBoxOfSelected() const;
Expand Down
2 changes: 1 addition & 1 deletion python/gui/attributetable/qgsifeatureselectionmanager.sip
Expand Up @@ -63,7 +63,7 @@ class QgsIFeatureSelectionManager : QObject
* @return A list of { @link QgsFeatureId } 's
* @see selectedFeatures()
*/
virtual const QgsFeatureIds &selectedFeaturesIds() const = 0;
virtual const QgsFeatureIds &selectedFeatureIds() const = 0;

signals:
/**
Expand Down
Expand Up @@ -63,7 +63,7 @@ def processAlgorithm(self, progress):
fieldName = self.getParameterValue(self.FIELD)
value = self.getParameterValue(self.VALUE)

selected = layer.selectedFeaturesIds()
selected = layer.selectedFeatureIds()
if len(selected) == 0:
GeoAlgorithmExecutionException(
self.tr('There is no selection in the input layer. '
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/SelectByExpression.py
Expand Up @@ -61,7 +61,7 @@ def defineCharacteristics(self):
def processAlgorithm(self, progress):
filename = self.getParameterValue(self.LAYERNAME)
layer = dataobjects.getObjectFromUri(filename)
oldSelection = set(layer.selectedFeaturesIds())
oldSelection = set(layer.selectedFeatureIds())
method = self.getParameterValue(self.METHOD)

if method == 0:
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/SelectByLocation.py
Expand Up @@ -87,7 +87,7 @@ def processAlgorithm(self, progress):
predicates = self.getParameterValue(self.PREDICATE)
precision = self.getParameterValue(self.PRECISION)

oldSelection = set(inputLayer.selectedFeaturesIds())
oldSelection = set(inputLayer.selectedFeatureIds())
inputLayer.removeSelection()
index = vector.spatialindex(inputLayer)

Expand Down
14 changes: 7 additions & 7 deletions src/analysis/vector/qgsgeometryanalyzer.cpp
Expand Up @@ -58,7 +58,7 @@ bool QgsGeometryAnalyzer::simplify( QgsVectorLayer* layer,
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
Expand Down Expand Up @@ -173,7 +173,7 @@ bool QgsGeometryAnalyzer::centroids( QgsVectorLayer* layer, const QString& shape
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
Expand Down Expand Up @@ -396,7 +396,7 @@ bool QgsGeometryAnalyzer::convexHull( QgsVectorLayer* layer, const QString& shap
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
QgsFeatureIds::const_iterator it = selection.constBegin();
for ( ; it != selection.constEnd(); ++it )
{
Expand Down Expand Up @@ -447,7 +447,7 @@ bool QgsGeometryAnalyzer::convexHull( QgsVectorLayer* layer, const QString& shap
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
Expand Down Expand Up @@ -594,7 +594,7 @@ bool QgsGeometryAnalyzer::dissolve( QgsVectorLayer* layer, const QString& shapef
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
QgsFeatureIds::const_iterator it = selection.constBegin();
for ( ; it != selection.constEnd(); ++it )
{
Expand Down Expand Up @@ -626,7 +626,7 @@ bool QgsGeometryAnalyzer::dissolve( QgsVectorLayer* layer, const QString& shapef
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
Expand Down Expand Up @@ -744,7 +744,7 @@ bool QgsGeometryAnalyzer::buffer( QgsVectorLayer* layer, const QString& shapefil
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/vector/qgsoverlayanalyzer.cpp
Expand Up @@ -58,12 +58,12 @@ bool QgsOverlayAnalyzer::intersection( QgsVectorLayer* layerA, QgsVectorLayer* l
//take only selection
if ( onlySelectedFeatures )
{
QgsFeatureIds selectionB = layerB->selectedFeaturesIds();
QgsFeatureIds selectionB = layerB->selectedFeatureIds();
QgsFeatureRequest req = QgsFeatureRequest().setFilterFids( selectionB ).setSubsetOfAttributes( QgsAttributeList() );
QgsSpatialIndex index = QgsSpatialIndex( layerB->getFeatures( req ) );

//use QgsVectorLayer::featureAtId
const QgsFeatureIds selectionA = layerA->selectedFeaturesIds();
const QgsFeatureIds selectionA = layerA->selectedFeatureIds();
if ( p )
{
p->setMaximum( selectionA.size() );
Expand Down
12 changes: 6 additions & 6 deletions src/app/qgisapp.cpp
Expand Up @@ -6516,7 +6516,7 @@ void QgisApp::deleteSelected( QgsMapLayer *layer, QWidget* parent, bool promptCo
}

//validate selection
int numberOfSelectedFeatures = vlayer->selectedFeaturesIds().size();
int numberOfSelectedFeatures = vlayer->selectedFeatureIds().size();
if ( numberOfSelectedFeatures == 0 )
{
messageBar()->pushMessage( tr( "No Features Selected" ),
Expand Down Expand Up @@ -7023,7 +7023,7 @@ void QgisApp::mergeAttributesOfSelectedFeatures()
}

//get selected feature ids (as a QSet<int> )
const QgsFeatureIds& featureIdSet = vl->selectedFeaturesIds();
const QgsFeatureIds& featureIdSet = vl->selectedFeatureIds();
if ( featureIdSet.size() < 2 )
{
messageBar()->pushMessage(
Expand Down Expand Up @@ -7051,7 +7051,7 @@ void QgisApp::mergeAttributesOfSelectedFeatures()
QSet<int> toSkip = d.skippedAttributeIndexes();

bool firstFeature = true;
Q_FOREACH ( QgsFeatureId fid, vl->selectedFeaturesIds() )
Q_FOREACH ( QgsFeatureId fid, vl->selectedFeatureIds() )
{
for ( int i = 0; i < merged.count(); ++i )
{
Expand Down Expand Up @@ -7165,7 +7165,7 @@ void QgisApp::mergeSelectedFeatures()
}

//get selected feature ids (as a QSet<int> )
const QgsFeatureIds& featureIdSet = vl->selectedFeaturesIds();
const QgsFeatureIds& featureIdSet = vl->selectedFeatureIds();
if ( featureIdSet.size() < 2 )
{
messageBar()->pushMessage(
Expand All @@ -7176,7 +7176,7 @@ void QgisApp::mergeSelectedFeatures()
}

//get initial selection (may be altered by attribute merge dialog later)
QgsFeatureIds featureIds = vl->selectedFeaturesIds();
QgsFeatureIds featureIds = vl->selectedFeatureIds();
QgsFeatureList featureList = vl->selectedFeatures(); //get QList<QgsFeature>
bool canceled;
QgsGeometry unionGeom = unionGeometries( vl, featureList, canceled );
Expand All @@ -7199,7 +7199,7 @@ void QgisApp::mergeSelectedFeatures()
return;
}

QgsFeatureIds featureIdsAfter = vl->selectedFeaturesIds();
QgsFeatureIds featureIdsAfter = vl->selectedFeatureIds();

if ( featureIdsAfter.size() < 2 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsattributeactiondialog.cpp
Expand Up @@ -306,7 +306,7 @@ void QgsAttributeActionDialog::addDefaultActions()
insertRow( pos++, QgsAction::GenericPython, tr( "Clicked coordinates (Run feature actions tool)" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nQtWidgets.QMessageBox.information(None, \"Clicked coords\", \"layer: [% @layer_id %]\\ncoords: ([% @click_x %],[% @click_y %])\")" ), QLatin1String( "" ), false, tr( "Clicked Coordinate" ), QSet<QString>() << QStringLiteral( "Canvas" ) );
insertRow( pos++, QgsAction::OpenUrl, tr( "Open file" ), QStringLiteral( "[% \"PATH\" %]" ), QLatin1String( "" ), false, tr( "Open file" ), QSet<QString>() << QStringLiteral( "Feature" ) << QStringLiteral( "Canvas" ) );
insertRow( pos++, QgsAction::OpenUrl, tr( "Search on web based on attribute's value" ), QStringLiteral( "http://www.google.com/search?q=[% \"ATTRIBUTE\" %]" ), QLatin1String( "" ), false, tr( "Search Web" ), QSet<QString>() << QStringLiteral( "Field" ) );
insertRow( pos++, QgsAction::GenericPython, tr( "List feature ids" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nlayer = QgsMapLayerRegistry.instance().mapLayer('[% @layer_id %]')\nif layer.selectedFeatureCount():\n ids = layer.selectedFeaturesIds()\nelse:\n ids = [f.id() for f in layer.getFeatures()]\n\nQtWidgets.QMessageBox.information(None, \"Feature ids\", ', '.join([str(id) for id in ids]))" ), QLatin1String( "" ), false, tr( "List feature ids" ), QSet<QString>() << QStringLiteral( "Layer" ) );
insertRow( pos++, QgsAction::GenericPython, tr( "List feature ids" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nlayer = QgsMapLayerRegistry.instance().mapLayer('[% @layer_id %]')\nif layer.selectedFeatureCount():\n ids = layer.selectedFeatureIds()\nelse:\n ids = [f.id() for f in layer.getFeatures()]\n\nQtWidgets.QMessageBox.information(None, \"Feature ids\", ', '.join([str(id) for id in ids]))" ), QLatin1String( "" ), false, tr( "List feature ids" ), QSet<QString>() << QStringLiteral( "Layer" ) );
}

void QgsAttributeActionDialog::itemDoubleClicked( QTableWidgetItem* item )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsattributetabledialog.cpp
Expand Up @@ -436,7 +436,7 @@ void QgsAttributeTableDialog::updateFieldFromExpression()

void QgsAttributeTableDialog::updateFieldFromExpressionSelected()
{
QgsFeatureIds filteredIds = mLayer->selectedFeaturesIds();
QgsFeatureIds filteredIds = mLayer->selectedFeatureIds();
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->asExpression(), filteredIds );
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsfieldcalculator.cpp
Expand Up @@ -276,7 +276,7 @@ void QgsFieldCalculator::accept()
QgsFeatureRequest req = QgsFeatureRequest().setFlags( useGeometry ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry );
if ( mOnlyUpdateSelectedCheckBox->isChecked() )
{
req.setFilterFids( mVectorLayer->selectedFeaturesIds() );
req.setFilterFids( mVectorLayer->selectedFeatureIds() );
}
QgsFeatureIterator fit = mVectorLayer->getFeatures( req );
while ( fit.nextFeature( feature ) )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsidentifyresultsdialog.cpp
Expand Up @@ -1915,7 +1915,7 @@ void QgsIdentifyResultsDialog::toggleFeatureSelection()
if ( !vl )
return;

if ( vl->selectedFeaturesIds().contains( item->feature().id() ) )
if ( vl->selectedFeatureIds().contains( item->feature().id() ) )
vl->deselect( item->feature().id() );
else
vl->select( item->feature().id() );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolmovefeature.cpp
Expand Up @@ -130,7 +130,7 @@ void QgsMapToolMoveFeature::cadCanvasReleaseEvent( QgsMapMouseEvent* e )
}
else
{
mMovedFeatures = vlayer->selectedFeaturesIds();
mMovedFeatures = vlayer->selectedFeatureIds();

mRubberBand = createRubberBand( vlayer->geometryType() );
QgsFeature feat;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooloffsetcurve.cpp
Expand Up @@ -284,7 +284,7 @@ QgsGeometry QgsMapToolOffsetCurve::createOriginGeometry( QgsVectorLayer* vl, con
}

//for background layers, try to merge selected entries together if snapped feature is contained in selection
const QgsFeatureIds& selection = vl->selectedFeaturesIds();
const QgsFeatureIds& selection = vl->selectedFeatureIds();
if ( selection.size() < 1 || !selection.contains( match.featureId() ) )
{
return convertToSingleLine( snappedFeature.geometry(), partVertexNr, mMultiPartGeometry );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolrotatefeature.cpp
Expand Up @@ -279,7 +279,7 @@ void QgsMapToolRotateFeature::canvasReleaseEvent( QgsMapMouseEvent* e )
}
else
{
mRotatedFeatures = vlayer->selectedFeaturesIds();
mRotatedFeatures = vlayer->selectedFeatureIds();

mRubberBand = createRubberBand( vlayer->geometryType() ) ;

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolselectutils.cpp
Expand Up @@ -129,7 +129,7 @@ void QgsMapToolSelectUtils::selectSingleFeature( QgsMapCanvas* canvas, const Qgs
if ( e->modifiers() & Qt::ShiftModifier || e->modifiers() & Qt::ControlModifier )
{
QgsFeatureId selectId = *selectedFeatures.constBegin();
QgsFeatureIds layerSelectedFeatures = vlayer->selectedFeaturesIds();
QgsFeatureIds layerSelectedFeatures = vlayer->selectedFeatureIds();
if ( layerSelectedFeatures.contains( selectId ) )
behaviour = QgsVectorLayer::RemoveFromSelection;
else
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmergeattributesdialog.cpp
Expand Up @@ -464,7 +464,7 @@ void QgsMergeAttributesDialog::on_mRemoveFeatureFromSelectionButton_clicked()
selectedRowChanged();

//remove feature from the vector layer selection
QgsFeatureIds selectedIds = mVectorLayer->selectedFeaturesIds();
QgsFeatureIds selectedIds = mVectorLayer->selectedFeatureIds();
selectedIds.remove( featureId );
mVectorLayer->selectByIds( selectedIds );
mMapCanvas->repaint();
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsexpression.cpp
Expand Up @@ -1493,7 +1493,7 @@ static QVariant fcnIsSelected( const QVariantList& values, const QgsExpressionCo
return QVariant( QVariant::Bool );
}

return layer->selectedFeaturesIds().contains( feature.id() );
return layer->selectedFeatureIds().contains( feature.id() );
}

static QVariant fcnNumSelected( const QVariantList& values, const QgsExpressionContext* context, QgsExpression* parent )
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -627,7 +627,7 @@ QgsVectorLayer* QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlit

if ( onlySelected )
{
QgsFeatureIds selectedFids = layer->selectedFeaturesIds();
QgsFeatureIds selectedFids = layer->selectedFeatureIds();
if ( !selectedFids.isEmpty() )
req.setFilterFids( selectedFids );
}
Expand All @@ -636,7 +636,7 @@ QgsVectorLayer* QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlit

if ( req.filterType() == QgsFeatureRequest::FilterFids )
{
emit progressModeSet( QgsOfflineEditing::CopyFeatures, layer->selectedFeaturesIds().size() );
emit progressModeSet( QgsOfflineEditing::CopyFeatures, layer->selectedFeatureIds().size() );
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -2379,7 +2379,7 @@ QgsVectorFileWriter::writeAsVectorFormat( QgsVectorLayer* layer,
QgsFeatureRequest req;
if ( options.onlySelectedFeatures )
{
req.setFilterFids( layer->selectedFeaturesIds() );
req.setFilterFids( layer->selectedFeatureIds() );
}
QgsFeatureIterator fit = layer->getFeatures( req );
QgsFeature fet;
Expand Down Expand Up @@ -2455,7 +2455,7 @@ QgsVectorFileWriter::writeAsVectorFormat( QgsVectorLayer* layer,
}
req.setSubsetOfAttributes( attributes );
if ( options.onlySelectedFeatures )
req.setFilterFids( layer->selectedFeaturesIds() );
req.setFilterFids( layer->selectedFeatureIds() );
QgsFeatureIterator fit = layer->getFeatures( req );

//create symbol table if needed
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -325,7 +325,7 @@ void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLay

if ( behaviour == AddToSelection )
{
newSelection = selectedFeaturesIds();
newSelection = selectedFeatureIds();
}
QgsFeature feat;
while ( features.nextFeature( feat ) )
Expand All @@ -339,7 +339,7 @@ void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLay
QgsExpression exp( expression );
exp.prepare( &context );

QgsFeatureIds oldSelection = selectedFeaturesIds();
QgsFeatureIds oldSelection = selectedFeatureIds();
QgsFeatureRequest request = QgsFeatureRequest().setFilterFids( oldSelection );

//refine request
Expand Down Expand Up @@ -2466,7 +2466,7 @@ int QgsVectorLayer::selectedFeatureCount() const
return mSelectedFeatureIds.size();
}

const QgsFeatureIds& QgsVectorLayer::selectedFeaturesIds() const
const QgsFeatureIds& QgsVectorLayer::selectedFeatureIds() const
{
return mSelectedFeatureIds;
}
Expand Down

0 comments on commit 8a3c1ef

Please sign in to comment.