Renabled setBindingForObject.

This commit is contained in:
Roberto Raggi
2010-06-29 15:06:50 +02:00
parent 6f4cc3541d
commit 28c9b39baa
2 changed files with 16 additions and 15 deletions

View File

@@ -49,6 +49,7 @@ ClientProxy::ClientProxy(QObject *parent) :
m_objectTreeQuery(0), m_objectTreeQuery(0),
m_debuggerRunControl(0) m_debuggerRunControl(0)
{ {
Q_ASSERT(! m_instance);
m_instance = this; m_instance = this;
} }
@@ -72,7 +73,8 @@ bool ClientProxy::connectToViewer(const QString &host, quint16 port)
emit aboutToDisconnect(); emit aboutToDisconnect();
delete m_client; m_client = 0; delete m_client;
m_client = 0;
} }
if (m_conn) { if (m_conn) {
@@ -185,6 +187,9 @@ bool ClientProxy::isUnconnected() const
void ClientProxy::setSelectedItemByObjectId(int engineId, const QDeclarativeDebugObjectReference &objectRef) void ClientProxy::setSelectedItemByObjectId(int engineId, const QDeclarativeDebugObjectReference &objectRef)
{ {
Q_UNUSED(engineId);
Q_UNUSED(objectRef);
#ifdef __GNUC__ #ifdef __GNUC__
# warning implement ClientProxy::setSelectedItemByObjectId # warning implement ClientProxy::setSelectedItemByObjectId
#endif #endif
@@ -219,20 +224,13 @@ QDeclarativeDebugExpressionQuery *ClientProxy::setBindingForObject(int objectDeb
const QVariant &value, const QVariant &value,
bool isLiteralValue) bool isLiteralValue)
{ {
#ifdef __GNUC__ qDebug() << Q_FUNC_INFO;
# warning implement ClientProxy::setBindingForObject
#endif
qDebug() << "TODO:" << Q_FUNC_INFO;
#if 0
if (propertyName == QLatin1String("id") || objectDebugId == -1) if (propertyName == QLatin1String("id") || objectDebugId == -1)
return 0; return 0;
qDebug() << "executeBinding():" << objectDebugId << propertyName << value << "isLiteral:" << isLiteralValue; qDebug() << "executeBinding():" << objectDebugId << propertyName << value << "isLiteral:" << isLiteralValue;
return m_client->setBindingForObject(objectDebugId, propertyName, value.toString(), isLiteralValue, 0); return m_client->setBindingForObject(objectDebugId, propertyName, value.toString(), isLiteralValue, 0);
#else
return 0;
#endif
} }
void ClientProxy::queryEngineContext(int id) void ClientProxy::queryEngineContext(int id)
@@ -249,8 +247,8 @@ void ClientProxy::queryEngineContext(int id)
if (!m_contextQuery->isWaiting()) if (!m_contextQuery->isWaiting())
contextChanged(); contextChanged();
else else
QObject::connect(m_contextQuery, SIGNAL(stateChanged(QDeclarativeDebugQuery::State)), connect(m_contextQuery, SIGNAL(stateChanged(QDeclarativeDebugQuery::State)),
this, SLOT(contextChanged())); this, SLOT(contextChanged()));
} }
void ClientProxy::contextChanged() void ClientProxy::contextChanged()
@@ -264,7 +262,8 @@ void ClientProxy::contextChanged()
m_rootObject = m_contextQuery->rootContext().objects().first(); m_rootObject = m_contextQuery->rootContext().objects().first();
} }
delete m_contextQuery; m_contextQuery = 0; delete m_contextQuery;
m_contextQuery = 0;
m_objectTreeQuery = m_client->queryObjectRecursive(m_rootObject, this); m_objectTreeQuery = m_client->queryObjectRecursive(m_rootObject, this);
if (!m_objectTreeQuery->isWaiting()) { if (!m_objectTreeQuery->isWaiting()) {
@@ -320,7 +319,7 @@ void ClientProxy::reloadEngines()
if (!m_engineQuery->isWaiting()) if (!m_engineQuery->isWaiting())
updateEngineList(); updateEngineList();
else else
QObject::connect(m_engineQuery, SIGNAL(stateChanged(QDeclarativeDebugQuery::State)), connect(m_engineQuery, SIGNAL(stateChanged(QDeclarativeDebugQuery::State)),
this, SLOT(updateEngineList())); this, SLOT(updateEngineList()));
} }
@@ -332,7 +331,8 @@ QList<QDeclarativeDebugEngineReference> ClientProxy::engines() const
void ClientProxy::updateEngineList() void ClientProxy::updateEngineList()
{ {
m_engines = m_engineQuery->engines(); m_engines = m_engineQuery->engines();
delete m_engineQuery; m_engineQuery = 0; delete m_engineQuery;
m_engineQuery = 0;
emit enginesChanged(); emit enginesChanged();
} }

View File

@@ -53,6 +53,7 @@ class ClientProxy : public QObject
public: public:
static ClientProxy *instance(); static ClientProxy *instance();
QDeclarativeDebugExpressionQuery *setBindingForObject(int objectDebugId, QDeclarativeDebugExpressionQuery *setBindingForObject(int objectDebugId,
const QString &propertyName, const QString &propertyName,
const QVariant &value, const QVariant &value,