aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangformat/clangformatutils.h
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2018-11-08 10:35:23 +0100
committerIvan Donchevskii <ivan.donchevskii@qt.io>2018-11-08 14:23:06 +0000
commit0e5c7f51fa88f8df0061ae6c8e43a7a0e143d552 (patch)
tree88c12e554bf11e8e913f68dfc90a49dbe47380b9 /src/plugins/clangformat/clangformatutils.h
parent3de607f4e03dce5f60570835ecaf3babb780db17 (diff)
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>
Diffstat (limited to 'src/plugins/clangformat/clangformatutils.h')
-rw-r--r--src/plugins/clangformat/clangformatutils.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/plugins/clangformat/clangformatutils.h b/src/plugins/clangformat/clangformatutils.h
index ad4e21f889..8634685971 100644
--- a/src/plugins/clangformat/clangformatutils.h
+++ b/src/plugins/clangformat/clangformatutils.h
@@ -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;
-
- 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();
- }
-}
+void createStyleFileIfNeeded(Utils::FileName styleConfigPath, bool isGlobal);
+
+clang::format::FormatStyle currentProjectStyle();
+clang::format::FormatStyle currentGlobalStyle();
+
+Utils::FileName currentStyleConfigPath();
+clang::format::FormatStyle currentStyle();
}