summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-23 23:59:27 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-25 09:47:36 +0100
commit8465683dcf1ede4dbab46915113dd2ce4e4b7dfb (patch)
tree392cdf423fabec6af5550d831e07217fd0e3287b /Userland/Libraries/LibGUI
parentbb483f7ef4693582d34aa7a30fa2916fdcc8b6f4 (diff)
downloadserenity-8465683dcf1ede4dbab46915113dd2ce4e4b7dfb.zip
Everywhere: Debug macros instead of constexpr.
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/CppSyntaxHighlighter.cpp2
-rw-r--r--Userland/Libraries/LibGUI/JSSyntaxHighlighter.cpp2
-rw-r--r--Userland/Libraries/LibGUI/WindowServerConnection.cpp8
3 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibGUI/CppSyntaxHighlighter.cpp b/Userland/Libraries/LibGUI/CppSyntaxHighlighter.cpp
index a4c6fd1205..f0e0171f2e 100644
--- a/Userland/Libraries/LibGUI/CppSyntaxHighlighter.cpp
+++ b/Userland/Libraries/LibGUI/CppSyntaxHighlighter.cpp
@@ -84,7 +84,7 @@ void CppSyntaxHighlighter::rehighlight(Gfx::Palette palette)
Vector<GUI::TextDocumentSpan> spans;
for (auto& token : tokens) {
- dbgln<debug_syntax_highlighting>("{} @ {}:{} - {}:{}", token.to_string(), token.m_start.line, token.m_start.column, token.m_end.line, token.m_end.column);
+ dbgln<SYNTAX_HIGHLIGHTING_DEBUG>("{} @ {}:{} - {}:{}", token.to_string(), token.m_start.line, token.m_start.column, token.m_end.line, token.m_end.column);
GUI::TextDocumentSpan span;
span.range.set_start({ token.m_start.line, token.m_start.column });
span.range.set_end({ token.m_end.line, token.m_end.column });
diff --git a/Userland/Libraries/LibGUI/JSSyntaxHighlighter.cpp b/Userland/Libraries/LibGUI/JSSyntaxHighlighter.cpp
index 2f70a59098..267b572cd6 100644
--- a/Userland/Libraries/LibGUI/JSSyntaxHighlighter.cpp
+++ b/Userland/Libraries/LibGUI/JSSyntaxHighlighter.cpp
@@ -108,7 +108,7 @@ void JSSyntaxHighlighter::rehighlight(Gfx::Palette palette)
spans.append(span);
advance_position(str[str.length() - 1]);
- dbgln<debug_syntax_highlighting>("{}{} @ '{}' {}:{} - {}:{}",
+ dbgln<SYNTAX_HIGHLIGHTING_DEBUG>("{}{} @ '{}' {}:{} - {}:{}",
token.name(),
is_trivia ? " (trivia)" : "",
token.value(),
diff --git a/Userland/Libraries/LibGUI/WindowServerConnection.cpp b/Userland/Libraries/LibGUI/WindowServerConnection.cpp
index 279f7a1a89..73e2715f28 100644
--- a/Userland/Libraries/LibGUI/WindowServerConnection.cpp
+++ b/Userland/Libraries/LibGUI/WindowServerConnection.cpp
@@ -141,25 +141,25 @@ void WindowServerConnection::handle(const Messages::WindowClient::KeyDown& messa
auto key_event = make<KeyEvent>(Event::KeyDown, (KeyCode)message.key(), message.modifiers(), message.code_point(), message.scancode());
Action* action = nullptr;
- dbgln<debug_keyboard_shortcuts>("Looking up action for {}", key_event->to_string());
+ dbgln<KEYBOARD_SHORTCUTS_DEBUG>("Looking up action for {}", key_event->to_string());
if (auto* focused_widget = window->focused_widget()) {
for (auto* widget = focused_widget; widget && !action; widget = widget->parent_widget()) {
action = widget->action_for_key_event(*key_event);
- dbgln<debug_keyboard_shortcuts>(" > Focused widget {} gave action: {}", *widget, action);
+ dbgln<KEYBOARD_SHORTCUTS_DEBUG>(" > Focused widget {} gave action: {}", *widget, action);
}
}
if (!action) {
action = window->action_for_key_event(*key_event);
- dbgln<debug_keyboard_shortcuts>(" > Asked window {}, got action: {}", *window, action);
+ dbgln<KEYBOARD_SHORTCUTS_DEBUG>(" > Asked window {}, got action: {}", *window, action);
}
// NOTE: Application-global shortcuts are ignored while a modal window is up.
if (!action && !window->is_modal()) {
action = Application::the()->action_for_key_event(*key_event);
- dbgln<debug_keyboard_shortcuts>(" > Asked application, got action: {}", action);
+ dbgln<KEYBOARD_SHORTCUTS_DEBUG>(" > Asked application, got action: {}", action);
}
if (action) {