mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 16:37:47 +00:00
Userland: Port Model::column_name()
to String
This commit is contained in:
parent
741f07dedf
commit
945f05ed76
70 changed files with 218 additions and 222 deletions
|
@ -34,21 +34,21 @@ int CookiesModel::row_count(GUI::ModelIndex const& index) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
DeprecatedString CookiesModel::column_name(int column) const
|
||||
String CookiesModel::column_name(int column) const
|
||||
{
|
||||
switch (column) {
|
||||
case Column::Domain:
|
||||
return "Domain";
|
||||
return "Domain"_short_string;
|
||||
case Column::Path:
|
||||
return "Path";
|
||||
return "Path"_short_string;
|
||||
case Column::Name:
|
||||
return "Name";
|
||||
return "Name"_short_string;
|
||||
case Column::Value:
|
||||
return "Value";
|
||||
return "Value"_short_string;
|
||||
case Column::ExpiryTime:
|
||||
return "Expiry time";
|
||||
return "Expiry time"_string.release_value_but_fixme_should_propagate_errors();
|
||||
case Column::SameSite:
|
||||
return "SameSite";
|
||||
return "SameSite"_string.release_value_but_fixme_should_propagate_errors();
|
||||
case Column::__Count:
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
void clear_items();
|
||||
virtual int row_count(GUI::ModelIndex const&) const override;
|
||||
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
|
||||
virtual DeprecatedString column_name(int column) const override;
|
||||
virtual String column_name(int column) const override;
|
||||
virtual GUI::ModelIndex index(int row, int column = 0, GUI::ModelIndex const& = GUI::ModelIndex()) const override;
|
||||
virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role = GUI::ModelRole::Display) const override;
|
||||
virtual TriState data_matches(GUI::ModelIndex const& index, GUI::Variant const& term) const override;
|
||||
|
|
|
@ -34,13 +34,13 @@ int HistoryModel::row_count(GUI::ModelIndex const& index) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
DeprecatedString HistoryModel::column_name(int column) const
|
||||
String HistoryModel::column_name(int column) const
|
||||
{
|
||||
switch (column) {
|
||||
case Column::Title:
|
||||
return "Title";
|
||||
return "Title"_short_string;
|
||||
case Column::URL:
|
||||
return "URL";
|
||||
return "URL"_short_string;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
void clear_items();
|
||||
virtual int row_count(GUI::ModelIndex const&) const override;
|
||||
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
|
||||
virtual DeprecatedString column_name(int column) const override;
|
||||
virtual String column_name(int column) const override;
|
||||
virtual GUI::ModelIndex index(int row, int column = 0, GUI::ModelIndex const& = GUI::ModelIndex()) const override;
|
||||
virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role = GUI::ModelRole::Display) const override;
|
||||
virtual TriState data_matches(GUI::ModelIndex const& index, GUI::Variant const& term) const override;
|
||||
|
|
|
@ -35,13 +35,13 @@ int StorageModel::row_count(GUI::ModelIndex const& index) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
DeprecatedString StorageModel::column_name(int column) const
|
||||
String StorageModel::column_name(int column) const
|
||||
{
|
||||
switch (column) {
|
||||
case Column::Key:
|
||||
return "Key";
|
||||
return "Key"_short_string;
|
||||
case Column::Value:
|
||||
return "Value";
|
||||
return "Value"_short_string;
|
||||
case Column::__Count:
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
void clear_items();
|
||||
virtual int row_count(GUI::ModelIndex const&) const override;
|
||||
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
|
||||
virtual DeprecatedString column_name(int column) const override;
|
||||
virtual String column_name(int column) const override;
|
||||
virtual GUI::ModelIndex index(int row, int column = 0, GUI::ModelIndex const& = GUI::ModelIndex()) const override;
|
||||
virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role = GUI::ModelRole::Display) const override;
|
||||
virtual TriState data_matches(GUI::ModelIndex const& index, GUI::Variant const& term) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue