Skip to content

Commit

Permalink
Remove now-unused firstInGroup member
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Mar 26, 2024
1 parent facdcbb commit 2b40849
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions src/core/featurelistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ QVariant FeatureListModel::data( const QModelIndex &index, int role ) const

case GroupFieldRole:
return mEntries.value( index.row() ).group;

case FirstInGroupRole:
return mEntries.value( index.row() ).firstInGroup;
}

return QVariant();
Expand All @@ -109,7 +106,6 @@ QHash<int, QByteArray> FeatureListModel::roleNames() const
roles[KeyFieldRole] = "keyFieldValue";
roles[DisplayStringRole] = "displayString";
roles[GroupFieldRole] = "groupFieldValue";
roles[FirstInGroupRole] = "firstInGroup";

return roles;
}
Expand Down Expand Up @@ -424,19 +420,6 @@ void FeatureListModel::processFeatureList()
} );
}

if ( !mGroupField.isEmpty() )
{
QVariant currentGroupValue;
for ( Entry &entry : entries )
{
if ( entry.group != currentGroupValue )
{
entry.firstInGroup = true;
currentGroupValue = entry.group;
}
}
}

beginResetModel();
mEntries = entries;
endResetModel();
Expand Down
2 changes: 0 additions & 2 deletions src/core/featurelistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class FeatureListModel : public QAbstractItemModel
KeyFieldRole = Qt::UserRole + 1,
DisplayStringRole,
GroupFieldRole,
FirstInGroupRole,
};

Q_ENUM( FeatureListRoles )
Expand Down Expand Up @@ -239,7 +238,6 @@ class FeatureListModel : public QAbstractItemModel
QString displayString;
QVariant key;
QVariant group;
bool firstInGroup = false;
QgsFeatureId fid;
double fuzzyScore;
};
Expand Down

0 comments on commit 2b40849

Please sign in to comment.