forked from qt-creator/qt-creator
ClangFormat: Synchronize with C++ code style settings
And remove UI for default code style settings because it does not affect anything when ClangFormat plugin is enabled. Change-Id: Ie348b7d2691b09ea2b4868da987f2a27347ea0f3 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -34,18 +34,12 @@
|
||||
|
||||
namespace ClangFormat {
|
||||
|
||||
inline void createStyleFileIfNeeded(Utils::FileName styleConfigPath)
|
||||
{
|
||||
const QString configFile = styleConfigPath.appendPath(".clang-format").toString();
|
||||
if (QFile::exists(configFile))
|
||||
return;
|
||||
void createStyleFileIfNeeded(Utils::FileName styleConfigPath, bool isGlobal);
|
||||
|
||||
clang::format::FormatStyle newStyle = clang::format::getLLVMStyle();
|
||||
std::fstream newStyleFile(configFile.toStdString(), std::fstream::out);
|
||||
if (newStyleFile.is_open()) {
|
||||
newStyleFile << clang::format::configurationAsText(newStyle);
|
||||
newStyleFile.close();
|
||||
}
|
||||
}
|
||||
clang::format::FormatStyle currentProjectStyle();
|
||||
clang::format::FormatStyle currentGlobalStyle();
|
||||
|
||||
Utils::FileName currentStyleConfigPath();
|
||||
clang::format::FormatStyle currentStyle();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user