From ab7b749be150663bcc932e8132484aa03b4538bc Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Wed, 9 Nov 2011 11:01:03 +0100 Subject: [PATCH] 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 --- src/plugins/qmlprofiler/qmlprofilertool.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index cd57e12f04a..6655e4239ed 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -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(editor);