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())
|
if (!fileInfo.exists() || !fileInfo.isReadable())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IEditor *editor = EditorManager::openEditor(projectFileName);
|
// The text editors count columns starting with 0, but the ASTs store the
|
||||||
TextEditor::BaseTextEditor *textEditor = qobject_cast<TextEditor::BaseTextEditor*>(editor);
|
// location starting with 1, therefore the -1.
|
||||||
|
EditorManager::openEditorAt(projectFileName, lineNumber, columnNumber - 1, Id(),
|
||||||
if (textEditor) {
|
EditorManager::DoNotSwitchToDesignMode);
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerTool::updateTimeDisplay()
|
void QmlProfilerTool::updateTimeDisplay()
|
||||||
|
Reference in New Issue
Block a user