Commit 7702ad52 authored by Eike Ziller's avatar Eike Ziller

Project editor settings: apply to all editors

It was only applying the settings to one of the open editors in case of
splits.

Task-number: QTCREATORBUG-9825
Change-Id: Iaa9b92d33f2531e7c5d053270f354f052160acd8
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 890bb77f
......@@ -249,7 +249,8 @@ void EditorConfiguration::setUseGlobalSettings(bool use)
d->m_defaultCodeStyle->setCurrentDelegate(d->m_useGlobal
? TextEditorSettings::instance()->codeStyle() : 0);
const SessionManager *session = ProjectExplorerPlugin::instance()->session();
QList<Core::IEditor *> opened = Core::EditorManager::instance()->openedEditors();
QList<Core::IEditor *> opened = Core::EditorManager::documentModel()->editorsForDocuments(
Core::EditorManager::documentModel()->openedDocuments());
foreach (Core::IEditor *editor, opened) {
if (BaseTextEditorWidget *baseTextEditor = qobject_cast<BaseTextEditorWidget *>(editor->widget())) {
Project *project = session->projectForFile(editor->document()->filePath());
......
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