diff --git a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp index 3c0df2fa7b1..ae663c12f70 100644 --- a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp +++ b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp @@ -294,9 +294,8 @@ SideDiffEditorWidget::SideDiffEditorWidget(QWidget *parent) settings.m_highlightBlocks = false; SelectableTextEditorWidget::setDisplaySettings(settings); - BaseTextEditor *editor = this->editor(); - connect(editor, &BaseTextEditor::tooltipRequested, [this](BaseTextEditor *, const QPoint &point, int position) { - int block = textDocument()->document()->findBlock(position).blockNumber(); + connect(this, &BaseTextEditorWidget::tooltipRequested, [this](const QPoint &point, int position) { + int block = document()->findBlock(position).blockNumber(); auto it = m_fileInfo.constFind(block); if (it != m_fileInfo.constEnd()) ToolTip::show(point, TextContent(it.value().fileName), this);