forked from qt-creator/qt-creator
QmlJsDelta: support for resetting property
... with a little bit of refactoring. But for some reason it does not seem to have an effect
This commit is contained in:
@@ -286,23 +286,34 @@ bool ClientProxy::setBindingForObject(int objectDebugId,
|
||||
const QVariant &value,
|
||||
bool isLiteralValue)
|
||||
{
|
||||
if (propertyName == QLatin1String("id") || objectDebugId == -1)
|
||||
qDebug() << "setBindingForObject():" << objectDebugId << propertyName << value;
|
||||
if (objectDebugId == -1)
|
||||
return false;
|
||||
|
||||
// qDebug() << "setBindingForObject():" << objectDebugId << propertyName << value << "isLiteral:" << isLiteralValue;
|
||||
if (propertyName == QLatin1String("id"))
|
||||
return false; // Crashes the QMLViewer.
|
||||
|
||||
return m_client->setBindingForObject(objectDebugId, propertyName, value.toString(), isLiteralValue);
|
||||
}
|
||||
|
||||
bool ClientProxy::setMethodBodyForObject(int objectDebugId, const QString &methodName, const QString &methodBody)
|
||||
{
|
||||
qDebug() << "setMethodBodyForObject():" << objectDebugId << methodName << methodBody;
|
||||
if (objectDebugId == -1)
|
||||
return 0;
|
||||
|
||||
// qDebug() << "setMethodBodyForObject():" << objectDebugId << methodName;
|
||||
return m_client->setMethodBody(objectDebugId, methodName, methodBody);
|
||||
}
|
||||
|
||||
bool ClientProxy::resetBindingForObject(int objectDebugId, const QString& propertyName)
|
||||
{
|
||||
qDebug() << "resetBindingForObject():" << objectDebugId << propertyName;
|
||||
if (objectDebugId == -1)
|
||||
return false;
|
||||
// if (propertyName == QLatin1String("id")) return false;
|
||||
return m_client->resetBindingForObject(objectDebugId, propertyName);
|
||||
}
|
||||
|
||||
|
||||
void ClientProxy::queryEngineContext(int id)
|
||||
{
|
||||
if (id < 0)
|
||||
|
||||
Reference in New Issue
Block a user