Merge BaseTextEditorWidget::editorDocument() and ::baseTextDocument()

Doesn't really make sense to have the additional IDocument *editorDocument()
method.

Change-Id: I0a7420eb1afaa76f63c3f7e9c4b373acf624ffb9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2013-12-12 15:07:54 +01:00
parent e035ae6df1
commit 1adab4c4cc
24 changed files with 53 additions and 61 deletions

View File

@@ -544,7 +544,7 @@ BaseTextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &
}
// Now we prefer the doc from the snapshot with macros expanded.
Document::Ptr doc = snapshot.document(m_widget->editorDocument()->filePath());
Document::Ptr doc = snapshot.document(m_widget->baseTextDocument()->filePath());
if (!doc) {
doc = documentFromSemanticInfo;
if (!doc)
@@ -639,7 +639,7 @@ BaseTextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &
if (Symbol *d = r.declaration()) {
if (d->isDeclaration() || d->isFunction()) {
const QString fileName = QString::fromUtf8(d->fileName(), d->fileNameLength());
if (m_widget->editorDocument()->filePath() == fileName) {
if (m_widget->baseTextDocument()->filePath() == fileName) {
if (unsigned(lineNumber) == d->line()
&& unsigned(positionInBlock) >= d->column()) { // TODO: check the end
result = r; // take the symbol under cursor.