| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Slots | Public Member Functions | List of all members
DisplayFilterHistoryModel Class Reference

Recent-display-filter history. More...

`#include <display_filter_history_model.h>`

Inheritance diagram for DisplayFilterHistoryModel:

## Public Slots
void | reload ()
| Re-reads the shared store (e.g. on preferences change).

## Public Member Functions
| DisplayFilterHistoryModel (QObject *parent=nullptr)
int | rowCount (const QModelIndex &parent=QModelIndex()) const override
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override
void | addRecent (const QString &expression) override
| Commits `expression` to the recent list.
Public Member Functions inherited from FilterHistoryModel
| FilterHistoryModel (QObject *parent=nullptr)

## Detailed Description

Recent-display-filter history.

Unlike the capture side, there is no recent_*_dfilter GList in the C core: the recent display-filter list was owned by the old DisplayFilterCombo. This model now owns that process-global store. It is populated at startup by the C entry point dfilter_recent_add() (called from recent.c as the recent file is read) and persisted by dfilter_recent_write_all(); both live in the .cpp so deleting the combo does not break recent-file load/save.

Entries are most-recent first (row 0). addRecent() deduplicates, moves to the front, and bounds the list to gui_recent_df_entries_max.

## Member Function Documentation

## ◆ addRecent()

void DisplayFilterHistoryModel::addRecent | ( | const QString & | expression | ) |
| override virtual

Commits `expression` to the recent list.

Implementations deduplicate, move the entry to the front, and bound the list length.

Implements FilterHistoryModel.

The documentation for this class was generated from the following files:

- /builds/wireshark/wireshark/ui/qt/models/display_filter_history_model.h
- /builds/wireshark/wireshark/ui/qt/models/display_filter_history_model.cpp