forked from qt-creator/qt-creator
DiffEditor: Use new *EditorWidget signals for more direct connection
Change-Id: I664bb99d6c3aac870b3663069d4ca7379e1b9b63 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user