summaryrefslogtreecommitdiff
path: root/editor/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'editor/debugger')
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_protocol.cpp8
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_protocol.h2
-rw-r--r--editor/debugger/editor_debugger_inspector.cpp2
-rw-r--r--editor/debugger/editor_debugger_inspector.h2
-rw-r--r--editor/debugger/editor_debugger_node.cpp2
-rw-r--r--editor/debugger/editor_network_profiler.h12
-rw-r--r--editor/debugger/editor_performance_profiler.cpp5
-rw-r--r--editor/debugger/editor_performance_profiler.h6
-rw-r--r--editor/debugger/editor_profiler.h20
-rw-r--r--editor/debugger/editor_visual_profiler.h22
-rw-r--r--editor/debugger/script_editor_debugger.cpp13
-rw-r--r--editor/debugger/script_editor_debugger.h78
12 files changed, 87 insertions, 85 deletions
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
index babe8af8bc..745ca17efd 100644
--- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
@@ -349,14 +349,14 @@ int DebugAdapterProtocol::parse_variant(const Variant &p_var) {
case Variant::BASIS: {
int id = variable_id++;
Basis basis = p_var;
- const String type_vec2 = Variant::get_type_name(Variant::VECTOR2);
+ const String type_vec3 = Variant::get_type_name(Variant::VECTOR3);
DAP::Variable x, y, z;
x.name = "x";
y.name = "y";
z.name = "z";
- x.type = type_vec2;
- y.type = type_vec2;
- z.type = type_vec2;
+ x.type = type_vec3;
+ y.type = type_vec3;
+ z.type = type_vec3;
x.value = basis.elements[0];
y.value = basis.elements[1];
z.value = basis.elements[2];
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.h b/editor/debugger/debug_adapter/debug_adapter_protocol.h
index b54a5f1f3f..e4760bea54 100644
--- a/editor/debugger/debug_adapter/debug_adapter_protocol.h
+++ b/editor/debugger/debug_adapter/debug_adapter_protocol.h
@@ -76,7 +76,7 @@ class DebugAdapterProtocol : public Object {
private:
static DebugAdapterProtocol *singleton;
- DebugAdapterParser *parser;
+ DebugAdapterParser *parser = nullptr;
List<Ref<DAPeer>> clients;
Ref<TCPServer> server;
diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp
index c111190ca3..936b8ca626 100644
--- a/editor/debugger/editor_debugger_inspector.cpp
+++ b/editor/debugger/editor_debugger_inspector.cpp
@@ -206,7 +206,7 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) {
void EditorDebuggerInspector::clear_cache() {
for (const KeyValue<ObjectID, EditorDebuggerRemoteObject *> &E : remote_objects) {
EditorNode *editor = EditorNode::get_singleton();
- if (editor->get_editor_history()->get_current() == E.value->get_instance_id()) {
+ if (editor->get_editor_selection_history()->get_current() == E.value->get_instance_id()) {
editor->push_item(nullptr);
}
memdelete(E.value);
diff --git a/editor/debugger/editor_debugger_inspector.h b/editor/debugger/editor_debugger_inspector.h
index 5cdc4417d0..8f523bfbdc 100644
--- a/editor/debugger/editor_debugger_inspector.h
+++ b/editor/debugger/editor_debugger_inspector.h
@@ -70,7 +70,7 @@ private:
ObjectID inspected_object_id;
Map<ObjectID, EditorDebuggerRemoteObject *> remote_objects;
Set<RES> remote_dependencies;
- EditorDebuggerRemoteObject *variables;
+ EditorDebuggerRemoteObject *variables = nullptr;
void _object_selected(ObjectID p_object);
void _object_edited(ObjectID p_id, const String &p_prop, const Variant &p_value);
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index d294858ff8..c0685af572 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -181,7 +181,7 @@ void EditorDebuggerNode::_bind_methods() {
}
EditorDebuggerRemoteObject *EditorDebuggerNode::get_inspected_remote_object() {
- return Object::cast_to<EditorDebuggerRemoteObject>(ObjectDB::get_instance(EditorNode::get_singleton()->get_editor_history()->get_current()));
+ return Object::cast_to<EditorDebuggerRemoteObject>(ObjectDB::get_instance(EditorNode::get_singleton()->get_editor_selection_history()->get_current()));
}
ScriptEditorDebugger *EditorDebuggerNode::get_debugger(int p_id) const {
diff --git a/editor/debugger/editor_network_profiler.h b/editor/debugger/editor_network_profiler.h
index 3e95eb0de6..3a604f5564 100644
--- a/editor/debugger/editor_network_profiler.h
+++ b/editor/debugger/editor_network_profiler.h
@@ -42,13 +42,13 @@ class EditorNetworkProfiler : public VBoxContainer {
GDCLASS(EditorNetworkProfiler, VBoxContainer)
private:
- Button *activate;
- Button *clear_button;
- Tree *counters_display;
- LineEdit *incoming_bandwidth_text;
- LineEdit *outgoing_bandwidth_text;
+ Button *activate = nullptr;
+ Button *clear_button = nullptr;
+ Tree *counters_display = nullptr;
+ LineEdit *incoming_bandwidth_text = nullptr;
+ LineEdit *outgoing_bandwidth_text = nullptr;
- Timer *frame_delay;
+ Timer *frame_delay = nullptr;
Map<ObjectID, SceneDebugger::RPCNodeInfo> nodes_data;
diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp
index 56d1e7cee9..c821561ca6 100644
--- a/editor/debugger/editor_performance_profiler.cpp
+++ b/editor/debugger/editor_performance_profiler.cpp
@@ -30,6 +30,7 @@
#include "editor_performance_profiler.h"
+#include "editor/editor_property_name_processor.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "main/performance.h"
@@ -386,8 +387,8 @@ EditorPerformanceProfiler::EditorPerformanceProfiler() {
monitor_draw->add_child(info_message);
for (int i = 0; i < Performance::MONITOR_MAX; i++) {
- String base = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i)).get_slicec('/', 0).capitalize();
- String name = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i)).get_slicec('/', 1).capitalize();
+ String base = EditorPropertyNameProcessor::get_singleton()->process_name(Performance::get_singleton()->get_monitor_name(Performance::Monitor(i)).get_slicec('/', 0), EditorPropertyNameProcessor::STYLE_CAPITALIZED);
+ String name = EditorPropertyNameProcessor::get_singleton()->process_name(Performance::get_singleton()->get_monitor_name(Performance::Monitor(i)).get_slicec('/', 1), EditorPropertyNameProcessor::STYLE_CAPITALIZED);
monitors.insert(Performance::get_singleton()->get_monitor_name(Performance::Monitor(i)), Monitor(name, base, i, Performance::get_singleton()->get_monitor_type(Performance::Monitor(i)), nullptr));
}
diff --git a/editor/debugger/editor_performance_profiler.h b/editor/debugger/editor_performance_profiler.h
index 998ecc5bb6..a917ddbe28 100644
--- a/editor/debugger/editor_performance_profiler.h
+++ b/editor/debugger/editor_performance_profiler.h
@@ -62,9 +62,9 @@ private:
OrderedHashMap<StringName, Monitor> monitors;
Map<StringName, TreeItem *> base_map;
- Tree *monitor_tree;
- Control *monitor_draw;
- Label *info_message;
+ Tree *monitor_tree = nullptr;
+ Control *monitor_draw = nullptr;
+ Label *info_message = nullptr;
StringName marker_key;
int marker_frame;
const int MARGIN = 4;
diff --git a/editor/debugger/editor_profiler.h b/editor/debugger/editor_profiler.h
index 45f7ac39c1..34f34be7c3 100644
--- a/editor/debugger/editor_profiler.h
+++ b/editor/debugger/editor_profiler.h
@@ -90,20 +90,20 @@ public:
};
private:
- Button *activate;
- Button *clear_button;
- TextureRect *graph;
+ Button *activate = nullptr;
+ Button *clear_button = nullptr;
+ TextureRect *graph = nullptr;
Ref<ImageTexture> graph_texture;
Vector<uint8_t> graph_image;
- Tree *variables;
- HSplitContainer *h_split;
+ Tree *variables = nullptr;
+ HSplitContainer *h_split = nullptr;
Set<StringName> plot_sigs;
- OptionButton *display_mode;
- OptionButton *display_time;
+ OptionButton *display_mode = nullptr;
+ OptionButton *display_time = nullptr;
- SpinBox *cursor_metric_edit;
+ SpinBox *cursor_metric_edit = nullptr;
Vector<Metric> frame_metrics;
int total_metrics;
@@ -119,8 +119,8 @@ private:
bool seeking;
- Timer *frame_delay;
- Timer *plot_delay;
+ Timer *frame_delay = nullptr;
+ Timer *plot_delay = nullptr;
void _update_frame();
diff --git a/editor/debugger/editor_visual_profiler.h b/editor/debugger/editor_visual_profiler.h
index 55ba725ae8..14eacca02d 100644
--- a/editor/debugger/editor_visual_profiler.h
+++ b/editor/debugger/editor_visual_profiler.h
@@ -67,20 +67,20 @@ public:
};
private:
- Button *activate;
- Button *clear_button;
+ Button *activate = nullptr;
+ Button *clear_button = nullptr;
- TextureRect *graph;
+ TextureRect *graph = nullptr;
Ref<ImageTexture> graph_texture;
Vector<uint8_t> graph_image;
- Tree *variables;
- HSplitContainer *h_split;
- CheckBox *frame_relative;
- CheckBox *linked;
+ Tree *variables = nullptr;
+ HSplitContainer *h_split = nullptr;
+ CheckBox *frame_relative = nullptr;
+ CheckBox *linked = nullptr;
- OptionButton *display_mode;
+ OptionButton *display_mode = nullptr;
- SpinBox *cursor_metric_edit;
+ SpinBox *cursor_metric_edit = nullptr;
Vector<Metric> frame_metrics;
int last_metric;
@@ -99,8 +99,8 @@ private:
bool seeking;
- Timer *frame_delay;
- Timer *plot_delay;
+ Timer *frame_delay = nullptr;
+ Timer *plot_delay = nullptr;
void _update_frame(bool p_focus_selected = false);
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 40b53c2636..98391d286a 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -44,6 +44,7 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
+#include "editor/editor_property_name_processor.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
@@ -163,7 +164,7 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) {
switch (file_dialog_purpose) {
case SAVE_MONITORS_CSV: {
Error err;
- FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err);
+ Ref<FileAccess> file = FileAccess::open(p_file, FileAccess::WRITE, &err);
if (err != OK) {
ERR_PRINT("Failed to open " + p_file);
@@ -208,7 +209,7 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) {
} break;
case SAVE_VRAM_CSV: {
Error err;
- FileAccessRef file = FileAccess::open(p_file, FileAccess::WRITE, &err);
+ Ref<FileAccess> file = FileAccess::open(p_file, FileAccess::WRITE, &err);
if (err != OK) {
ERR_PRINT("Failed to open " + p_file);
@@ -647,7 +648,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
const ServersDebugger::ServerInfo &srv = frame.servers[i];
EditorProfiler::Metric::Category c;
const String name = srv.name;
- c.name = name.capitalize();
+ c.name = EditorPropertyNameProcessor::get_singleton()->process_name(name, EditorPropertyNameProcessor::STYLE_CAPITALIZED);
c.items.resize(srv.functions.size());
c.total_time = 0;
c.signature = "categ::" + name;
@@ -659,7 +660,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
item.self = srv.functions[j].time;
item.total = item.self;
item.signature = "categ::" + name + "::" + item.name;
- item.name = item.name.capitalize();
+ item.name = EditorPropertyNameProcessor::get_singleton()->process_name(item.name, EditorPropertyNameProcessor::STYLE_CAPITALIZED);
c.total_time += item.total;
c.items.write[j] = item;
}
@@ -1495,7 +1496,7 @@ void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) {
if (error_tree->is_anything_selected()) {
item_menu->add_icon_item(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")), TTR("Copy Error"), ACTION_COPY_ERROR);
- item_menu->add_icon_item(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), TTR("Open C++ Source on GitHub"), ACTION_OPEN_SOURCE);
+ item_menu->add_icon_item(get_theme_icon(SNAME("ExternalLink"), SNAME("EditorIcons")), TTR("Open C++ Source on GitHub"), ACTION_OPEN_SOURCE);
}
if (item_menu->get_item_count() > 0) {
@@ -1763,7 +1764,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
inspector = memnew(EditorDebuggerInspector);
inspector->set_h_size_flags(SIZE_EXPAND_FILL);
inspector->set_v_size_flags(SIZE_EXPAND_FILL);
- inspector->set_enable_capitalize_paths(false);
+ inspector->set_property_name_style(EditorPropertyNameProcessor::STYLE_RAW);
inspector->set_read_only(true);
inspector->connect("object_selected", callable_mp(this, &ScriptEditorDebugger::_remote_object_selected));
inspector->connect("object_edited", callable_mp(this, &ScriptEditorDebugger::_remote_object_edited));
diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h
index 486ac26ef7..ad90e63c16 100644
--- a/editor/debugger/script_editor_debugger.h
+++ b/editor/debugger/script_editor_debugger.h
@@ -85,26 +85,26 @@ private:
ACTION_DELETE_ALL_BREAKPOINTS,
};
- AcceptDialog *msgdialog;
-
- LineEdit *clicked_ctrl;
- LineEdit *clicked_ctrl_type;
- LineEdit *live_edit_root;
- Button *le_set;
- Button *le_clear;
- Button *export_csv;
-
- VBoxContainer *errors_tab;
- Tree *error_tree;
- Button *expand_all_button;
- Button *collapse_all_button;
- Button *clear_button;
- PopupMenu *item_menu;
-
- Tree *breakpoints_tree;
- PopupMenu *breakpoints_menu;
-
- EditorFileDialog *file_dialog;
+ AcceptDialog *msgdialog = nullptr;
+
+ LineEdit *clicked_ctrl = nullptr;
+ LineEdit *clicked_ctrl_type = nullptr;
+ LineEdit *live_edit_root = nullptr;
+ Button *le_set = nullptr;
+ Button *le_clear = nullptr;
+ Button *export_csv = nullptr;
+
+ VBoxContainer *errors_tab = nullptr;
+ Tree *error_tree = nullptr;
+ Button *expand_all_button = nullptr;
+ Button *collapse_all_button = nullptr;
+ Button *clear_button = nullptr;
+ PopupMenu *item_menu = nullptr;
+
+ Tree *breakpoints_tree = nullptr;
+ PopupMenu *breakpoints_menu = nullptr;
+
+ EditorFileDialog *file_dialog = nullptr;
enum FileDialogPurpose {
SAVE_MONITORS_CSV,
SAVE_VRAM_CSV,
@@ -117,31 +117,31 @@ private:
bool skip_breakpoints_value = false;
Ref<Script> stack_script;
- TabContainer *tabs;
+ TabContainer *tabs = nullptr;
- Label *reason;
+ Label *reason = nullptr;
- Button *skip_breakpoints;
- Button *copy;
- Button *step;
- Button *next;
- Button *dobreak;
- Button *docontinue;
+ Button *skip_breakpoints = nullptr;
+ Button *copy = nullptr;
+ Button *step = nullptr;
+ Button *next = nullptr;
+ Button *dobreak = nullptr;
+ Button *docontinue = nullptr;
// Reference to "Remote" tab in scene tree. Needed by _live_edit_set and buttons state.
// Each debugger should have it's tree in the future I guess.
const Tree *editor_remote_tree = nullptr;
Map<int, String> profiler_signature;
- Tree *vmem_tree;
- Button *vmem_refresh;
- Button *vmem_export;
- LineEdit *vmem_total;
+ Tree *vmem_tree = nullptr;
+ Button *vmem_refresh = nullptr;
+ Button *vmem_export = nullptr;
+ LineEdit *vmem_total = nullptr;
- Tree *stack_dump;
+ Tree *stack_dump = nullptr;
LineEdit *search = nullptr;
- EditorDebuggerInspector *inspector;
- SceneDebuggerTree *scene_tree;
+ EditorDebuggerInspector *inspector = nullptr;
+ SceneDebuggerTree *scene_tree = nullptr;
Ref<RemoteDebuggerPeer> peer;
@@ -149,10 +149,10 @@ private:
int last_path_id;
Map<String, int> res_path_cache;
- EditorProfiler *profiler;
- EditorVisualProfiler *visual_profiler;
- EditorNetworkProfiler *network_profiler;
- EditorPerformanceProfiler *performance_profiler;
+ EditorProfiler *profiler = nullptr;
+ EditorVisualProfiler *visual_profiler = nullptr;
+ EditorNetworkProfiler *network_profiler = nullptr;
+ EditorPerformanceProfiler *performance_profiler = nullptr;
OS::ProcessID remote_pid = 0;
bool breaked = false;