diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-16 16:14:39 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-16 16:44:09 +0200 |
commit | 9102b624ac6b83d4e4418fecefd491f67d4603f8 (patch) | |
tree | 31b52c008e1b69fa1465913451270d45868dc853 /DevTools/VisualBuilder | |
parent | 96f98b1fc92fec77d222c5b7b356b278c660429b (diff) | |
download | serenity-9102b624ac6b83d4e4418fecefd491f67d4603f8.zip |
LibGUI+DevTools+Applications: Use ModelIndex::data() in many places
This way you don't have to keep track of which model it came from.
Diffstat (limited to 'DevTools/VisualBuilder')
-rw-r--r-- | DevTools/VisualBuilder/VBPropertiesWindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/DevTools/VisualBuilder/VBPropertiesWindow.cpp b/DevTools/VisualBuilder/VBPropertiesWindow.cpp index 1d70bd0e15..3f3117e3c8 100644 --- a/DevTools/VisualBuilder/VBPropertiesWindow.cpp +++ b/DevTools/VisualBuilder/VBPropertiesWindow.cpp @@ -94,7 +94,7 @@ VBPropertiesWindow::VBPropertiesWindow() if (!m_table_view->model()) return nullptr; auto type_index = m_table_view->model()->index(index.row(), VBWidgetPropertyModel::Column::Type); - auto type = m_table_view->model()->data(type_index, GUI::ModelRole::Custom).to_i32(); + auto type = type_index.data(GUI::ModelRole::Custom).to_i32(); switch ((GUI::Variant::Type)type) { case GUI::Variant::Type::Bool: return make<BoolModelEditingDelegate>(); |