summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/connections_dialog.cpp2
-rw-r--r--editor/editor_help.cpp16
-rw-r--r--editor/editor_run.cpp4
-rw-r--r--editor/find_in_files.cpp4
-rw-r--r--editor/input_map_editor.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/editor_preview_plugins.cpp4
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp2
8 files changed, 18 insertions, 18 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index d3dff3f375..20d29d47f4 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -714,7 +714,7 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
const String &signalname = signal;
String midname = selectedNode->get_name();
for (int i = 0; i < midname.length(); i++) { //TODO: Regex filter may be cleaner.
- CharType c = midname[i];
+ char32_t c = midname[i];
if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_')) {
if (c == ' ') {
// Replace spaces with underlines.
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index bce34db740..30aebd2b1f 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -244,7 +244,7 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview
class_desc->push_cell();
class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
} else {
- static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
class_desc->add_text(String(prefix));
}
@@ -761,7 +761,7 @@ void EditorHelp::_update_doc() {
signal_line[cd.signals[i].name] = class_desc->get_line_count() - 2; //gets overridden if description
class_desc->push_font(doc_code_font); // monofont
class_desc->push_color(headline_color);
- static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
class_desc->add_text(String(prefix));
_add_text(cd.signals[i].name);
class_desc->pop();
@@ -876,7 +876,7 @@ void EditorHelp::_update_doc() {
class_desc->push_font(doc_code_font);
class_desc->push_color(headline_color);
- static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
class_desc->add_text(String(prefix));
_add_text(enum_list[i].name);
class_desc->pop();
@@ -890,7 +890,7 @@ void EditorHelp::_update_doc() {
if (enum_list[i].description != "") {
class_desc->push_font(doc_font);
class_desc->push_color(comment_color);
- static const CharType dash[6] = { ' ', ' ', 0x2013 /* en dash */, ' ', ' ', 0 };
+ static const char32_t dash[6] = { ' ', ' ', 0x2013 /* en dash */, ' ', ' ', 0 };
class_desc->add_text(String(dash));
_add_text(DTR(enum_list[i].description));
class_desc->pop();
@@ -937,12 +937,12 @@ void EditorHelp::_update_doc() {
Vector<float> color = stripped.split_floats(",");
if (color.size() >= 3) {
class_desc->push_color(Color(color[0], color[1], color[2]));
- static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
class_desc->add_text(String(prefix));
class_desc->pop();
}
} else {
- static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
class_desc->add_text(String(prefix));
}
@@ -960,7 +960,7 @@ void EditorHelp::_update_doc() {
if (constants[i].description != "") {
class_desc->push_font(doc_font);
class_desc->push_color(comment_color);
- static const CharType dash[6] = { ' ', ' ', 0x2013 /* en dash */, ' ', ' ', 0 };
+ static const char32_t dash[6] = { ' ', ' ', 0x2013 /* en dash */, ' ', ' ', 0 };
class_desc->add_text(String(dash));
_add_text(DTR(constants[i].description));
class_desc->pop();
@@ -1002,7 +1002,7 @@ void EditorHelp::_update_doc() {
class_desc->push_cell();
class_desc->push_font(doc_code_font);
- static const CharType prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
+ static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 };
class_desc->add_text(String(prefix));
_add_type(cd.properties[i].type, cd.properties[i].enumeration);
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index b49c50fa31..7fada633c9 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -192,9 +192,9 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
String exec = OS::get_singleton()->get_executable_path();
- printf("Running: %ls", exec.c_str());
+ printf("Running: %s", exec.utf8().get_data());
for (List<String>::Element *E = args.front(); E; E = E->next()) {
- printf(" %ls", E->get().c_str());
+ printf(" %s", E->get().utf8().get_data());
};
printf("\n");
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index bd4bb57dcf..c2ccbdb08c 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -54,7 +54,7 @@ inline void pop_back(T &container) {
}
// TODO Copied from TextEdit private, would be nice to extract it in a single place
-static bool is_text_char(CharType c) {
+static bool is_text_char(char32_t c) {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_';
}
@@ -854,7 +854,7 @@ public:
String get_line(FileAccess *f) {
_line_buffer.clear();
- CharType c = f->get_8();
+ char32_t c = f->get_8();
while (!f->eof_reached()) {
if (c == '\n') {
diff --git a/editor/input_map_editor.cpp b/editor/input_map_editor.cpp
index 52cf9c1869..c67e16d371 100644
--- a/editor/input_map_editor.cpp
+++ b/editor/input_map_editor.cpp
@@ -100,7 +100,7 @@ void InputMapEditor::_notification(int p_what) {
}
static bool _validate_action_name(const String &p_name) {
- const CharType *cstr = p_name.c_str();
+ const char32_t *cstr = p_name.get_data();
for (int i = 0; cstr[i]; i++) {
if (cstr[i] == '/' || cstr[i] == ':' || cstr[i] == '"' ||
cstr[i] == '=' || cstr[i] == '\\' || cstr[i] < 32) {
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 3f9f159d7f..9427f82f9e 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -6256,7 +6256,7 @@ void CanvasItemEditorViewport::_perform_drop_data() {
files_str += error_files[i].get_file().get_basename() + ",";
}
files_str = files_str.substr(0, files_str.length() - 1);
- accept->set_text(vformat(TTR("Error instancing scene from %s"), files_str.c_str()));
+ accept->set_text(vformat(TTR("Error instancing scene from %s"), files_str.get_data()));
accept->popup_centered();
}
}
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 2889cb50a0..3cf4dc5ac8 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -466,7 +466,7 @@ EditorMaterialPreviewPlugin::~EditorMaterialPreviewPlugin() {
///////////////////////////////////////////////////////////////////////////
-static bool _is_text_char(CharType c) {
+static bool _is_text_char(char32_t c) {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_';
}
@@ -525,7 +525,7 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
bool prev_is_text = false;
bool in_keyword = false;
for (int i = 0; i < code.length(); i++) {
- CharType c = code[i];
+ char32_t c = code[i];
if (c > 32) {
if (col < thumbnail_size) {
Color color = text_color;
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 21a75c2f5d..952487c13c 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -3729,7 +3729,7 @@ void Node3DEditorViewport::_perform_drop_data() {
files_str += error_files[i].get_file().get_basename() + ",";
}
files_str = files_str.substr(0, files_str.length() - 1);
- accept->set_text(vformat(TTR("Error instancing scene from %s"), files_str.c_str()));
+ accept->set_text(vformat(TTR("Error instancing scene from %s"), files_str.get_data()));
accept->popup_centered();
}
}