mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:35: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:
parent
96f98b1fc9
commit
9102b624ac
18 changed files with 56 additions and 57 deletions
|
@ -438,7 +438,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
|||
view.selection().for_each_index([&](const GUI::ModelIndex& index) {
|
||||
auto parent_index = model.parent_index(index);
|
||||
auto name_index = model.index(index.row(), GUI::FileSystemModel::Column::Name, parent_index);
|
||||
auto path = model.data(name_index, GUI::ModelRole::Custom).to_string();
|
||||
auto path = name_index.data(GUI::ModelRole::Custom).to_string();
|
||||
paths.append(path);
|
||||
});
|
||||
return paths;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue