mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
HackStudio: Move bulk of GUI logic into HackStudioWidget
Previously, the GUI logic of HackStudio was all stuffed into main(), and it started getting a bit out of hand :)
This commit is contained in:
@@ -95,7 +95,7 @@ public:
|
||||
return {};
|
||||
}
|
||||
|
||||
virtual void update() override { }
|
||||
virtual void update() override {}
|
||||
virtual GUI::ModelIndex index(int row, int column = 0, const GUI::ModelIndex& = GUI::ModelIndex()) const override { return create_index(row, column, &m_matches.at(row)); }
|
||||
|
||||
private:
|
||||
@@ -105,7 +105,7 @@ private:
|
||||
static RefPtr<SearchResultsModel> find_in_files(const StringView& text)
|
||||
{
|
||||
Vector<Match> matches;
|
||||
g_project->for_each_text_file([&](auto& file) {
|
||||
project().for_each_text_file([&](auto& file) {
|
||||
auto matches_in_file = file.document().find_all(text);
|
||||
for (auto& range : matches_in_file) {
|
||||
auto whole_line_range = file.document().range_for_entire_line(range.start().line());
|
||||
|
||||
Reference in New Issue
Block a user