CppEditor: Replace two editor() self-checks with direct checks

Change-Id: Ice47cc3ad86bd8d1fe6eaa812bf6fbb096fdd56c
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
hjk
2014-09-01 18:07:31 +02:00
parent 0102455fd0
commit 2b44c977ba

View File

@@ -693,7 +693,7 @@ void CppEditorWidget::updateFunctionDeclDefLink()
void CppEditorWidget::updateFunctionDeclDefLinkNow() void CppEditorWidget::updateFunctionDeclDefLinkNow()
{ {
if (Core::EditorManager::currentEditor() != editor()) if (Core::EditorManager::currentEditor()->widget() != this)
return; return;
const Snapshot semanticSnapshot = d->m_lastSemanticInfo.snapshot; const Snapshot semanticSnapshot = d->m_lastSemanticInfo.snapshot;
@@ -785,7 +785,7 @@ void CppEditorWidget::abortDeclDefLink()
void CppEditorWidget::showPreProcessorWidget() void CppEditorWidget::showPreProcessorWidget()
{ {
const QString &fileName = editor()->document()->filePath(); const QString &fileName = textDocument()->filePath();
// Check if this editor belongs to a project // Check if this editor belongs to a project
QList<ProjectPart::Ptr> projectParts = d->m_modelManager->projectPart(fileName); QList<ProjectPart::Ptr> projectParts = d->m_modelManager->projectPart(fileName);