Commit 3aebcdc5 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

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: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 8b57492f
......@@ -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<TextEditor::BaseTextEditor*>(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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment