QmlObserver: Fix 'Apply Changes on Save' on Mac

Use the generic FileInProjectFinder instead of some homebrewn
matching algorithm (which didn't handle the case that on  Mac OS X,
files are copied to the app bundle).

Reviewed-by: Christiaan Janssen
Task-number: QTCREATORBUG-3188
This commit is contained in:
Kai Koehne
2011-04-08 11:54:17 +02:00
parent 26b28804a7
commit 986c9560e9
3 changed files with 4 additions and 38 deletions

View File

@@ -516,16 +516,7 @@ void ClientProxy::buildDebugIdHashRecursive(const QDeclarativeDebugObjectReferen
lineNum += rx.cap(3).toInt() - 1;
}
//convert the filename to a canonical filename in case of shadow build.
bool isShadowBuild = InspectorUi::instance()->isShadowBuildProject();
if (isShadowBuild && rev == 0) {
QString shadowBuildDir = InspectorUi::instance()->debugProjectBuildDirectory();
if (filename.startsWith(shadowBuildDir)) {
ProjectExplorer::Project *debugProject = InspectorUi::instance()->debugProject();
filename = debugProject->projectDirectory() + filename.mid(shadowBuildDir.length());
}
}
filename = InspectorUi::instance()->findFileInProject(filename);
// append the debug ids in the hash
m_debugIdHash[qMakePair<QString, int>(filename, rev)][qMakePair<int, int>(lineNum, colNum)].append(ref.debugId());