Qml Tooling: Fix debugging & profiling of .qml files loaded from resources

Don't expect that every url specifying a file is a local file url. Instead
let FileInProjectFinder handle urls with other schemes gracefully, too.

Change-Id: I72457d502ff1caf52f588e8ec41ab260882d1cf5
Reviewed-on: http://codereview.qt.nokia.com/1840
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Kai Koehne
2011-07-19 17:48:57 +02:00
parent ebf4212f71
commit 51a9ff7d4e
10 changed files with 51 additions and 47 deletions

View File

@@ -420,8 +420,7 @@ void QmlProfilerTool::gotoSourceLocation(const QString &fileUrl, int lineNumber)
if (lineNumber < 0 || fileUrl.isEmpty())
return;
const QString fileName = QUrl(fileUrl).toLocalFile();
const QString projectFileName = d->m_projectFinder.findFile(fileName);
const QString projectFileName = d->m_projectFinder.findFile(fileUrl);
Core::EditorManager *editorManager = Core::EditorManager::instance();
Core::IEditor *editor = editorManager->openEditor(projectFileName);