CPlusPlus::Overview CppCodeStyleSettings::currentProjectCodeStyleOverview() { ProjectExplorer::Project *project = ProjectExplorer::ProjectExplorerPlugin::currentProject(); if (! project) return currentGlobalCodeStyleOverview(); ProjectExplorer::EditorConfiguration *editorConfiguration = project->editorConfiguration(); QTC_ASSERT(editorConfiguration, return currentGlobalCodeStyleOverview()); TextEditor::ICodeStylePreferences *codeStylePreferences = editorConfiguration->codeStyle(Constants::CPP_SETTINGS_ID); QTC_ASSERT(codeStylePreferences, return currentGlobalCodeStyleOverview()); CppCodeStylePreferences *cppCodeStylePreferences = dynamic_cast<CppCodeStylePreferences *>(codeStylePreferences); QTC_ASSERT(cppCodeStylePreferences, return currentGlobalCodeStyleOverview()); CppCodeStyleSettings settings = cppCodeStylePreferences->currentCodeStyleSettings(); CPlusPlus::Overview overview; configureOverviewWithCodeStyleSettings(overview, settings); return overview; }