Commit e4349694 authored by Christian Kamm's avatar Christian Kamm

C++ function link: Unbreak same-file links.

Change-Id: Icfb71278c796dfb8668de423a691c7dc90e9531f
Reviewed-on: http://codereview.qt.nokia.com/3170Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
parent f63a969c
......@@ -2306,7 +2306,7 @@ void CPPEditorWidget::onFunctionDeclDefLinkFound(QSharedPointer<FunctionDeclDefL
// disable the link if content of the target editor changes
TextEditor::BaseTextEditorWidget *targetEditor =
TextEditor::RefactoringChanges::editorForFile(link->targetFile->fileName());
if (targetEditor) {
if (targetEditor && targetEditor != this) {
connect(targetEditor, SIGNAL(textChanged()),
this, SLOT(abortDeclDefLink()));
}
......@@ -2329,7 +2329,7 @@ void CPPEditorWidget::abortDeclDefLink()
// undo connect from onFunctionDeclDefLinkFound
TextEditor::BaseTextEditorWidget *targetEditor =
TextEditor::RefactoringChanges::editorForFile(m_declDefLink->targetFile->fileName());
if (targetEditor) {
if (targetEditor && targetEditor != this) {
disconnect(targetEditor, SIGNAL(textChanged()),
this, SLOT(abortDeclDefLink()));
}
......
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