mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00: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:
		
							parent
							
								
									5cd2e0f3a2
								
							
						
					
					
						commit
						ca2c81251a
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-18 07:24:32 +09:00 
				
			
			Author: https://github.com/sin-ack
Commit: ca2c81251a
Pull-request: https://github.com/SerenityOS/serenity/pull/9242
			
					 100 changed files with 116 additions and 261 deletions
				
			
		|  | @ -152,11 +152,6 @@ GUI::Variant DOMTreeJSONModel::data(const GUI::ModelIndex& index, GUI::ModelRole | |||
|     return {}; | ||||
| } | ||||
| 
 | ||||
| void DOMTreeJSONModel::update() | ||||
| { | ||||
|     did_update(); | ||||
| } | ||||
| 
 | ||||
| void DOMTreeJSONModel::map_dom_nodes_to_parent(JsonObject const* parent, JsonObject const* node) | ||||
| { | ||||
|     m_dom_node_to_parent_map.set(node, parent); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 sin-ack
						sin-ack