mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-05 01:55:21 +03:00
LibGUI: Rename ModelSelection::remove_matching => remove_all_matching
Let's be consistent with how Vector, HashTable and HashMap names these.
This commit is contained in:
parent
c6bcd0dfe4
commit
2375e1bcda
Notes:
sideshowbarker
2024-07-17 21:35:07 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2375e1bcdac
@ -71,7 +71,7 @@ void AbstractView::model_did_update(unsigned int flags)
|
||||
m_cursor_index = {};
|
||||
if (!model()->is_within_range(m_drop_candidate_index))
|
||||
m_drop_candidate_index = {};
|
||||
selection().remove_matching([this](auto& index) { return !model()->is_within_range(index); });
|
||||
selection().remove_all_matching([this](auto& index) { return !model()->is_within_range(index); });
|
||||
|
||||
auto index = find_next_search_match(m_highlighted_search.view());
|
||||
if (index.is_valid())
|
||||
|
@ -423,7 +423,7 @@ void FileSystemModel::handle_file_event(Core::FileWatcherEvent const& event)
|
||||
end_delete_rows();
|
||||
|
||||
for_each_view([&](AbstractView& view) {
|
||||
view.selection().remove_matching([&](auto& selection_index) {
|
||||
view.selection().remove_all_matching([&](auto& selection_index) {
|
||||
return selection_index.internal_data() == index.internal_data();
|
||||
});
|
||||
if (view.cursor_index().internal_data() == index.internal_data()) {
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
namespace GUI {
|
||||
|
||||
void ModelSelection::remove_matching(Function<bool(const ModelIndex&)> filter)
|
||||
void ModelSelection::remove_all_matching(Function<bool(ModelIndex const&)> filter)
|
||||
{
|
||||
if (m_indices.remove_all_matching([&](ModelIndex const& index) { return filter(index); }))
|
||||
notify_selection_changed();
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
return *m_indices.begin();
|
||||
}
|
||||
|
||||
void remove_matching(Function<bool(const ModelIndex&)>);
|
||||
void remove_all_matching(Function<bool(ModelIndex const&)> filter);
|
||||
|
||||
template<typename Function>
|
||||
void change_from_model(Badge<SortingProxyModel>, Function f)
|
||||
|
Loading…
Reference in New Issue
Block a user