summaryrefslogtreecommitdiff
path: root/client/widgets/widget.cc
diff options
context:
space:
mode:
authordeva <deva>2010-08-17 11:23:02 +0000
committerdeva <deva>2010-08-17 11:23:02 +0000
commit819e9d404d2a72652764970651a66c4c9849c9c9 (patch)
tree2f2d8a60d6829cccb8a8c51424ea2bb074b78509 /client/widgets/widget.cc
parentc788e6a1b174afd154e589a76885731c2fc19723 (diff)
Scroll improvement. Don't show console on startup.
Diffstat (limited to 'client/widgets/widget.cc')
-rw-r--r--client/widgets/widget.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc
index 231359c..563f648 100644
--- a/client/widgets/widget.cc
+++ b/client/widgets/widget.cc
@@ -33,8 +33,7 @@
#include <QLayout>
#include <QObject>
-#define DEBUG(fmt...) printf("Widget (%p)", this); printf(fmt); fflush(stdout)
-//#define DEBUG(ftm...)
+#include "debug.h"
Widget::Widget(QDomNode &node, MacroWindow *macrowindow)
{
@@ -69,14 +68,14 @@ Widget::Widget(QDomNode &node, MacroWindow *macrowindow)
is_valid = true;
- DEBUG("Create Widget '%s' of type '%s'\n",
+ DEBUG(widget, "Create Widget '%s' of type '%s'\n",
name().toStdString().c_str(),
type().toStdString().c_str());
}
Widget::~Widget()
{
- DEBUG("Delete Widget '%s' of type '%s'\n",
+ DEBUG(widget, "Delete Widget '%s' of type '%s'\n",
name().toStdString().c_str(),
type().toStdString().c_str());
@@ -169,7 +168,7 @@ bool Widget::setKeyboardFocus()
Widget *Widget::findWidget(QString n, bool deep)
{
- DEBUG("Find Widget %p\n", this); fflush(stdout);
+ DEBUG(widget, "Find Widget %p\n", this);
if(n == name()) return this;
@@ -189,7 +188,7 @@ Widget *Widget::findWidget(QString n, bool deep)
QVector< Widget* > Widget::widgetList(bool deep)
{
- DEBUG("Widget List %p\n", this); fflush(stdout);
+ DEBUG(widget, "Widget List %p\n", this);
QVector< Widget* > lst;
@@ -214,7 +213,8 @@ void Widget::childWasChanged()
void Widget::addChild(Widget *widget)
{
if(widget == NULL) {
- DEBUG("Trying to add NULL child to '%s'\n", name().toStdString().c_str());
+ WARN(widget, "Trying to add NULL child to '%s'\n",
+ name().toStdString().c_str());
return;
}
children.push_back(widget);