forked from qt-creator/qt-creator
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 <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user