Skip to content
Permalink
Browse files

rename QgsFieldProxyModel::Filter All to AllTypes

  • Loading branch information
3nids committed Aug 23, 2016
1 parent bd887ba commit f5aa28bb3286897cebb0f8225ef61727351e0b31
@@ -526,6 +526,12 @@ None will need to be modified, as the method will return an empty geometry if th
<li>registerGetExpressionContextCallback has been removed in favor of registerExpressionContextGenerator</li>
</ul>

\subsection qgis_api_break_3_0_QgsFieldProxyModel QgsFieldProxyModel

<ul>
<li>In QgsFieldProxyModel::Filter, All has been renamed to AllTypes</li>
</ul>

\subsection qgis_api_break_3_0_QgsGeometry QgsGeometry

<ul>
@@ -22,7 +22,7 @@ class QgsFieldProxyModel : QSortFilterProxyModel
Date, /*!< Date or datetime fields */
Time, /*!< Time fields */
HideReadOnly, /*!< Hide read-only fields */
All, /*!< All field types */
AllTypes, /*!< All field types */
};
typedef QFlags<QgsFieldProxyModel::Filter> Filters;

@@ -275,7 +275,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
}

mUpdateExpressionText->registerExpressionContextGenerator( this );
mFieldCombo->setFilters( QgsFieldProxyModel::All | QgsFieldProxyModel::HideReadOnly );
mFieldCombo->setFilters( QgsFieldProxyModel::AllTypes | QgsFieldProxyModel::HideReadOnly );
mFieldCombo->setLayer( mLayer );

connect( mRunFieldCalc, SIGNAL( clicked() ), this, SLOT( updateFieldFromExpression() ) );
@@ -19,7 +19,7 @@

QgsFieldProxyModel::QgsFieldProxyModel( QObject *parent )
: QSortFilterProxyModel( parent )
, mFilters( All )
, mFilters( AllTypes )
, mModel( new QgsFieldModel( this ) )
{
setSourceModel( mModel );
@@ -65,7 +65,7 @@ bool QgsFieldProxyModel::filterAcceptsRow( int source_row, const QModelIndex &so
if ( mFilters.testFlag( HideReadOnly ) && isReadOnly( index ) )
return false;

if ( mFilters.testFlag( All ) )
if ( mFilters.testFlag( AllTypes ) )
return true;

QVariant typeVar = sourceModel()->data( index, QgsFieldModel::FieldTypeRole );
@@ -42,7 +42,7 @@ class GUI_EXPORT QgsFieldProxyModel : public QSortFilterProxyModel
Date = 16, /*!< Date or datetime fields */
Time = 32, /*!< Time fields */
HideReadOnly = 64, /*!< Hide read-only fields */
All = Numeric | Date | String | Time, /*!< All field types */ //TODO QGIS 3 - rename to AllTypes
AllTypes = Numeric | Date | String | Time, /*!< All field types */
};
Q_DECLARE_FLAGS( Filters, Filter )

0 comments on commit f5aa28b

Please sign in to comment.
You can’t perform that action at this time.