QmlJSInspector: Guard qDebug output

This commit is contained in:
Kai Koehne
2010-10-06 17:24:39 +02:00
parent 878f146ede
commit e0b11d4374

View File

@@ -44,6 +44,10 @@
#include <QAbstractSocket> #include <QAbstractSocket>
#include <QDebug> #include <QDebug>
enum {
debug = false
};
using namespace QmlJSInspector::Internal; using namespace QmlJSInspector::Internal;
ClientProxy::ClientProxy(Debugger::QmlAdapter *adapter, QObject *parent) ClientProxy::ClientProxy(Debugger::QmlAdapter *adapter, QObject *parent)
@@ -266,7 +270,8 @@ bool ClientProxy::setBindingForObject(int objectDebugId,
const QVariant &value, const QVariant &value,
bool isLiteralValue) bool isLiteralValue)
{ {
qDebug() << "setBindingForObject():" << objectDebugId << propertyName << value; if (debug)
qDebug() << "setBindingForObject():" << objectDebugId << propertyName << value;
if (objectDebugId == -1) if (objectDebugId == -1)
return false; return false;
@@ -280,7 +285,8 @@ bool ClientProxy::setBindingForObject(int objectDebugId,
bool ClientProxy::setMethodBodyForObject(int objectDebugId, const QString &methodName, const QString &methodBody) bool ClientProxy::setMethodBodyForObject(int objectDebugId, const QString &methodName, const QString &methodBody)
{ {
qDebug() << "setMethodBodyForObject():" << objectDebugId << methodName << methodBody; if (debug)
qDebug() << "setMethodBodyForObject():" << objectDebugId << methodName << methodBody;
if (objectDebugId == -1) if (objectDebugId == -1)
return 0; return 0;
return m_client->setMethodBody(objectDebugId, methodName, methodBody); return m_client->setMethodBody(objectDebugId, methodName, methodBody);
@@ -288,7 +294,8 @@ bool ClientProxy::setMethodBodyForObject(int objectDebugId, const QString &metho
bool ClientProxy::resetBindingForObject(int objectDebugId, const QString& propertyName) bool ClientProxy::resetBindingForObject(int objectDebugId, const QString& propertyName)
{ {
qDebug() << "resetBindingForObject():" << objectDebugId << propertyName; if (debug)
qDebug() << "resetBindingForObject():" << objectDebugId << propertyName;
if (objectDebugId == -1) if (objectDebugId == -1)
return false; return false;
// if (propertyName == QLatin1String("id")) return false; // if (propertyName == QLatin1String("id")) return false;
@@ -297,6 +304,8 @@ bool ClientProxy::resetBindingForObject(int objectDebugId, const QString& proper
QDeclarativeDebugExpressionQuery *ClientProxy::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent) QDeclarativeDebugExpressionQuery *ClientProxy::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent)
{ {
if (debug)
qDebug() << "queryExpressionResult():" << objectDebugId << expr << parent;
if (objectDebugId != -1) if (objectDebugId != -1)
return m_client->queryExpressionResult(objectDebugId,expr,parent); return m_client->queryExpressionResult(objectDebugId,expr,parent);
return 0; return 0;