1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

LibGUI: Add 'on_rename_successful' callback to FileSystemModel

This commit is contained in:
Marco Cutecchia 2021-09-24 18:30:12 +02:00 committed by Andreas Kling
parent 5565db5aa1
commit 05630d2d5d
2 changed files with 5 additions and 0 deletions

View file

@ -746,7 +746,11 @@ void FileSystemModel::set_data(ModelIndex const& index, Variant const& data)
if (rc < 0) {
if (on_rename_error)
on_rename_error(errno, strerror(errno));
return;
}
if (on_rename_successful)
on_rename_successful(node.full_path(), new_full_path);
}
Vector<ModelIndex> FileSystemModel::matches(StringView const& searching, unsigned flags, ModelIndex const& index)