forked from qt-creator/qt-creator
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:
@@ -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<ProjectPart::Ptr> projectParts = d->m_modelManager->projectPart(fileName);
|
||||
|
||||
Reference in New Issue
Block a user