summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/LayoutTreeModel.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-16 16:00:07 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-16 16:44:09 +0200
commita1e381a0f87edb396d9c8be90f77fd4bd27024d4 (patch)
tree63c8f74e970cdcb091796fceed8064705c2e0098 /Libraries/LibWeb/LayoutTreeModel.cpp
parentf6d7204689a009ce804b56e9e921985d2e61fc19 (diff)
downloadserenity-a1e381a0f87edb396d9c8be90f77fd4bd27024d4.zip
LibGUI: Move GUI::Model::Role to GUI::ModelRole
This is preparation for using ModelRole in the ModelIndex API.
Diffstat (limited to 'Libraries/LibWeb/LayoutTreeModel.cpp')
-rw-r--r--Libraries/LibWeb/LayoutTreeModel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Libraries/LibWeb/LayoutTreeModel.cpp b/Libraries/LibWeb/LayoutTreeModel.cpp
index 43e19fa17e..3a681295f4 100644
--- a/Libraries/LibWeb/LayoutTreeModel.cpp
+++ b/Libraries/LibWeb/LayoutTreeModel.cpp
@@ -115,17 +115,17 @@ static String with_whitespace_collapsed(const StringView& string)
return builder.to_string();
}
-GUI::Variant LayoutTreeModel::data(const GUI::ModelIndex& index, Role role) const
+GUI::Variant LayoutTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
{
auto& node = *static_cast<LayoutNode*>(index.internal_data());
- if (role == Role::Icon) {
+ if (role == GUI::ModelRole::Icon) {
if (node.is_root())
return m_document_icon;
if (node.is_text())
return m_text_icon;
return m_element_icon;
}
- if (role == Role::Display) {
+ if (role == GUI::ModelRole::Display) {
if (node.is_text())
return String::format("LayoutText: %s", with_whitespace_collapsed(downcast<LayoutText>(node).text_for_rendering()).characters());
StringBuilder builder;