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;
|
settings.m_highlightBlocks = false;
|
||||||
SelectableTextEditorWidget::setDisplaySettings(settings);
|
SelectableTextEditorWidget::setDisplaySettings(settings);
|
||||||
|
|
||||||
BaseTextEditor *editor = this->editor();
|
connect(this, &BaseTextEditorWidget::tooltipRequested, [this](const QPoint &point, int position) {
|
||||||
connect(editor, &BaseTextEditor::tooltipRequested, [this](BaseTextEditor *, const QPoint &point, int position) {
|
int block = document()->findBlock(position).blockNumber();
|
||||||
int block = textDocument()->document()->findBlock(position).blockNumber();
|
|
||||||
auto it = m_fileInfo.constFind(block);
|
auto it = m_fileInfo.constFind(block);
|
||||||
if (it != m_fileInfo.constEnd())
|
if (it != m_fileInfo.constEnd())
|
||||||
ToolTip::show(point, TextContent(it.value().fileName), this);
|
ToolTip::show(point, TextContent(it.value().fileName), this);
|
||||||
|
|||||||
Reference in New Issue
Block a user