mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 10:23:28 +00:00
Add const lvalue ref to editor/* container parameters
This commit is contained in:
parent
bb6b06c813
commit
1638c1b28f
119 changed files with 397 additions and 397 deletions
|
|
@ -696,7 +696,7 @@ void ScriptEditor::_go_to_tab(int p_idx) {
|
|||
_update_help_overview_visibility();
|
||||
}
|
||||
|
||||
void ScriptEditor::_add_recent_script(String p_path) {
|
||||
void ScriptEditor::_add_recent_script(const String &p_path) {
|
||||
if (p_path.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -790,7 +790,7 @@ void ScriptEditor::_open_recent_script(int p_idx) {
|
|||
_show_error_dialog(path);
|
||||
}
|
||||
|
||||
void ScriptEditor::_show_error_dialog(String p_path) {
|
||||
void ScriptEditor::_show_error_dialog(const String &p_path) {
|
||||
error_dialog->set_text(vformat(TTR("Can't open '%s'. The file could have been moved or deleted."), p_path));
|
||||
error_dialog->popup_centered();
|
||||
}
|
||||
|
|
@ -1109,7 +1109,7 @@ bool ScriptEditor::_test_script_times_on_disk(Ref<Resource> p_for_script) {
|
|||
return need_reload;
|
||||
}
|
||||
|
||||
void ScriptEditor::_file_dialog_action(String p_file) {
|
||||
void ScriptEditor::_file_dialog_action(const String &p_file) {
|
||||
switch (file_dialog_option) {
|
||||
case FILE_NEW_TEXTFILE: {
|
||||
Error err;
|
||||
|
|
@ -3628,7 +3628,7 @@ void ScriptEditor::set_live_auto_reload_running_scripts(bool p_enabled) {
|
|||
auto_reload_running_scripts = p_enabled;
|
||||
}
|
||||
|
||||
void ScriptEditor::_help_search(String p_text) {
|
||||
void ScriptEditor::_help_search(const String &p_text) {
|
||||
help_search_dialog->popup_dialog(p_text);
|
||||
}
|
||||
|
||||
|
|
@ -3679,20 +3679,20 @@ void ScriptEditor::_script_changed() {
|
|||
NodeDock::get_singleton()->update_lists();
|
||||
}
|
||||
|
||||
void ScriptEditor::_on_find_in_files_requested(String text) {
|
||||
void ScriptEditor::_on_find_in_files_requested(const String &text) {
|
||||
find_in_files_dialog->set_find_in_files_mode(FindInFilesDialog::SEARCH_MODE);
|
||||
find_in_files_dialog->set_search_text(text);
|
||||
find_in_files_dialog->popup_centered();
|
||||
}
|
||||
|
||||
void ScriptEditor::_on_replace_in_files_requested(String text) {
|
||||
void ScriptEditor::_on_replace_in_files_requested(const String &text) {
|
||||
find_in_files_dialog->set_find_in_files_mode(FindInFilesDialog::REPLACE_MODE);
|
||||
find_in_files_dialog->set_search_text(text);
|
||||
find_in_files_dialog->set_replace_text("");
|
||||
find_in_files_dialog->popup_centered();
|
||||
}
|
||||
|
||||
void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_number, int begin, int end) {
|
||||
void ScriptEditor::_on_find_in_files_result_selected(const String &fpath, int line_number, int begin, int end) {
|
||||
if (ResourceLoader::exists(fpath)) {
|
||||
Ref<Resource> res = ResourceLoader::load(fpath);
|
||||
|
||||
|
|
@ -3814,7 +3814,7 @@ void ScriptEditor::_start_find_in_files(bool with_replace) {
|
|||
EditorNode::get_bottom_panel()->make_item_visible(find_in_files);
|
||||
}
|
||||
|
||||
void ScriptEditor::_on_find_in_files_modified_files(PackedStringArray paths) {
|
||||
void ScriptEditor::_on_find_in_files_modified_files(const PackedStringArray &paths) {
|
||||
_test_script_times_on_disk();
|
||||
_update_modified_scripts_for_external_editor();
|
||||
}
|
||||
|
|
@ -4217,7 +4217,7 @@ void ScriptEditorPlugin::_focus_another_editor() {
|
|||
}
|
||||
}
|
||||
|
||||
void ScriptEditorPlugin::_save_last_editor(String p_editor) {
|
||||
void ScriptEditorPlugin::_save_last_editor(const String &p_editor) {
|
||||
if (p_editor != get_name()) {
|
||||
last_editor = p_editor;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue