From c788e6a1b174afd154e589a76885731c2fc19723 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 17 Aug 2010 11:14:04 +0000 Subject: First shot at a debug console. --- client/macrowindow.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'client/macrowindow.cc') diff --git a/client/macrowindow.cc b/client/macrowindow.cc index f0565c9..49f3782 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -37,19 +37,18 @@ #include "lua.h" #include "resumewidget.h" +#include "debug.h" + extern QString cpr; extern QString user; extern QString host; extern quint16 port; -//#define DEBUG(fmt...) printf("MacroWindow (%p)",this);printf(fmt);fflush(stdout) -#define DEBUG(ftm...) - MacroWindow::MacroWindow(NetCom &n, QDomNode &xml_doc, QString templ, bool collapsed, bool compact) : Collapser(), netcom(n) { - DEBUG("macrowindow %p\n", this); + DEBUG(macrowindow, "Constructor %p\n", this); mainwidget = NULL; lua = new LUA(&mainwidget); @@ -114,7 +113,8 @@ void MacroWindow::initMacro(QDomNode &node) } else if(elem.tagName() == "widgets") { if(mainwidget) { - DEBUG("WARNING: mainwidget already exists! Calling clear().\n"); + WARN(macrowindow, + "WARNING: mainwidget already exists! Calling clear().\n"); clear(); } @@ -281,7 +281,7 @@ void MacroWindow::toggleMacro() void MacroWindow::macroChanged() { - DEBUG("This macro was changed!\n"); + DEBUG(macrowindow, "This macro was changed!\n"); emit macroHasChanged(); waschanged = true; } @@ -298,7 +298,7 @@ void MacroWindow::setActive(bool active) void MacroWindow::clear() { - DEBUG("clear %p\n", this); + DEBUG(macrowindow, "clear %p\n", this); setExpandedWidget(NULL); if(mainwidget) delete mainwidget; @@ -309,6 +309,6 @@ void MacroWindow::clear() void MacroWindow::collapsed() { - DEBUG("collapsed %p\n", this); + DEBUG(macrowindow, "collapsed %p\n", this); clear(); } -- cgit v1.2.3