Rename String plus_file to path_join
This commit is contained in:
parent
051f24b067
commit
10a56981dc
100 changed files with 519 additions and 519 deletions
|
|
@ -487,7 +487,7 @@ void EditorAssetLibraryItemDownload::_make_request() {
|
|||
retry_button->hide();
|
||||
|
||||
download->cancel_request();
|
||||
download->set_download_file(EditorPaths::get_singleton()->get_cache_dir().plus_file("tmp_asset_" + itos(asset_id)) + ".zip");
|
||||
download->set_download_file(EditorPaths::get_singleton()->get_cache_dir().path_join("tmp_asset_" + itos(asset_id)) + ".zip");
|
||||
|
||||
Error err = download->request(host);
|
||||
if (err != OK) {
|
||||
|
|
@ -730,7 +730,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PackedB
|
|||
PackedByteArray image_data = p_data;
|
||||
|
||||
if (use_cache) {
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().plus_file("assetimage_" + image_queue[p_queue_id].image_url.md5_text());
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().path_join("assetimage_" + image_queue[p_queue_id].image_url.md5_text());
|
||||
|
||||
Ref<FileAccess> file = FileAccess::open(cache_filename_base + ".data", FileAccess::READ);
|
||||
if (file.is_valid()) {
|
||||
|
|
@ -804,7 +804,7 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons
|
|||
if (p_code != HTTPClient::RESPONSE_NOT_MODIFIED) {
|
||||
for (int i = 0; i < headers.size(); i++) {
|
||||
if (headers[i].findn("ETag:") == 0) { // Save etag
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().plus_file("assetimage_" + image_queue[p_queue_id].image_url.md5_text());
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().path_join("assetimage_" + image_queue[p_queue_id].image_url.md5_text());
|
||||
String new_etag = headers[i].substr(headers[i].find(":") + 1, headers[i].length()).strip_edges();
|
||||
Ref<FileAccess> file = FileAccess::open(cache_filename_base + ".etag", FileAccess::WRITE);
|
||||
if (file.is_valid()) {
|
||||
|
|
@ -846,7 +846,7 @@ void EditorAssetLibrary::_update_image_queue() {
|
|||
List<int> to_delete;
|
||||
for (KeyValue<int, ImageQueue> &E : image_queue) {
|
||||
if (!E.value.active && current_images < max_images) {
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().plus_file("assetimage_" + E.value.image_url.md5_text());
|
||||
String cache_filename_base = EditorPaths::get_singleton()->get_cache_dir().path_join("assetimage_" + E.value.image_url.md5_text());
|
||||
Vector<String> headers;
|
||||
|
||||
if (FileAccess::exists(cache_filename_base + ".etag") && FileAccess::exists(cache_filename_base + ".data")) {
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ Ref<Texture2D> EditorPackedScenePreviewPlugin::generate(const Ref<Resource> &p_f
|
|||
Ref<Texture2D> EditorPackedScenePreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const {
|
||||
String temp_path = EditorPaths::get_singleton()->get_cache_dir();
|
||||
String cache_base = ProjectSettings::get_singleton()->globalize_path(p_path).md5_text();
|
||||
cache_base = temp_path.plus_file("resthumb-" + cache_base);
|
||||
cache_base = temp_path.path_join("resthumb-" + cache_base);
|
||||
|
||||
//does not have it, try to load a cached thumbnail
|
||||
|
||||
|
|
|
|||
|
|
@ -1540,7 +1540,7 @@ void ScriptEditor::_show_save_theme_as_dialog() {
|
|||
file_dialog_option = THEME_SAVE_AS;
|
||||
file_dialog->clear_filters();
|
||||
file_dialog->add_filter("*.tet");
|
||||
file_dialog->set_current_path(EditorPaths::get_singleton()->get_text_editor_themes_dir().plus_file(EditorSettings::get_singleton()->get("text_editor/theme/color_theme")));
|
||||
file_dialog->set_current_path(EditorPaths::get_singleton()->get_text_editor_themes_dir().path_join(EditorSettings::get_singleton()->get("text_editor/theme/color_theme")));
|
||||
file_dialog->popup_file_dialog();
|
||||
file_dialog->set_title(TTR("Save Theme As..."));
|
||||
}
|
||||
|
|
@ -2038,7 +2038,7 @@ void ScriptEditor::_update_script_names() {
|
|||
} break;
|
||||
case DISPLAY_DIR_AND_NAME: {
|
||||
if (!path.get_base_dir().get_file().is_empty()) {
|
||||
sd.name = path.get_base_dir().get_file().plus_file(name);
|
||||
sd.name = path.get_base_dir().get_file().path_join(name);
|
||||
} else {
|
||||
sd.name = name;
|
||||
}
|
||||
|
|
@ -2064,7 +2064,7 @@ void ScriptEditor::_update_script_names() {
|
|||
name = name.get_file();
|
||||
} break;
|
||||
case DISPLAY_DIR_AND_NAME: {
|
||||
name = name.get_base_dir().get_file().plus_file(name.get_file());
|
||||
name = name.get_base_dir().get_file().path_join(name.get_file());
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -3267,7 +3267,7 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
|
|||
p_layout->set_value("ScriptEditor", "list_split_offset", list_split->get_split_offset());
|
||||
|
||||
// Save the cache.
|
||||
script_editor_cache->save(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("script_editor_cache.cfg"));
|
||||
script_editor_cache->save(EditorPaths::get_singleton()->get_project_settings_dir().path_join("script_editor_cache.cfg"));
|
||||
}
|
||||
|
||||
void ScriptEditor::_help_class_open(const String &p_class) {
|
||||
|
|
@ -3648,7 +3648,7 @@ ScriptEditor::ScriptEditor() {
|
|||
current_theme = "";
|
||||
|
||||
script_editor_cache.instantiate();
|
||||
script_editor_cache->load(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("script_editor_cache.cfg"));
|
||||
script_editor_cache->load(EditorPaths::get_singleton()->get_project_settings_dir().path_join("script_editor_cache.cfg"));
|
||||
|
||||
completion_cache = memnew(EditorScriptCodeCompletionCache);
|
||||
restoring_layout = false;
|
||||
|
|
|
|||
|
|
@ -942,7 +942,7 @@ void ScriptTextEditor::_validate_symbol(const String &p_symbol) {
|
|||
|
||||
String ScriptTextEditor::_get_absolute_path(const String &rel_path) {
|
||||
String base_path = script->get_path().get_base_dir();
|
||||
String path = base_path.plus_file(rel_path);
|
||||
String path = base_path.path_join(rel_path);
|
||||
return path.replace("///", "//").simplify_path();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1398,12 +1398,12 @@ void ShaderEditorPlugin::_menu_item_pressed(int p_index) {
|
|||
switch (p_index) {
|
||||
case FILE_NEW: {
|
||||
String base_path = FileSystemDock::get_singleton()->get_current_path().get_base_dir();
|
||||
shader_create_dialog->config(base_path.plus_file("new_shader"), false, false, 0);
|
||||
shader_create_dialog->config(base_path.path_join("new_shader"), false, false, 0);
|
||||
shader_create_dialog->popup_centered();
|
||||
} break;
|
||||
case FILE_NEW_INCLUDE: {
|
||||
String base_path = FileSystemDock::get_singleton()->get_current_path().get_base_dir();
|
||||
shader_create_dialog->config(base_path.plus_file("new_shader"), false, false, 2);
|
||||
shader_create_dialog->config(base_path.path_join("new_shader"), false, false, 2);
|
||||
shader_create_dialog->popup_centered();
|
||||
} break;
|
||||
case FILE_OPEN: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue