mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibGUI: Add 'on_rename_successful' callback to FileSystemModel
This commit is contained in:
parent
5565db5aa1
commit
05630d2d5d
Notes:
sideshowbarker
2024-07-18 05:37:06 +09:00
Author: https://github.com/mrkct
Commit: 05630d2d5d
Pull-request: https://github.com/SerenityOS/serenity/pull/10153
Reviewed-by: https://github.com/itamar8910 ✅
2 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue