| Wireshark 4.7.3 The Wireshark network protocol analyzer

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

Recent-capture-filter history backed by the global recent store. More...

`#include <capture_filter_history_model.h>`

Inheritance diagram for CaptureFilterHistoryModel:

## Public Slots
void | reload ()
| Reloads from the global recent store (e.g. on preferences change).

## Public Member Functions
| CaptureFilterHistoryModel (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-capture-filter history backed by the global recent store.

Reads recent_get_cfilter_list()/recent_add_cfilter() (the global recent store the capture filter dropdown reads), most-recent first. addRecent() commits an applied expression to that store and refreshes.

## Member Function Documentation

## ◆ addRecent()

void CaptureFilterHistoryModel::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/capture_filter_history_model.h
- /builds/wireshark/wireshark/ui/qt/models/capture_filter_history_model.cpp