forked from qt-creator/qt-creator
ClangFormat: Change the logic how configuration is picked
Let's use by default the configuration that clang-format picks itself for the source file. The Qt Creator configuration will now only override the default one with global or project settings and can be turned off with the checkbox. This behavior is clearer than always picking some configuration which Qt Creator prefers best. Change-Id: If5ed3d67eb6b4b47a6d0fd5259f7efbb608914d1 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace ClangFormat {
|
||||
|
||||
class ClangFormatSettings
|
||||
@@ -43,10 +45,14 @@ public:
|
||||
|
||||
void setFormatOnSave(bool enable);
|
||||
bool formatOnSave() const;
|
||||
|
||||
void setOverrideDefaultFile(bool enable);
|
||||
bool overrideDefaultFile() const;
|
||||
private:
|
||||
bool m_formatCodeInsteadOfIndent = false;
|
||||
bool m_formatWhileTyping = false;
|
||||
bool m_formatOnSave = false;
|
||||
bool m_overrideDefaultFile = false;
|
||||
};
|
||||
|
||||
} // namespace ClangFormat
|
||||
|
||||
Reference in New Issue
Block a user