Beautifier: Remove inner namespace level

And inline non-shared object id.

I regularly stumble over this speciality when doing mass refactorings
in the code base and I believe the extra benefit this namespace level
has does not outweigh it.

Change-Id: I3694a656f1095dcb5509b212b9e1d25ae5c8b5ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-06-17 08:33:53 +02:00
parent e064100007
commit c9a7a3a2d3
25 changed files with 44 additions and 107 deletions

View File

@@ -36,17 +36,15 @@
namespace Beautifier {
namespace Internal {
namespace ClangFormat {
namespace {
const char USE_PREDEFINED_STYLE[] = "usePredefinedStyle";
const char PREDEFINED_STYLE[] = "predefinedStyle";
const char FALLBACK_STYLE[] = "fallbackStyle";
const char CUSTOM_STYLE[] = "customStyle";
}
const char SETTINGS_NAME[] = "clangformat";
ClangFormatSettings::ClangFormatSettings() :
AbstractSettings(Constants::ClangFormat::SETTINGS_NAME, ".clang-format")
AbstractSettings(SETTINGS_NAME, ".clang-format")
{
setCommand("clang-format");
m_settings.insert(USE_PREDEFINED_STYLE, QVariant(true));
@@ -60,7 +58,7 @@ QString ClangFormatSettings::documentationFilePath() const
{
return Core::ICore::userResourcePath() + '/' + Beautifier::Constants::SETTINGS_DIRNAME + '/'
+ Beautifier::Constants::DOCUMENTATION_DIRNAME + '/'
+ Constants::ClangFormat::SETTINGS_NAME + ".xml";
+ SETTINGS_NAME + ".xml";
}
void ClangFormatSettings::createDocumentationFile() const
@@ -238,6 +236,5 @@ void ClangFormatSettings::readStyles()
}
}
} // namespace ClangFormat
} // namespace Internal
} // namespace Beautifier