Repository: godotengine/godot
File: editor/file_system/dependency_editor.h (C/C++)

Code before:

	Tree *tree = nullptr;
	Button *fixdeps = nullptr;
	Label *warning_label = nullptr;
	LineEdit *filter = nullptr;
	MenuButton *menu_sort = nullptr;

	EditorFileDialog *search = nullptr;

	DependencyEditorSortBy sort_by = DependencyEditorSortBy::PATH;
	String replacing;
	String editing;
	List<String> missing;

	void _fix_and_find(EditorFileSystemDirectory *efsd, HashMap<String, HashMap<String, String>> &candidates);

	void _searched(const String &p_path);
	void _load_pressed(Object *p_item, int p_cell, int p_button, MouseButton p_mouse_button);
	void _filter_changed(const String &p_text);
	List<String> _filter_deps(const List<String> &p_deps);
	void _fix_all();
	void _update_list();

	void _update_menu_sort();
	MenuButton *_create_sort_menu_button();
	void _sort_popup(int p_id);
	void _update_file();

protected:
	void _notification(int p_what);

public:
	void edit(const String &p_path);
	static bool sort_by_type(const String &p_a, const String &p_b, bool p_reverse);
	static bool sort_by_path(const String &p_a, const String &p_b, bool p_reverse);
	static bool sort_by_file(const String &p_a, const String &p_b, bool p_reverse);
	DependencyEditor();
};

class DependencyEditorOwners : public AcceptDialog {
	GDCLASS(DependencyEditorOwners, AcceptDialog);

	ItemList *owners = nullptr;
	PopupMenu *file_options = nullptr;
	String editing;

	void _fill_owners(EditorFileSystemDirectory *efsd);

	void _list_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index);
	void _select_file(int p_idx);
	void _empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index);

Review comment (suggestion):
```suggestion
	void _sort_option_selected(int p_id);
```
More descriptive.

Code after:

	Tree *tree = nullptr;
	Button *fixdeps = nullptr;
	Label *warning_label = nullptr;
	LineEdit *filter = nullptr;
	MenuButton *menu_sort = nullptr;

	EditorFileDialog *search = nullptr;

	DependencyEditorSortBy sort_by = DependencyEditorSortBy::PATH;
	String replacing;
	String editing;
	List<String> missing;

	void _fix_and_find(EditorFileSystemDirectory *efsd, HashMap<String, HashMap<String, String>> &candidates);

	void _searched(const String &p_path);
	void _load_pressed(Object *p_item, int p_cell, int p_button, MouseButton p_mouse_button);
	List<String> _filter_deps(const List<String> &p_deps);
	void _fix_all();
	void _update_list();

	void _update_menu_sort();
	void _sort_option_selected(int p_id);
	void _update_file();

protected:
	void _notification(int p_what);

public:
	void edit(const String &p_path);
	DependencyEditor();
};

class DependencyEditorOwners : public AcceptDialog {
	GDCLASS(DependencyEditorOwners, AcceptDialog);

	Label *owners_count = nullptr;
	Label *empty = nullptr;
	MarginContainer *owners_mc = nullptr;
	ItemList *owners = nullptr;
	PopupMenu *file_options = nullptr;
	String editing;

	void _fill_owners(EditorFileSystemDirectory *efsd);

	void _list_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index);
	void _select_file(int p_idx);
	void _empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index);
	void _file_option(int p_option);