1
Fork 0
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:
Andreas Kling 2019-03-06 19:56:47 +01:00
parent dc4e6dd7bc
commit 7df1121e1c
6 changed files with 12 additions and 12 deletions

View file

@ -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();
}