Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Apr 3, 2020
1 parent e7621be commit 16655d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion python/core/auto_generated/qgsfieldmodel.sip.in
Expand Up @@ -14,7 +14,8 @@
class QgsFieldModel : QAbstractItemModel
{
%Docstring
The QgsFieldModel class is a model to display the list of fields of a layer in widgets.
The QgsFieldModel class is a model to display the list of fields in widgets
(optionally associated with a vector layer).
If allowed, expressions might be added to the end of the model.
It can be associated with a QgsMapLayerModel to dynamically display a layer and its fields.

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsfieldmodel.cpp
Expand Up @@ -284,7 +284,7 @@ QVariant QgsFieldModel::data( const QModelIndex &index, int role ) const
{
if ( isEmpty || exprIdx >= 0 )
{
return "";
return QString();
}
QgsField field = mFields.at( index.row() - fieldOffset );
return field.name();
Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsfieldmodel.h
Expand Up @@ -29,7 +29,8 @@ class QgsVectorLayer;

/**
* \ingroup core
* \brief The QgsFieldModel class is a model to display the list of fields of a layer in widgets.
* \brief The QgsFieldModel class is a model to display the list of fields in widgets
* (optionally associated with a vector layer).
* If allowed, expressions might be added to the end of the model.
* It can be associated with a QgsMapLayerModel to dynamically display a layer and its fields.
* \since QGIS 2.3
Expand Down

0 comments on commit 16655d7

Please sign in to comment.