TextEditor: Merge BaseTextEditorDocument into BaseTextDocument

That was the only user of that layer of abstraction.

Change-Id: I2bdc4abb8b2b33bfb70398dd11f7ecc4745ddc43
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
hjk
2014-07-25 14:54:10 +02:00
parent f3f40b14de
commit adfb30743d
12 changed files with 56 additions and 70 deletions

View File

@@ -1054,8 +1054,8 @@ void CPPEditorWidget::onFunctionDeclDefLinkFound(QSharedPointer<FunctionDeclDefL
Core::IDocument *targetDocument
= Core::DocumentModel::documentForFilePath( d->m_declDefLink->targetFile->fileName());
if (baseTextDocument() != targetDocument) {
if (TextEditor::BaseTextEditorDocument *textEditorDocument = qobject_cast<TextEditor::BaseTextEditorDocument *>(targetDocument))
connect(textEditorDocument, SIGNAL(contentsChanged()),
if (auto textDocument = qobject_cast<TextEditor::BaseTextDocument *>(targetDocument))
connect(textDocument, SIGNAL(contentsChanged()),
this, SLOT(abortDeclDefLink()));
}
@@ -1103,8 +1103,8 @@ void CPPEditorWidget::abortDeclDefLink()
Core::IDocument *targetDocument
= Core::DocumentModel::documentForFilePath(d->m_declDefLink->targetFile->fileName());
if (baseTextDocument() != targetDocument) {
if (TextEditor::BaseTextEditorDocument *textEditorDocument = qobject_cast<TextEditor::BaseTextEditorDocument *>(targetDocument))
disconnect(textEditorDocument, SIGNAL(contentsChanged()),
if (auto textDocument = qobject_cast<TextEditor::BaseTextDocument *>(targetDocument))
disconnect(textDocument, SIGNAL(contentsChanged()),
this, SLOT(abortDeclDefLink()));
}