ClangFormat: Fix applying global settings

The actual apply() method was never called for the widget.

Change-Id: Idff194a36591db437cbe5695377005ed5a0b25d4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2019-01-22 14:16:30 +01:00
parent 020d1aab0a
commit 2e19352177
11 changed files with 47 additions and 27 deletions

View File

@@ -556,6 +556,8 @@ void CppCodeStyleSettingsPage::apply()
originalCppCodeStylePreferences->setCurrentDelegate(m_pageCppCodeStylePreferences->currentDelegate());
originalCppCodeStylePreferences->toSettings(QLatin1String(CppTools::Constants::CPP_SETTINGS_ID), s);
}
m_widget->apply();
}
}

View File

@@ -30,6 +30,7 @@
#include "cppcodeformatter.h"
#include <coreplugin/dialogs/ioptionspage.h>
#include <texteditor/icodestylepreferencesfactory.h>
#include <QWidget>
#include <QPointer>
@@ -37,7 +38,6 @@
namespace TextEditor {
class FontSettings;
class TabSettings;
class ICodeStylePreferences;
class SnippetEditorWidget;
class CodeStyleEditor;
}
@@ -91,7 +91,7 @@ public:
private:
CppCodeStylePreferences *m_pageCppCodeStylePreferences = nullptr;
QPointer<QWidget> m_widget;
QPointer<TextEditor::CodeStyleEditorWidget> m_widget;
};
} // namespace Internal