File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
python/core/auto_generated/locator Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ which may occur if the model is being updated quickly multiple times as a result
67
67
68
68
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
69
69
70
+ virtual QHash<int, QByteArray> roleNames() const;
71
+
70
72
71
73
public slots:
72
74
Original file line number Diff line number Diff line change @@ -179,6 +179,19 @@ Qt::ItemFlags QgsLocatorModel::flags( const QModelIndex &index ) const
179
179
return flags;
180
180
}
181
181
182
+ QHash<int , QByteArray> QgsLocatorModel::roleNames () const
183
+ {
184
+ QHash<int , QByteArray> roles;
185
+ roles[ResultDataRole] = " ResultData" ;
186
+ roles[ResultTypeRole] = " ResultType" ;
187
+ roles[ResultFilterPriorityRole] = " ResultFilterPriority" ;
188
+ roles[ResultScoreRole] = " ResultScore" ;
189
+ roles[ResultFilterNameRole] = " ResultFilterName" ;
190
+ roles[ResultFilterGroupSortingRole] = " ResultFilterGroupSorting" ;
191
+ roles[Qt::DisplayRole] = " Text" ;
192
+ return roles;
193
+ }
194
+
182
195
void QgsLocatorModel::addResult ( const QgsLocatorResult &result )
183
196
{
184
197
mDeferredClearTimer .stop ();
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ class CORE_EXPORT QgsLocatorModel : public QAbstractTableModel
81
81
int columnCount ( const QModelIndex &parent = QModelIndex() ) const override ;
82
82
QVariant data ( const QModelIndex &index, int role = Qt::DisplayRole ) const override ;
83
83
Qt::ItemFlags flags ( const QModelIndex &index ) const override ;
84
+ QHash<int , QByteArray> roleNames () const override ;
84
85
85
86
public slots:
86
87
You can’t perform that action at this time.
0 commit comments