summaryrefslogtreecommitdiff
path: root/editor/script_create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/script_create_dialog.cpp')
-rw-r--r--editor/script_create_dialog.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 2601382009..4cbc859e0c 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -205,12 +205,12 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
bool found = false;
bool match = false;
int index = 0;
- for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
- if (E->get().nocasecmp_to(extension) == 0) {
+ for (const String &E : extensions) {
+ if (E.nocasecmp_to(extension) == 0) {
//FIXME (?) - changing language this way doesn't update controls, needs rework
//language_menu->select(index); // change Language option by extension
found = true;
- if (E->get() == ScriptServer::get_language(language_menu->get_selected())->get_extension()) {
+ if (E == ScriptServer::get_language(language_menu->get_selected())->get_extension()) {
match = true;
}
break;
@@ -373,8 +373,8 @@ void ScriptCreateDialog::_lang_changed(int l) {
ScriptServer::get_language(m)->get_recognized_extensions(&extensions);
}
- for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
- if (E->get().nocasecmp_to(extension) == 0) {
+ for (const String &E : extensions) {
+ if (E.nocasecmp_to(extension) == 0) {
path = path.get_basename() + selected_ext;
_path_changed(path);
break;
@@ -534,8 +534,8 @@ void ScriptCreateDialog::_browse_path(bool browse_parent, bool p_save) {
int lang = language_menu->get_selected();
ScriptServer::get_language(lang)->get_recognized_extensions(&extensions);
- for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
- file_browse->add_filter("*." + E->get());
+ for (const String &E : extensions) {
+ file_browse->add_filter("*." + E);
}
file_browse->set_current_path(file_path->get_text());
@@ -604,7 +604,7 @@ void ScriptCreateDialog::_path_submitted(const String &p_path) {
}
void ScriptCreateDialog::_msg_script_valid(bool valid, const String &p_msg) {
- error_label->set_text("- " + p_msg);
+ error_label->set_text(String::utf8("• ") + p_msg);
if (valid) {
error_label->add_theme_color_override("font_color", get_theme_color(SNAME("success_color"), SNAME("Editor")));
} else {
@@ -613,7 +613,7 @@ void ScriptCreateDialog::_msg_script_valid(bool valid, const String &p_msg) {
}
void ScriptCreateDialog::_msg_path_valid(bool valid, const String &p_msg) {
- path_error_label->set_text("- " + p_msg);
+ path_error_label->set_text(String::utf8("• ") + p_msg);
if (valid) {
path_error_label->add_theme_color_override("font_color", get_theme_color(SNAME("success_color"), SNAME("Editor")));
} else {