forked from qt-creator/qt-creator
C++ function link: Unbreak same-file links.
Change-Id: Icfb71278c796dfb8668de423a691c7dc90e9531f Reviewed-on: http://codereview.qt.nokia.com/3170 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user