QmlProfiler: manage external tracefiles nicely

When inspecting a trace from an external project
where the source files are not available
avoid displaying error messages continuously

Change-Id: I4dad291092130b0132a338740a54c506edd67161
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2011-11-09 11:01:03 +01:00
parent 412e61d2c2
commit ab7b749be1

View File

@@ -463,6 +463,10 @@ void QmlProfilerTool::gotoSourceLocation(const QString &fileUrl, int lineNumber)
const QString projectFileName = d->m_projectFinder.findFile(fileUrl); const QString projectFileName = d->m_projectFinder.findFile(fileUrl);
QFileInfo fileInfo(projectFileName);
if (!fileInfo.exists() || !fileInfo.isReadable())
return;
Core::EditorManager *editorManager = Core::EditorManager::instance(); Core::EditorManager *editorManager = Core::EditorManager::instance();
Core::IEditor *editor = editorManager->openEditor(projectFileName); Core::IEditor *editor = editorManager->openEditor(projectFileName);
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor*>(editor); TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor*>(editor);