summaryrefslogtreecommitdiff
path: root/client/widgets/widget.cc
diff options
context:
space:
mode:
authordeva <deva>2010-08-17 11:14:04 +0000
committerdeva <deva>2010-08-17 11:14:04 +0000
commitc788e6a1b174afd154e589a76885731c2fc19723 (patch)
tree761a87ee3941d671dd41d8b6df7a39bd85c993b1 /client/widgets/widget.cc
parent2a9d0cf8c52a832c04729a4c65f07e6cd24eb19e (diff)
First shot at a debug console.
Diffstat (limited to 'client/widgets/widget.cc')
-rw-r--r--client/widgets/widget.cc9
1 files changed, 4 insertions, 5 deletions
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 <QLayout>
#include <QObject>
-//#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;