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/widgets/widget.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'client/widgets') diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc index d85d1ad..231359c 100644 --- a/client/widgets/widget.cc +++ b/client/widgets/widget.cc @@ -33,8 +33,8 @@ #include #include -//#define DEBUG(fmt...) printf(fmt) -#define DEBUG(ftm...) +#define DEBUG(fmt...) printf("Widget (%p)", this); printf(fmt); fflush(stdout) +//#define DEBUG(ftm...) Widget::Widget(QDomNode &node, MacroWindow *macrowindow) { @@ -64,9 +64,8 @@ Widget::Widget(QDomNode &node, MacroWindow *macrowindow) lazy_value = elem.attribute("value", ""); lazy_source = elem.attribute("prefilled", "prefilled"); - if((hasOnChangeEvent = elem.hasAttribute("onChange"))) { - onChangeEventScript = elem.attribute("onChange"); - } + hasOnChangeEvent = elem.hasAttribute("onChange"); + onChangeEventScript = elem.attribute("onChange", ""); is_valid = true; -- cgit v1.2.3