forked from qt-creator/qt-creator
QmlJSInspector: Guard qDebug output
This commit is contained in:
@@ -44,6 +44,10 @@
|
||||
#include <QAbstractSocket>
|
||||
#include <QDebug>
|
||||
|
||||
enum {
|
||||
debug = false
|
||||
};
|
||||
|
||||
using namespace QmlJSInspector::Internal;
|
||||
|
||||
ClientProxy::ClientProxy(Debugger::QmlAdapter *adapter, QObject *parent)
|
||||
@@ -266,6 +270,7 @@ bool ClientProxy::setBindingForObject(int objectDebugId,
|
||||
const QVariant &value,
|
||||
bool isLiteralValue)
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << "setBindingForObject():" << objectDebugId << propertyName << value;
|
||||
if (objectDebugId == -1)
|
||||
return false;
|
||||
@@ -280,6 +285,7 @@ bool ClientProxy::setBindingForObject(int objectDebugId,
|
||||
|
||||
bool ClientProxy::setMethodBodyForObject(int objectDebugId, const QString &methodName, const QString &methodBody)
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << "setMethodBodyForObject():" << objectDebugId << methodName << methodBody;
|
||||
if (objectDebugId == -1)
|
||||
return 0;
|
||||
@@ -288,6 +294,7 @@ bool ClientProxy::setMethodBodyForObject(int objectDebugId, const QString &metho
|
||||
|
||||
bool ClientProxy::resetBindingForObject(int objectDebugId, const QString& propertyName)
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << "resetBindingForObject():" << objectDebugId << propertyName;
|
||||
if (objectDebugId == -1)
|
||||
return false;
|
||||
@@ -297,6 +304,8 @@ bool ClientProxy::resetBindingForObject(int objectDebugId, const QString& proper
|
||||
|
||||
QDeclarativeDebugExpressionQuery *ClientProxy::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent)
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << "queryExpressionResult():" << objectDebugId << expr << parent;
|
||||
if (objectDebugId != -1)
|
||||
return m_client->queryExpressionResult(objectDebugId,expr,parent);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user