Commit 747b34c3 authored by hjk's avatar hjk
Browse files

DiffEditor: Use new *EditorWidget signals for more direct connection



Change-Id: I664bb99d6c3aac870b3663069d4ca7379e1b9b63
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 4beb3bd9
......@@ -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);
......
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