mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +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:
parent
e72b14ef1d
commit
85101c6626
6 changed files with 78 additions and 22 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue