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

@@ -46,6 +46,7 @@
#include <projectexplorer/session.h>
#include <projectexplorer/target.h>
#include <texteditor/icodestylepreferences.h>
#include <texteditor/texteditorsettings.h>
#include <clang/Format/Format.h>
@@ -71,8 +72,8 @@ ClangFormatPlugin::~ClangFormatPlugin() = default;
class ClangFormatStyleFactory : public CppTools::CppCodeStylePreferencesFactory
{
public:
QWidget *createCodeStyleEditor(TextEditor::ICodeStylePreferences *,
QWidget *parent = nullptr) override
TextEditor::CodeStyleEditorWidget *createCodeStyleEditor(
TextEditor::ICodeStylePreferences *preferences, QWidget *parent = nullptr) override
{
if (!parent)
return new ClangFormatConfigWidget;