mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:48:11 +00:00
LibGUI: Make Model::data_matches() take Variant by const-reference
This commit is contained in:
parent
36354406db
commit
db694491f3
3 changed files with 3 additions and 3 deletions
|
@ -184,7 +184,7 @@ void ManualModel::update_section_node_on_toggle(const GUI::ModelIndex& index, co
|
|||
node->set_open(open);
|
||||
}
|
||||
|
||||
TriState ManualModel::data_matches(const GUI::ModelIndex& index, GUI::Variant term) const
|
||||
TriState ManualModel::data_matches(const GUI::ModelIndex& index, const GUI::Variant& term) const
|
||||
{
|
||||
auto view_result = page_view(page_path(index));
|
||||
if (view_result.is_error() || view_result.value().is_empty())
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
|
||||
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
|
||||
virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
|
||||
virtual TriState data_matches(const GUI::ModelIndex&, GUI::Variant) const override;
|
||||
virtual TriState data_matches(const GUI::ModelIndex&, const GUI::Variant&) const override;
|
||||
virtual void update() override;
|
||||
virtual GUI::ModelIndex parent_index(const GUI::ModelIndex&) const override;
|
||||
virtual GUI::ModelIndex index(int row, int column = 0, const GUI::ModelIndex& parent = GUI::ModelIndex()) const override;
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
virtual int column_count(const ModelIndex& = ModelIndex()) const = 0;
|
||||
virtual String column_name(int) const { return {}; }
|
||||
virtual Variant data(const ModelIndex&, ModelRole = ModelRole::Display) const = 0;
|
||||
virtual TriState data_matches(const ModelIndex&, Variant) const { return TriState::Unknown; }
|
||||
virtual TriState data_matches(const ModelIndex&, const Variant&) const { return TriState::Unknown; }
|
||||
virtual void update() = 0;
|
||||
virtual ModelIndex parent_index(const ModelIndex&) const { return {}; }
|
||||
virtual ModelIndex index(int row, int column = 0, const ModelIndex& parent = ModelIndex()) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue