1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:37:34 +00:00

HackStudio: Keep the DeclarationsModel around, and use a filtering proxy

Rather than construct a new DeclarationsModel each time the user types
something in the Locator, keep a single one around permanently in the
ProjectDeclarations, and then use a FilteringProxyModel over it for the
suggestions.
This commit is contained in:
Sam Atkins 2024-01-25 14:19:15 +00:00 committed by Sam Atkins
parent e72b14ef1d
commit 85101c6626
6 changed files with 78 additions and 22 deletions

View file

@ -8,6 +8,7 @@
#pragma once
#include <AK/HashMap.h>
#include <LibGUI/FilteringProxyModel.h>
#include <LibGUI/Widget.h>
namespace HackStudio {
@ -29,6 +30,7 @@ private:
RefPtr<GUI::TextBox> m_textbox;
RefPtr<GUI::Window> m_popup_window;
RefPtr<GUI::TableView> m_suggestion_view;
RefPtr<GUI::FilteringProxyModel> m_model;
};
}