diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-16 16:00:07 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-16 16:44:09 +0200 |
commit | a1e381a0f87edb396d9c8be90f77fd4bd27024d4 (patch) | |
tree | 63c8f74e970cdcb091796fceed8064705c2e0098 /Demos/WidgetGallery | |
parent | f6d7204689a009ce804b56e9e921985d2e61fc19 (diff) | |
download | serenity-a1e381a0f87edb396d9c8be90f77fd4bd27024d4.zip |
LibGUI: Move GUI::Model::Role to GUI::ModelRole
This is preparation for using ModelRole in the ModelIndex API.
Diffstat (limited to 'Demos/WidgetGallery')
-rw-r--r-- | Demos/WidgetGallery/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Demos/WidgetGallery/main.cpp b/Demos/WidgetGallery/main.cpp index 9fad2e7679..8be4d74dd9 100644 --- a/Demos/WidgetGallery/main.cpp +++ b/Demos/WidgetGallery/main.cpp @@ -65,11 +65,11 @@ public: virtual ~ListViewModel() override { } virtual int row_count(const GUI::ModelIndex&) const override { return m_model_items.size(); } virtual int column_count(const GUI::ModelIndex&) const override { return 1; } - virtual GUI::Variant data(const GUI::ModelIndex& index, Role role = Role::Display) const override + virtual GUI::Variant data(const GUI::ModelIndex& index, GUI::ModelRole role) const override { ASSERT(index.is_valid()); ASSERT(index.column() == 0); - if (role == Role::Display) + if (role == GUI::ModelRole::Display) return m_model_items.at(index.row()); return {}; } |