forked from qt-creator/qt-creator
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:
@@ -463,6 +463,10 @@ void QmlProfilerTool::gotoSourceLocation(const QString &fileUrl, int lineNumber)
|
||||
|
||||
const QString projectFileName = d->m_projectFinder.findFile(fileUrl);
|
||||
|
||||
QFileInfo fileInfo(projectFileName);
|
||||
if (!fileInfo.exists() || !fileInfo.isReadable())
|
||||
return;
|
||||
|
||||
Core::EditorManager *editorManager = Core::EditorManager::instance();
|
||||
Core::IEditor *editor = editorManager->openEditor(projectFileName);
|
||||
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor*>(editor);
|
||||
|
||||
Reference in New Issue
Block a user