From 2b44c977ba13427f686adfe7116988acc6705171 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 1 Sep 2014 18:07:31 +0200 Subject: [PATCH] CppEditor: Replace two editor() self-checks with direct checks Change-Id: Ice47cc3ad86bd8d1fe6eaa812bf6fbb096fdd56c Reviewed-by: Fawzi Mohamed --- src/plugins/cppeditor/cppeditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 4c92db00c15..c17dff66f13 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -693,7 +693,7 @@ void CppEditorWidget::updateFunctionDeclDefLink() void CppEditorWidget::updateFunctionDeclDefLinkNow() { - if (Core::EditorManager::currentEditor() != editor()) + if (Core::EditorManager::currentEditor()->widget() != this) return; const Snapshot semanticSnapshot = d->m_lastSemanticInfo.snapshot; @@ -785,7 +785,7 @@ void CppEditorWidget::abortDeclDefLink() void CppEditorWidget::showPreProcessorWidget() { - const QString &fileName = editor()->document()->filePath(); + const QString &fileName = textDocument()->filePath(); // Check if this editor belongs to a project QList projectParts = d->m_modelManager->projectPart(fileName);