mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:47:45 +00:00
Everywhere: Hook up remaining debug macros to Debug.h.
This commit is contained in:
parent
da69de1f1b
commit
eea72b9b5c
63 changed files with 458 additions and 287 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
|
@ -68,7 +69,7 @@ void Menu::set_icon(const Gfx::Bitmap* icon)
|
|||
void Menu::add_action(NonnullRefPtr<Action> action)
|
||||
{
|
||||
m_items.append(make<MenuItem>(m_menu_id, move(action)));
|
||||
#ifdef GMENU_DEBUG
|
||||
#if GMENU_DEBUG
|
||||
dbgln("GUI::Menu::add_action(): MenuItem Menu ID: {}", m_menu_id);
|
||||
#endif
|
||||
}
|
||||
|
@ -109,7 +110,7 @@ int Menu::realize_menu(RefPtr<Action> default_action)
|
|||
unrealize_menu();
|
||||
m_menu_id = WindowServerConnection::the().send_sync<Messages::WindowServer::CreateMenu>(m_name)->menu_id();
|
||||
|
||||
#ifdef MENU_DEBUG
|
||||
#if MENU_DEBUG
|
||||
dbgln("GUI::Menu::realize_menu(): New menu ID: {}", m_menu_id);
|
||||
#endif
|
||||
ASSERT(m_menu_id > 0);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/ScopeGuard.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/TemporaryChange.h>
|
||||
|
@ -478,7 +479,7 @@ void TextEditor::paint_event(PaintEvent& event)
|
|||
for_each_visual_line(line_index, [&](const Gfx::IntRect& visual_line_rect, auto& visual_line_text, size_t start_of_visual_line, [[maybe_unused]] bool is_last_visual_line) {
|
||||
if (is_multi_line() && line_index == m_cursor.line())
|
||||
painter.fill_rect(visual_line_rect, widget_background_color.darkened(0.9f));
|
||||
#ifdef DEBUG_TEXTEDITOR
|
||||
#if TEXTEDITOR_DEBUG
|
||||
painter.draw_rect(visual_line_rect, Color::Cyan);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <LibGUI/HeaderView.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
|
@ -257,7 +258,7 @@ void TreeView::paint_event(PaintEvent& event)
|
|||
auto rect = a_rect.translated(0, y_offset);
|
||||
auto toggle_rect = a_toggle_rect.translated(0, y_offset);
|
||||
|
||||
#ifdef DEBUG_ITEM_RECTS
|
||||
#if ITEM_RECTS_DEBUG
|
||||
painter.fill_rect(rect, Color::WarmGray);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/NeverDestroyed.h>
|
||||
|
@ -558,7 +559,7 @@ void Window::update(const Gfx::IntRect& a_rect)
|
|||
|
||||
for (auto& pending_rect : m_pending_paint_event_rects) {
|
||||
if (pending_rect.contains(a_rect)) {
|
||||
#ifdef UPDATE_COALESCING_DEBUG
|
||||
#if UPDATE_COALESCING_DEBUG
|
||||
dbgln("Ignoring {} since it's contained by pending rect {}", a_rect, pending_rect);
|
||||
#endif
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue