forked from qt-creator/qt-creator
QmlJSInspector: Guard qDebug output
This commit is contained in:
@@ -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,6 +270,7 @@ bool ClientProxy::setBindingForObject(int objectDebugId,
|
|||||||
const QVariant &value,
|
const QVariant &value,
|
||||||
bool isLiteralValue)
|
bool isLiteralValue)
|
||||||
{
|
{
|
||||||
|
if (debug)
|
||||||
qDebug() << "setBindingForObject():" << objectDebugId << propertyName << value;
|
qDebug() << "setBindingForObject():" << objectDebugId << propertyName << value;
|
||||||
if (objectDebugId == -1)
|
if (objectDebugId == -1)
|
||||||
return false;
|
return false;
|
||||||
@@ -280,6 +285,7 @@ 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)
|
||||||
{
|
{
|
||||||
|
if (debug)
|
||||||
qDebug() << "setMethodBodyForObject():" << objectDebugId << methodName << methodBody;
|
qDebug() << "setMethodBodyForObject():" << objectDebugId << methodName << methodBody;
|
||||||
if (objectDebugId == -1)
|
if (objectDebugId == -1)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -288,6 +294,7 @@ bool ClientProxy::setMethodBodyForObject(int objectDebugId, const QString &metho
|
|||||||
|
|
||||||
bool ClientProxy::resetBindingForObject(int objectDebugId, const QString& propertyName)
|
bool ClientProxy::resetBindingForObject(int objectDebugId, const QString& propertyName)
|
||||||
{
|
{
|
||||||
|
if (debug)
|
||||||
qDebug() << "resetBindingForObject():" << objectDebugId << propertyName;
|
qDebug() << "resetBindingForObject():" << objectDebugId << propertyName;
|
||||||
if (objectDebugId == -1)
|
if (objectDebugId == -1)
|
||||||
return false;
|
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user