1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-13 21:12:08 +00:00

LibGUI+DevTools+Applications: Use ModelIndex::data() in many places

This way you don't have to keep track of which model it came from.
This commit is contained in:
Andreas Kling 2020-08-16 16:14:39 +02:00
parent 96f98b1fc9
commit 9102b624ac
18 changed files with 56 additions and 57 deletions

View file

@ -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>();