mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
LibGUI: GTableModel::data() should take a GModelIndex instead of int,int.
This commit is contained in:
parent
dc4e6dd7bc
commit
7df1121e1c
6 changed files with 12 additions and 12 deletions
|
@ -45,11 +45,11 @@ public:
|
|||
virtual String row_name(int) const { return { }; }
|
||||
virtual String column_name(int) const { return { }; }
|
||||
virtual ColumnMetadata column_metadata(int) const { return { }; }
|
||||
virtual GVariant data(int row, int column) const = 0;
|
||||
virtual GVariant data(const GModelIndex&) const = 0;
|
||||
virtual void update() = 0;
|
||||
virtual void activate(const GModelIndex&) { }
|
||||
|
||||
bool is_valid(GModelIndex index) const
|
||||
bool is_valid(const GModelIndex& index) const
|
||||
{
|
||||
return index.row() >= 0 && index.row() < row_count() && index.column() >= 0 && index.column() < column_count();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue