1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:25:08 +00:00

LibGUI: Replace ColumnMetadata::sortable => Model::is_column_sortable()

Now there's only one thing left in ColumnMetadata: the initial width.
This commit is contained in:
Andreas Kling 2020-05-21 19:45:15 +02:00
parent 2e03bded43
commit c666c251c8
6 changed files with 12 additions and 9 deletions

View file

@ -48,11 +48,6 @@ class Model : public RefCounted<Model> {
public:
struct ColumnMetadata {
int preferred_width { 0 };
enum class Sortable {
False,
True,
};
Sortable sortable { Sortable::True };
};
enum UpdateFlag {
@ -89,6 +84,8 @@ public:
virtual int tree_column() const { return 0; }
virtual bool accepts_drag(const ModelIndex&, const StringView& data_type);
virtual bool is_column_sortable([[maybe_unused]] int column_index) const { return true; }
bool is_valid(const ModelIndex& index) const
{
auto parent_index = this->parent_index(index);