summaryrefslogtreecommitdiffstats
path: root/editor/editor_log.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-14 13:23:58 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 16:54:55 +0200
commit0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch)
treea27e497da7104dd0a64f98a04fa3067668735e91 /editor/editor_log.cpp
parent710b34b70227becdc652b4ae027fe0ac47409642 (diff)
downloadredot-engine-0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a.tar.gz
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
Diffstat (limited to 'editor/editor_log.cpp')
-rw-r--r--editor/editor_log.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 78aed96363..7adde6f114 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -38,7 +38,6 @@
#include "scene/resources/dynamic_font.h"
void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) {
-
EditorLog *self = (EditorLog *)p_self;
if (self->current != Thread::get_caller_id())
return;
@@ -58,9 +57,7 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f
}
void EditorLog::_notification(int p_what) {
-
if (p_what == NOTIFICATION_ENTER_TREE) {
-
//button->set_icon(get_icon("Console","EditorIcons"));
log->add_theme_font_override("normal_font", get_theme_font("output_source", "EditorFonts"));
log->add_theme_color_override("selection_color", get_theme_color("accent_color", "Editor") * Color(1, 1, 1, 0.4));
@@ -76,13 +73,11 @@ void EditorLog::_notification(int p_what) {
}
void EditorLog::_clear_request() {
-
log->clear();
tool_button->set_icon(Ref<Texture2D>());
}
void EditorLog::_copy_request() {
-
log->selection_copy();
}
@@ -95,7 +90,6 @@ void EditorLog::copy() {
}
void EditorLog::add_message(const String &p_msg, MessageType p_type) {
-
log->add_newline();
bool restore = p_type != MSG_TYPE_STD;
@@ -133,19 +127,16 @@ void EditorLog::set_tool_button(ToolButton *p_tool_button) {
}
void EditorLog::_undo_redo_cbk(void *p_self, const String &p_name) {
-
EditorLog *self = (EditorLog *)p_self;
self->add_message(p_name, EditorLog::MSG_TYPE_EDITOR);
}
void EditorLog::_bind_methods() {
-
ADD_SIGNAL(MethodInfo("clear_request"));
ADD_SIGNAL(MethodInfo("copy_request"));
}
EditorLog::EditorLog() {
-
VBoxContainer *vb = this;
HBoxContainer *hb = memnew(HBoxContainer);
@@ -189,7 +180,6 @@ EditorLog::EditorLog() {
}
void EditorLog::deinit() {
-
remove_error_handler(&eh);
}