diff options
Diffstat (limited to 'editor/debugger')
-rw-r--r-- | editor/debugger/debug_adapter/debug_adapter_parser.h | 2 | ||||
-rw-r--r-- | editor/debugger/debug_adapter/debug_adapter_protocol.h | 2 | ||||
-rw-r--r-- | editor/debugger/debug_adapter/debug_adapter_server.h | 2 | ||||
-rw-r--r-- | editor/debugger/debug_adapter/debug_adapter_types.h | 2 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_inspector.cpp | 44 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_inspector.h | 1 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_node.h | 1 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_server.h | 6 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_tree.cpp | 2 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_tree.h | 1 | ||||
-rw-r--r-- | editor/debugger/editor_network_profiler.h | 6 | ||||
-rw-r--r-- | editor/debugger/editor_performance_profiler.cpp | 2 | ||||
-rw-r--r-- | editor/debugger/editor_profiler.h | 6 | ||||
-rw-r--r-- | editor/debugger/editor_visual_profiler.h | 6 |
14 files changed, 44 insertions, 39 deletions
diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.h b/editor/debugger/debug_adapter/debug_adapter_parser.h index f458151e17..ee32306146 100644 --- a/editor/debugger/debug_adapter/debug_adapter_parser.h +++ b/editor/debugger/debug_adapter/debug_adapter_parser.h @@ -93,4 +93,4 @@ public: Dictionary ev_breakpoint(const DAP::Breakpoint &p_breakpoint, const bool &p_enabled) const; }; -#endif +#endif // DEBUG_ADAPTER_PARSER_H diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.h b/editor/debugger/debug_adapter/debug_adapter_protocol.h index a17e550dfc..29f577ef97 100644 --- a/editor/debugger/debug_adapter/debug_adapter_protocol.h +++ b/editor/debugger/debug_adapter/debug_adapter_protocol.h @@ -152,4 +152,4 @@ public: ~DebugAdapterProtocol(); }; -#endif +#endif // DEBUG_ADAPTER_PROTOCOL_H diff --git a/editor/debugger/debug_adapter/debug_adapter_server.h b/editor/debugger/debug_adapter/debug_adapter_server.h index a2b01f92c6..633739eaae 100644 --- a/editor/debugger/debug_adapter/debug_adapter_server.h +++ b/editor/debugger/debug_adapter/debug_adapter_server.h @@ -54,4 +54,4 @@ public: void stop(); }; -#endif +#endif // DEBUG_ADAPTER_SERVER_H diff --git a/editor/debugger/debug_adapter/debug_adapter_types.h b/editor/debugger/debug_adapter/debug_adapter_types.h index fd66905f9b..eb10184ab3 100644 --- a/editor/debugger/debug_adapter/debug_adapter_types.h +++ b/editor/debugger/debug_adapter/debug_adapter_types.h @@ -278,4 +278,4 @@ struct Variable { } // namespace DAP -#endif +#endif // DEBUG_ADAPTER_TYPES_H diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp index 0e3d424a4b..58206efc20 100644 --- a/editor/debugger/editor_debugger_inspector.cpp +++ b/editor/debugger/editor_debugger_inspector.cpp @@ -126,25 +126,25 @@ void EditorDebuggerInspector::_object_selected(ObjectID p_object) { } ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { - EditorDebuggerRemoteObject *debugObj = nullptr; + EditorDebuggerRemoteObject *debug_obj = nullptr; SceneDebuggerObject obj; obj.deserialize(p_arr); ERR_FAIL_COND_V(obj.id.is_null(), ObjectID()); if (remote_objects.has(obj.id)) { - debugObj = remote_objects[obj.id]; + debug_obj = remote_objects[obj.id]; } else { - debugObj = memnew(EditorDebuggerRemoteObject); - debugObj->remote_object_id = obj.id; - debugObj->type_name = obj.class_name; - remote_objects[obj.id] = debugObj; - debugObj->connect("value_edited", callable_mp(this, &EditorDebuggerInspector::_object_edited)); + debug_obj = memnew(EditorDebuggerRemoteObject); + debug_obj->remote_object_id = obj.id; + debug_obj->type_name = obj.class_name; + remote_objects[obj.id] = debug_obj; + debug_obj->connect("value_edited", callable_mp(this, &EditorDebuggerInspector::_object_edited)); } - int old_prop_size = debugObj->prop_list.size(); + int old_prop_size = debug_obj->prop_list.size(); - debugObj->prop_list.clear(); + debug_obj->prop_list.clear(); int new_props_added = 0; HashSet<String> changed; for (int i = 0; i < obj.properties.size(); i++) { @@ -165,12 +165,14 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { var = ResourceLoader::load(path); if (pinfo.hint_string == "Script") { - if (debugObj->get_script() != var) { - debugObj->set_script(Ref<RefCounted>()); + if (debug_obj->get_script() != var) { + debug_obj->set_script(Ref<RefCounted>()); Ref<Script> script(var); if (!script.is_null()) { - ScriptInstance *script_instance = script->placeholder_instance_create(debugObj); - debugObj->set_script_and_instance(var, script_instance); + ScriptInstance *script_instance = script->placeholder_instance_create(debug_obj); + if (script_instance) { + debug_obj->set_script_and_instance(var, script_instance); + } } } } @@ -178,27 +180,27 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { } //always add the property, since props may have been added or removed - debugObj->prop_list.push_back(pinfo); + debug_obj->prop_list.push_back(pinfo); - if (!debugObj->prop_values.has(pinfo.name)) { + if (!debug_obj->prop_values.has(pinfo.name)) { new_props_added++; - debugObj->prop_values[pinfo.name] = var; + debug_obj->prop_values[pinfo.name] = var; } else { - if (bool(Variant::evaluate(Variant::OP_NOT_EQUAL, debugObj->prop_values[pinfo.name], var))) { - debugObj->prop_values[pinfo.name] = var; + if (bool(Variant::evaluate(Variant::OP_NOT_EQUAL, debug_obj->prop_values[pinfo.name], var))) { + debug_obj->prop_values[pinfo.name] = var; changed.insert(pinfo.name); } } } - if (old_prop_size == debugObj->prop_list.size() && new_props_added == 0) { + if (old_prop_size == debug_obj->prop_list.size() && new_props_added == 0) { //only some may have changed, if so, then update those, if exist for (const String &E : changed) { - emit_signal(SNAME("object_property_updated"), debugObj->remote_object_id, E); + emit_signal(SNAME("object_property_updated"), debug_obj->remote_object_id, E); } } else { //full update, because props were added or removed - debugObj->update(); + debug_obj->update(); } return obj.id; } diff --git a/editor/debugger/editor_debugger_inspector.h b/editor/debugger/editor_debugger_inspector.h index 0e73928558..5aac4dbf11 100644 --- a/editor/debugger/editor_debugger_inspector.h +++ b/editor/debugger/editor_debugger_inspector.h @@ -30,6 +30,7 @@ #ifndef EDITOR_DEBUGGER_INSPECTOR_H #define EDITOR_DEBUGGER_INSPECTOR_H + #include "editor/editor_inspector.h" class EditorDebuggerRemoteObject : public Object { diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h index d50cbec291..4c9ad49ac4 100644 --- a/editor/debugger/editor_debugger_node.h +++ b/editor/debugger/editor_debugger_node.h @@ -205,4 +205,5 @@ public: void add_debugger_plugin(const Ref<Script> &p_script); void remove_debugger_plugin(const Ref<Script> &p_script); }; + #endif // EDITOR_DEBUGGER_NODE_H diff --git a/editor/debugger/editor_debugger_server.h b/editor/debugger/editor_debugger_server.h index adf9a27c71..f3805f54d8 100644 --- a/editor/debugger/editor_debugger_server.h +++ b/editor/debugger/editor_debugger_server.h @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef EDITOR_DEBUGGER_CONNECTION_H -#define EDITOR_DEBUGGER_CONNECTION_H +#ifndef EDITOR_DEBUGGER_SERVER_H +#define EDITOR_DEBUGGER_SERVER_H #include "core/debugger/remote_debugger_peer.h" #include "core/object/ref_counted.h" @@ -57,4 +57,4 @@ public: virtual Ref<RemoteDebuggerPeer> take_connection() = 0; }; -#endif // EDITOR_DEBUGGER_CONNECTION_H +#endif // EDITOR_DEBUGGER_SERVER_H diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp index 023204b74a..bdab1cfecb 100644 --- a/editor/debugger/editor_debugger_tree.cpp +++ b/editor/debugger/editor_debugger_tree.cpp @@ -258,7 +258,7 @@ void EditorDebuggerTree::_item_menu_id_pressed(int p_option) { ResourceSaver::get_recognized_extensions(sd, &extensions); file_dialog->clear_filters(); for (int i = 0; i < extensions.size(); i++) { - file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); + file_dialog->add_filter("*." + extensions[i], extensions[i].to_upper()); } file_dialog->popup_file_dialog(); diff --git a/editor/debugger/editor_debugger_tree.h b/editor/debugger/editor_debugger_tree.h index bba524039e..9d163fd548 100644 --- a/editor/debugger/editor_debugger_tree.h +++ b/editor/debugger/editor_debugger_tree.h @@ -71,4 +71,5 @@ public: void update_scene_tree(const SceneDebuggerTree *p_tree, int p_debugger); EditorDebuggerTree(); }; + #endif // EDITOR_DEBUGGER_TREE_H diff --git a/editor/debugger/editor_network_profiler.h b/editor/debugger/editor_network_profiler.h index d2e70a083d..aea7ce3eec 100644 --- a/editor/debugger/editor_network_profiler.h +++ b/editor/debugger/editor_network_profiler.h @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef EDITORNETWORKPROFILER_H -#define EDITORNETWORKPROFILER_H +#ifndef EDITOR_NETWORK_PROFILER_H +#define EDITOR_NETWORK_PROFILER_H #include "scene/debugger/scene_debugger.h" #include "scene/gui/box_container.h" @@ -69,4 +69,4 @@ public: EditorNetworkProfiler(); }; -#endif //EDITORNETWORKPROFILER_H +#endif // EDITOR_NETWORK_PROFILER_H diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp index 50eef7b8b8..55d025f675 100644 --- a/editor/debugger/editor_performance_profiler.cpp +++ b/editor/debugger/editor_performance_profiler.cpp @@ -393,7 +393,7 @@ EditorPerformanceProfiler::EditorPerformanceProfiler() { info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); info_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART); info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); - info_message->set_anchors_and_offsets_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE); + info_message->set_anchors_and_offsets_preset(PRESET_FULL_RECT, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE); monitor_draw->add_child(info_message); for (int i = 0; i < Performance::MONITOR_MAX; i++) { diff --git a/editor/debugger/editor_profiler.h b/editor/debugger/editor_profiler.h index cb01a1819f..df92125258 100644 --- a/editor/debugger/editor_profiler.h +++ b/editor/debugger/editor_profiler.h @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef EDITORPROFILER_H -#define EDITORPROFILER_H +#ifndef EDITOR_PROFILER_H +#define EDITOR_PROFILER_H #include "scene/gui/box_container.h" #include "scene/gui/button.h" @@ -165,4 +165,4 @@ public: EditorProfiler(); }; -#endif // EDITORPROFILER_H +#endif // EDITOR_PROFILER_H diff --git a/editor/debugger/editor_visual_profiler.h b/editor/debugger/editor_visual_profiler.h index 4e5169da9e..8aa9e7b308 100644 --- a/editor/debugger/editor_visual_profiler.h +++ b/editor/debugger/editor_visual_profiler.h @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef EDITOR_FRAME_PROFILER_H -#define EDITOR_FRAME_PROFILER_H +#ifndef EDITOR_VISUAL_PROFILER_H +#define EDITOR_VISUAL_PROFILER_H #include "scene/gui/box_container.h" #include "scene/gui/button.h" @@ -144,4 +144,4 @@ public: EditorVisualProfiler(); }; -#endif // EDITOR_FRAME_PROFILER_H +#endif // EDITOR_VISUAL_PROFILER_H |