diff options
-rw-r--r-- | src/libs/qmljs/qmljsdelta.cpp | 3 | ||||
-rw-r--r-- | src/plugins/qmljsinspector/qmljsclientproxy.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/qmljs/qmljsdelta.cpp b/src/libs/qmljs/qmljsdelta.cpp index 6c71e3c5e7..6c44996264 100644 --- a/src/libs/qmljs/qmljsdelta.cpp +++ b/src/libs/qmljs/qmljsdelta.cpp @@ -363,7 +363,8 @@ void Delta::insert(UiObjectMember *member, UiObjectMember *parentMember, const Q importList << doc->source().mid(importBegin, importEnd - importBegin); } - QString filename = doc->fileName() + QLatin1Char('_') + QString::number(doc->editorRevision()) + // encode editorRevision, lineNumber in URL. See ClientProxy::buildDebugIdHashRecursive + QString filename = QLatin1String("file://") + doc->fileName() + QLatin1Char('_') + QString::number(doc->editorRevision()) + QLatin1Char(':') + QString::number(uiObjectDef->firstSourceLocation().startLine-importList.count()); foreach(DebugId debugId, debugReferences) { if (debugId != -1) { diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp index 3437a2728f..069378b6fc 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp +++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp @@ -410,7 +410,7 @@ void ClientProxy::buildDebugIdHashRecursive(const QDeclarativeDebugObjectReferen int rev = 0; // handle the case where the url contains the revision number encoded. (for object created by the debugger) - static QRegExp rx("^(.*)_(\\d+):(\\d+)$"); + static QRegExp rx("^file://(.*)_(\\d+):(\\d+)$"); if (rx.exactMatch(filename)) { filename = rx.cap(1); rev = rx.cap(2).toInt(); |