forked from qt-creator/qt-creator
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:
@@ -676,12 +676,8 @@ void InspectorUi::gotoObjectReferenceDefinition(const QDeclarativeDebugObjectRef
|
||||
}
|
||||
|
||||
QDeclarativeDebugFileReference source = obj.source();
|
||||
QString fileName = source.url().toLocalFile();
|
||||
|
||||
if (source.lineNumber() < 0 || !QFile::exists(fileName))
|
||||
return;
|
||||
|
||||
fileName = m_projectFinder.findFile(fileName);
|
||||
const QString fileName = m_projectFinder.findFile(source.url());
|
||||
|
||||
Core::EditorManager *editorManager = Core::EditorManager::instance();
|
||||
Core::IEditor *currentEditor = editorManager->currentEditor();
|
||||
@@ -789,9 +785,9 @@ InspectorUi *InspectorUi::instance()
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
QString InspectorUi::findFileInProject(const QString &originalPath) const
|
||||
QString InspectorUi::findFileInProject(const QUrl &url) const
|
||||
{
|
||||
return m_projectFinder.findFile(originalPath);
|
||||
return m_projectFinder.findFile(url);
|
||||
}
|
||||
|
||||
void InspectorUi::setApplyChangesToQmlInspector(bool applyChanges)
|
||||
|
||||
Reference in New Issue
Block a user