Commit e0b11d43 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlJSInspector: Guard qDebug output

parent 878f146e
...@@ -44,6 +44,10 @@ ...@@ -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, ...@@ -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, ...@@ -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 ...@@ -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 ...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment