summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/AbstractView.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-29 22:23:52 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-29 22:23:52 +0200
commit3d4afe7614bf8ff4c6fe141d1dcd83688a7ac8cd (patch)
treeb27345e76b10d2cd7c4381a70385c21d6310405a /Userland/Libraries/LibGUI/AbstractView.cpp
parent7ae7170d6140f7cad730f05f84b53437058b82f4 (diff)
downloadserenity-3d4afe7614bf8ff4c6fe141d1dcd83688a7ac8cd.zip
Everywhere: "indexes" => "indices"
I've wasted a silly amount of time in the past fretting over which of these words to use. Let's just choose one and use it everywhere. :^)
Diffstat (limited to 'Userland/Libraries/LibGUI/AbstractView.cpp')
-rw-r--r--Userland/Libraries/LibGUI/AbstractView.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractView.cpp b/Userland/Libraries/LibGUI/AbstractView.cpp
index 17a9ea2616..43af9a15cc 100644
--- a/Userland/Libraries/LibGUI/AbstractView.cpp
+++ b/Userland/Libraries/LibGUI/AbstractView.cpp
@@ -43,13 +43,13 @@ void AbstractView::set_model(RefPtr<Model> model)
m_model = move(model);
if (m_model)
m_model->register_view({}, *this);
- model_did_update(GUI::Model::InvalidateAllIndexes);
+ model_did_update(GUI::Model::InvalidateAllIndices);
scroll_to_top();
}
void AbstractView::model_did_update(unsigned int flags)
{
- if (!model() || (flags & GUI::Model::InvalidateAllIndexes)) {
+ if (!model() || (flags & GUI::Model::InvalidateAllIndices)) {
stop_editing();
m_edit_index = {};
m_hovered_index = {};
@@ -630,9 +630,9 @@ void AbstractView::do_search(String&& searching)
return;
}
- auto found_indexes = model()->matches(searching, Model::MatchesFlag::FirstMatchOnly | Model::MatchesFlag::MatchAtStart | Model::MatchesFlag::CaseInsensitive, model()->parent_index(cursor_index()));
- if (!found_indexes.is_empty() && found_indexes[0].is_valid()) {
- auto& index = found_indexes[0];
+ auto found_indices = model()->matches(searching, Model::MatchesFlag::FirstMatchOnly | Model::MatchesFlag::MatchAtStart | Model::MatchesFlag::CaseInsensitive, model()->parent_index(cursor_index()));
+ if (!found_indices.is_empty() && found_indices[0].is_valid()) {
+ auto& index = found_indices[0];
m_highlighted_search_index = index;
m_searching = move(searching);
set_selection(index);