QmlJsDelta: When coputing the debug ids, we need to do it on the original document.

Else, the line numbers does not match anymore.
This commit is contained in:
Olivier Goffart
2010-07-16 16:37:40 +02:00
parent 4b504323ec
commit c1d681811a
5 changed files with 22 additions and 7 deletions

View File

@@ -280,6 +280,9 @@ static QString _methodName(UiSourceElement *source)
void Delta::insert(UiObjectMember *member, UiObjectMember *parentMember, const QList<QDeclarativeDebugObjectReference > &debugReferences, const Document::Ptr &doc)
{
if (doNotSendChanges)
return;
if (!member || !parentMember)
return;
@@ -311,6 +314,9 @@ void QmlJSInspector::Internal::Delta::update(UiObjectDefinition* oldObject, cons
UiObjectDefinition* newObject, const QmlJS::Document::Ptr& newDoc,
const QList< QDeclarativeDebugObjectReference >& debugReferences)
{
if (doNotSendChanges)
return;
Q_ASSERT (oldObject && newObject);
QSet<QString> presentBinding;
@@ -372,6 +378,10 @@ void QmlJSInspector::Internal::Delta::update(UiObjectDefinition* oldObject, cons
}
}
if (doNotSendChanges)
return;
//reset property that are not present in the new object.
for (UiObjectMemberList *previousObjectMemberIt = Delta::objectMembers(oldObject); previousObjectMemberIt; previousObjectMemberIt = previousObjectMemberIt->next) {
if (UiScriptBinding *previousScript = cast<UiScriptBinding *>(previousObjectMemberIt->member)) {
@@ -562,6 +572,8 @@ void Delta::updateScriptBinding(const QDeclarativeDebugObjectReference &objectRe
const QString &propertyName,
const QString &scriptCode)
{
if (doNotSendChanges)
return;
QVariant expr = scriptCode;
const bool isLiteral = isLiteralValue(scriptBinding);