From a1e381a0f87edb396d9c8be90f77fd4bd27024d4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 16 Aug 2020 16:00:07 +0200 Subject: LibGUI: Move GUI::Model::Role to GUI::ModelRole This is preparation for using ModelRole in the ModelIndex API. --- Demos/WidgetGallery/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Demos/WidgetGallery') 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 {}; } -- cgit v1.2.3