diff --git a/editor/editor_tools.h b/editor/editor_tools.h index 6b38fcc8..3bc10fff 100644 --- a/editor/editor_tools.h +++ b/editor/editor_tools.h @@ -33,7 +33,7 @@ #include "editor/editor_node.h" #include "editor/editor_plugin.h" -#include "editor/gui/editor_file_dialog.h" +#include "editor/editor_file_dialog.h" class DocTools; class EditorFileDialog; diff --git a/javascript.cpp b/javascript.cpp index 9c1c0940..d9667349 100644 --- a/javascript.cpp +++ b/javascript.cpp @@ -269,19 +269,19 @@ Ref ResourceFormatLoaderJavaScript::load(const String &p_path, const S if (r_error) *r_error = err; ERR_FAIL_COND_V_MSG(err != OK, Ref(), "Cannot load script file '" + p_path + "'."); - Ref script; - script.instantiate(); - script->set_script_path(p_path); - script->bytecode = module->get_bytecode(); - script->set_source_code(module->get_source_code()); - err = script->reload(); + Ref s; + s.instantiate(); + s->set_script_path(p_path); + s->bytecode = module->get_bytecode(); + s->set_source_code(module->get_source_code()); + err = s->reload(); if (r_error) *r_error = err; ERR_FAIL_COND_V_MSG(err != OK, Ref(), "Parse source code from file '" + p_path + "' failed."); #ifdef TOOLS_ENABLED - JavaScriptLanguage::get_singleton()->get_scripts().insert(script); + JavaScriptLanguage::get_singleton()->get_scripts().insert(s); #endif - return script; + return s; } void ResourceFormatLoaderJavaScript::get_recognized_extensions(List *p_extensions) const { @@ -308,10 +308,10 @@ bool ResourceFormatLoaderJavaScript::recognize_path(const String &p_path, const } Error ResourceFormatSaverJavaScript::save(const Ref &p_resource, const String &p_path, uint32_t p_flags) { - Ref script = p_resource; - ERR_FAIL_COND_V(script.is_null(), ERR_INVALID_PARAMETER); + Ref resource = p_resource; + ERR_FAIL_COND_V(resource.is_null(), ERR_INVALID_PARAMETER); - String source = script->get_source_code(); + String source = resource->get_source_code(); Error err; Ref file = FileAccess::open(p_path, FileAccess::WRITE, &err); @@ -322,7 +322,7 @@ Error ResourceFormatSaverJavaScript::save(const Ref &p_resource, const } if (ScriptServer::is_reload_scripts_on_save_enabled()) { - script->reload(); + resource->reload(); } return OK; diff --git a/javascript_language.cpp b/javascript_language.cpp index 382f7740..0b92b1db 100644 --- a/javascript_language.cpp +++ b/javascript_language.cpp @@ -256,11 +256,11 @@ void JavaScriptLanguage::get_string_delimiters(List *p_delimiters) const } Ref