mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
LibGUI: Rename ModelClient::on_model_update() => model_did_update()
This follows the typical client callback naming scheme used elsewhere and doesn't collide with the "on_foo" Function hook convention.
This commit is contained in:
parent
4088beb8eb
commit
686ee2bf04
10 changed files with 30 additions and 17 deletions
|
@ -108,7 +108,7 @@ void BookmarksBarWidget::resize_event(GUI::ResizeEvent& event)
|
|||
update_content_size();
|
||||
}
|
||||
|
||||
void BookmarksBarWidget::on_model_update(unsigned)
|
||||
void BookmarksBarWidget::model_did_update(unsigned)
|
||||
{
|
||||
for (auto* child : child_widgets()) {
|
||||
child->remove_from_parent();
|
||||
|
|
|
@ -32,9 +32,11 @@
|
|||
|
||||
namespace Browser {
|
||||
|
||||
class BookmarksBarWidget final : public GUI::Widget
|
||||
class BookmarksBarWidget final
|
||||
: public GUI::Widget
|
||||
, private GUI::ModelClient {
|
||||
C_OBJECT(BookmarksBarWidget)
|
||||
C_OBJECT(BookmarksBarWidget);
|
||||
|
||||
public:
|
||||
static BookmarksBarWidget& the();
|
||||
|
||||
|
@ -54,7 +56,10 @@ public:
|
|||
private:
|
||||
BookmarksBarWidget(const String&, bool enabled);
|
||||
|
||||
virtual void on_model_update(unsigned) override;
|
||||
// ^GUI::ModelClient
|
||||
virtual void model_did_update(unsigned) override;
|
||||
|
||||
// ^GUI::Widget
|
||||
virtual void resize_event(GUI::ResizeEvent&) override;
|
||||
|
||||
void update_content_size();
|
||||
|
|
|
@ -219,7 +219,7 @@ DirectoryView::~DirectoryView()
|
|||
m_model->unregister_client(*this);
|
||||
}
|
||||
|
||||
void DirectoryView::on_model_update(unsigned flags)
|
||||
void DirectoryView::model_did_update(unsigned flags)
|
||||
{
|
||||
if (flags & GUI::Model::UpdateFlag::InvalidateAllIndexes) {
|
||||
for_each_view_implementation([](auto& view) {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <LibGUI/TableView.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
class LauncherHandler: public RefCounted<LauncherHandler> {
|
||||
class LauncherHandler : public RefCounted<LauncherHandler> {
|
||||
public:
|
||||
LauncherHandler(const NonnullRefPtr<Desktop::Launcher::Details>& details)
|
||||
: m_details(details)
|
||||
|
@ -51,9 +51,11 @@ private:
|
|||
NonnullRefPtr<Desktop::Launcher::Details> m_details;
|
||||
};
|
||||
|
||||
class DirectoryView final : public GUI::StackWidget
|
||||
class DirectoryView final
|
||||
: public GUI::StackWidget
|
||||
, private GUI::ModelClient {
|
||||
C_OBJECT(DirectoryView)
|
||||
C_OBJECT(DirectoryView);
|
||||
|
||||
public:
|
||||
virtual ~DirectoryView() override;
|
||||
|
||||
|
@ -118,7 +120,8 @@ private:
|
|||
DirectoryView();
|
||||
const GUI::FileSystemModel& model() const { return *m_model; }
|
||||
|
||||
virtual void on_model_update(unsigned) override;
|
||||
// ^GUI::ModelClient
|
||||
virtual void model_did_update(unsigned) override;
|
||||
|
||||
void handle_activation(const GUI::ModelIndex&);
|
||||
GUI::ModelIndex map_table_view_index(const GUI::ModelIndex&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue