Skip to content
Snippets Groups Projects
Commit eb44801b authored by Olivier Goffart's avatar Olivier Goffart
Browse files

QmlJs Live preview: Fixed a bug that lead an object to be associated with 2 debug id.

If an object is created at the same location of another old object,
It could be matched.
parent fc1006e2
No related branches found
No related tags found
No related merge requests found
......@@ -118,7 +118,7 @@ void MapObjectWithDebugReference::processRecursive(const QDeclarativeDebugObject
SourceLocation loc = ast->firstSourceLocation();
if (object.source().columnNumber() == int(loc.startColumn)) {
QString objectFileName = object.source().url().toLocalFile();
if (object.source().lineNumber() == int(loc.startLine) && objectFileName == filename) {
if (!doc && object.source().lineNumber() == int(loc.startLine) && objectFileName == filename) {
result[ast] += object.debugId();
} else if (doc && objectFileName.startsWith(filename + QLatin1Char('_') + QString::number(doc->editorRevision()) + QLatin1Char(':'))) {
bool ok;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment