forked from qt-creator/qt-creator
QmlDebugger: adding slots to items in Live Preview
Reviewed-by: Kai Koehne
This commit is contained in:
@@ -250,7 +250,9 @@ QList<QDeclarativeDebugObjectReference> ClientProxy::objectReferences(const QDec
|
||||
bool ClientProxy::setBindingForObject(int objectDebugId,
|
||||
const QString &propertyName,
|
||||
const QVariant &value,
|
||||
bool isLiteralValue)
|
||||
bool isLiteralValue,
|
||||
QString source,
|
||||
int line)
|
||||
{
|
||||
if (objectDebugId == -1)
|
||||
return false;
|
||||
@@ -263,7 +265,7 @@ bool ClientProxy::setBindingForObject(int objectDebugId,
|
||||
|
||||
log(LogSend, QString("SET_BINDING %1 %2 %3 %4").arg(QString::number(objectDebugId), propertyName, value.toString(), QString(isLiteralValue ? "true" : "false")));
|
||||
|
||||
bool result = m_engineClient->setBindingForObject(objectDebugId, propertyName, value.toString(), isLiteralValue);
|
||||
bool result = m_engineClient->setBindingForObject(objectDebugId, propertyName, value.toString(), isLiteralValue, source, line);
|
||||
|
||||
if (!result)
|
||||
log(LogSend, QString("failed!"));
|
||||
|
||||
@@ -62,7 +62,9 @@ public:
|
||||
bool setBindingForObject(int objectDebugId,
|
||||
const QString &propertyName,
|
||||
const QVariant &value,
|
||||
bool isLiteralValue);
|
||||
bool isLiteralValue,
|
||||
QString source,
|
||||
int line);
|
||||
|
||||
bool setMethodBodyForObject(int objectDebugId, const QString &methodName, const QString &methodBody);
|
||||
bool resetBindingForObject(int objectDebugId, const QString &propertyName);
|
||||
|
||||
@@ -463,7 +463,7 @@ protected:
|
||||
if (isLiteral)
|
||||
expr = castToLiteral(scriptCode, scriptBinding);
|
||||
appliedChangesToViewer = true;
|
||||
m_clientProxy->setBindingForObject(debugId, propertyName, expr, isLiteral);
|
||||
m_clientProxy->setBindingForObject(debugId, propertyName, expr, isLiteral, document()->fileName(), scriptBinding->firstSourceLocation().startLine);
|
||||
}
|
||||
|
||||
virtual void resetBindingForObject(int debugId, const QString &propertyName)
|
||||
|
||||
Reference in New Issue
Block a user