1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 03:45:07 +00:00

HackStudio: Put annoying debug spam behind EDITOR_DEBUG

This commit is contained in:
Andreas Kling 2019-11-05 20:09:06 +01:00
parent ac9907ee61
commit 0f81eaf8a2

View file

@ -14,6 +14,8 @@
#include <LibHTML/Parser/HTMLParser.h> #include <LibHTML/Parser/HTMLParser.h>
#include <LibMarkdown/MDDocument.h> #include <LibMarkdown/MDDocument.h>
//#define EDITOR_DEBUG
Editor::Editor(GWidget* parent) Editor::Editor(GWidget* parent)
: GTextEditor(GTextEditor::MultiLine, parent) : GTextEditor(GTextEditor::MultiLine, parent)
{ {
@ -89,7 +91,9 @@ void Editor::show_documentation_tooltip_if_available(const String& hovered_token
{ {
auto it = man_paths().find(hovered_token); auto it = man_paths().find(hovered_token);
if (it == man_paths().end()) { if (it == man_paths().end()) {
#ifdef EDITOR_DEBUG
dbg() << "no man path for " << hovered_token; dbg() << "no man path for " << hovered_token;
#endif
m_documentation_tooltip_window->hide(); m_documentation_tooltip_window->hide();
return; return;
} }
@ -98,7 +102,9 @@ void Editor::show_documentation_tooltip_if_available(const String& hovered_token
return; return;
} }
#ifdef EDITOR_DEBUG
dbg() << "opening " << it->value; dbg() << "opening " << it->value;
#endif
auto file = CFile::construct(it->value); auto file = CFile::construct(it->value);
if (!file->open(CFile::ReadOnly)) { if (!file->open(CFile::ReadOnly)) {
dbg() << "failed to open " << it->value << " " << file->error_string(); dbg() << "failed to open " << it->value << " " << file->error_string();