From 3aebcdc5401e60173f5a48d2e6e5ce64ed1fc782 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 17 Nov 2014 19:12:44 +0100 Subject: [PATCH] QmlProfiler: Don't switch to designer when clicking on events We want to only navigate the text editor when browsing through profile data. Change-Id: I2156b9853a6a1547a52c491ea021a68ca4f6dde9 Task-number: QTCREATORBUG-13433 Reviewed-by: Eike Ziller --- src/plugins/qmlprofiler/qmlprofilertool.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 5da9e75a7d4..eddf8abbe5a 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -375,16 +375,10 @@ void QmlProfilerTool::gotoSourceLocation(const QString &fileUrl, int lineNumber, if (!fileInfo.exists() || !fileInfo.isReadable()) return; - IEditor *editor = EditorManager::openEditor(projectFileName); - TextEditor::BaseTextEditor *textEditor = qobject_cast(editor); - - if (textEditor) { - EditorManager::addCurrentPositionToNavigationHistory(); - // textEditor counts columns starting with 0, but the ASTs store the - // location starting with 1, therefore the -1 in the call to gotoLine - textEditor->gotoLine(lineNumber, columnNumber - 1); - textEditor->widget()->setFocus(); - } + // The text editors count columns starting with 0, but the ASTs store the + // location starting with 1, therefore the -1. + EditorManager::openEditorAt(projectFileName, lineNumber, columnNumber - 1, Id(), + EditorManager::DoNotSwitchToDesignMode); } void QmlProfilerTool::updateTimeDisplay()