mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
Everywhere: Replace Model::update() with Model::invalidate()
Most of the models were just calling did_update anyway, which is pointless since it can be unified to the base Model class. Instead, code calling update() will now call invalidate(), which functions identically and is more obvious in what it does. Additionally, a default implementation is provided, which removes the need to add empty implementations of update() for each model subclass. Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 07:24:32 +09:00
Author: https://github.com/sin-ack Commit: https://github.com/SerenityOS/serenity/commit/ca2c81251a7 Pull-request: https://github.com/SerenityOS/serenity/pull/9242
@@ -122,5 +122,5 @@ void ProcessMemoryMapWidget::set_pid(pid_t pid)
|
||||
void ProcessMemoryMapWidget::refresh()
|
||||
{
|
||||
if (m_pid != -1)
|
||||
m_json_model->update();
|
||||
m_json_model->invalidate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user