Commit 5b30509a authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppEditor: Fix highlighting if there are unconfigured projects

If Creator switched to the Project mode on startup, the highlighting was
not started because the editor widget was not visible. Now we check if
the editor itself is or would be visible in the edit mode, which is
indepedent of the current mode.

Task-number: QTCREATORBUG-9260
Change-Id: I72373e09965fd1cded034ae4711df48798e7f0d8
Reviewed-by: default avatarErik Verbruggen <>
parent cacd6619
......@@ -31,6 +31,8 @@
#include "cppmodelmanager.h"
#include "cpplocalsymbols.h"
#include <coreplugin/editormanager/editormanager.h>
#include <utils/runextensions.h>
#include <QList>
......@@ -275,7 +277,9 @@ void CppEditorSupport::startHighlighting()
if (!m_highlightingSupport)
if (!m_textEditor->widget()->isVisible())
// Start highlighting only if the editor is or would be visible
// (in case another mode is active) in the edit mode.
if (!Core::EditorManager::instance()->visibleEditors().contains(m_textEditor))
if (m_highlightingSupport->requiresSemanticInfo()) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment