1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:17:35 +00:00

Everywhere: Replace a bundle of dbg with dbgln.

These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
This commit is contained in:
asynts 2021-01-15 21:29:01 +01:00 committed by Andreas Kling
parent 7b0a1a98d9
commit 27bc48e06c
11 changed files with 116 additions and 109 deletions

View file

@ -28,11 +28,10 @@
#include "FormEditorWidget.h"
#include "FormWidget.h"
#include "WidgetTreeModel.h"
#include <AK/Debug.h>
#include <AK/LogStream.h>
#include <LibGfx/Palette.h>
//#define DEBUG_CURSOR_TOOL
namespace HackStudio {
void CursorTool::on_mousedown(GUI::MouseEvent& event)
@ -49,9 +48,7 @@ void CursorTool::on_mousedown(GUI::MouseEvent& event)
m_editor.selection().toggle(*result.widget);
} else if (!event.modifiers()) {
if (!m_editor.selection().contains(*result.widget)) {
#ifdef DEBUG_CURSOR_TOOL
dbg() << "Selection didn't contain " << *result.widget << ", making it the only selected one";
#endif
dbgln<debug_cursor_tool>("Selection didn't contain {}, making it the only selected one", *result.widget);
m_editor.selection().set(*result.widget);
}

View file

@ -26,13 +26,11 @@
#include "ClientConnection.h"
#include "AutoComplete.h"
#include <AK/Debug.h>
#include <AK/HashMap.h>
#include <LibCore/File.h>
#include <LibGUI/TextDocument.h>
// #define DEBUG_CPP_LANGUAGE_SERVER
// #define DEBUG_FILE_CONTENT
namespace LanguageServers::Cpp {
static HashMap<int, RefPtr<ClientConnection>> s_connections;
@ -89,9 +87,7 @@ void ClientConnection::handle(const Messages::LanguageServer::FileOpened& messag
auto document = GUI::TextDocument::create(&s_default_document_client);
document->set_text(content_view);
m_open_files.set(message.file_name(), document);
#ifdef DEBUG_FILE_CONTENT
dbg() << document->text();
#endif
dbgln<debug_file_content>("{}", document->text());
}
void ClientConnection::handle(const Messages::LanguageServer::FileEditInsertText& message)

View file

@ -26,13 +26,11 @@
#include "ClientConnection.h"
#include "AutoComplete.h"
#include <AK/Debug.h>
#include <AK/HashMap.h>
#include <LibCore/File.h>
#include <LibGUI/TextDocument.h>
// #define DEBUG_SH_LANGUAGE_SERVER
// #define DEBUG_FILE_CONTENT
namespace LanguageServers::Shell {
static HashMap<int, RefPtr<ClientConnection>> s_connections;
@ -89,9 +87,7 @@ void ClientConnection::handle(const Messages::LanguageServer::FileOpened& messag
auto document = GUI::TextDocument::create(&s_default_document_client);
document->set_text(content_view);
m_open_files.set(message.file_name(), document);
#ifdef DEBUG_FILE_CONTENT
dbg() << document->text();
#endif
dbgln<debug_file_content>("{}", document->text());
}
void ClientConnection::handle(const Messages::LanguageServer::FileEditInsertText& message)
@ -133,9 +129,7 @@ void ClientConnection::handle(const Messages::LanguageServer::FileEditRemoveText
};
document->remove(range);
#ifdef DEBUG_FILE_CONTENT
dbg() << document->text();
#endif
dbgln<debug_file_content>("{}", document->text());
}
void ClientConnection::handle(const Messages::LanguageServer::AutoCompleteSuggestions& message)