From 2b408493b550cef11c3fba0d316d8354acefaa6f Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Tue, 26 Mar 2024 08:44:19 +0700 Subject: [PATCH] Remove now-unused firstInGroup member --- src/core/featurelistmodel.cpp | 17 ----------------- src/core/featurelistmodel.h | 2 -- 2 files changed, 19 deletions(-) diff --git a/src/core/featurelistmodel.cpp b/src/core/featurelistmodel.cpp index 77b497828f..963cb6cbd5 100644 --- a/src/core/featurelistmodel.cpp +++ b/src/core/featurelistmodel.cpp @@ -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(); @@ -109,7 +106,6 @@ QHash FeatureListModel::roleNames() const roles[KeyFieldRole] = "keyFieldValue"; roles[DisplayStringRole] = "displayString"; roles[GroupFieldRole] = "groupFieldValue"; - roles[FirstInGroupRole] = "firstInGroup"; return roles; } @@ -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(); diff --git a/src/core/featurelistmodel.h b/src/core/featurelistmodel.h index b6c349ea71..58b8bfcda6 100644 --- a/src/core/featurelistmodel.h +++ b/src/core/featurelistmodel.h @@ -94,7 +94,6 @@ class FeatureListModel : public QAbstractItemModel KeyFieldRole = Qt::UserRole + 1, DisplayStringRole, GroupFieldRole, - FirstInGroupRole, }; Q_ENUM( FeatureListRoles ) @@ -239,7 +238,6 @@ class FeatureListModel : public QAbstractItemModel QString displayString; QVariant key; QVariant group; - bool firstInGroup = false; QgsFeatureId fid; double fuzzyScore; };