1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +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

@ -142,7 +142,7 @@ Locator::~Locator()
void Locator::open_suggestion(const GUI::ModelIndex& index)
{
auto filename_index = m_suggestion_view->model()->index(index.row(), LocatorSuggestionModel::Column::Name);
auto filename = m_suggestion_view->model()->data(filename_index, GUI::ModelRole::Display).to_string();
auto filename = filename_index.data().to_string();
open_file(filename);
close();
}