From 8bed00ab34e31f2b9c70026d418d923913325798 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Mon, 22 Feb 2021 17:38:09 +0200 Subject: Run clang-format on all cpp/h files NO_CHANGELOG --- src/kconfig_compiler/KConfigCodeGeneratorBase.cpp | 30 ++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'src/kconfig_compiler/KConfigCodeGeneratorBase.cpp') diff --git a/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp b/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp index 3f308cbb..27a96488 100644 --- a/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp +++ b/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp @@ -13,21 +13,24 @@ #include "KConfigCodeGeneratorBase.h" -#include #include +#include -#include #include +#include #include -KConfigCodeGeneratorBase::KConfigCodeGeneratorBase( - const QString &inputFile, - const QString &baseDir, - const QString &fileName, - const KConfigParameters ¶meters, - ParseResult &parseResult) - : parseResult(parseResult), m_inputFile(inputFile), m_baseDir(baseDir), m_fileName(fileName), m_cfg(parameters) +KConfigCodeGeneratorBase::KConfigCodeGeneratorBase(const QString &inputFile, + const QString &baseDir, + const QString &fileName, + const KConfigParameters ¶meters, + ParseResult &parseResult) + : parseResult(parseResult) + , m_inputFile(inputFile) + , m_baseDir(baseDir) + , m_fileName(fileName) + , m_cfg(parameters) { m_file.setFileName(m_fileName); if (!m_file.open(QIODevice::WriteOnly)) { @@ -54,7 +57,7 @@ void KConfigCodeGeneratorBase::save() m_file.close(); } -//TODO: Remove this weird logic and adapt the testcases +// TODO: Remove this weird logic and adapt the testcases void KConfigCodeGeneratorBase::indent() { if (m_indentLevel >= 4) { @@ -102,7 +105,8 @@ void KConfigCodeGeneratorBase::endScope(ScopeFinalizer finalizer) void KConfigCodeGeneratorBase::start() { const QString m_fileName = QFileInfo(m_inputFile).fileName(); - m_stream << "// This file is generated by kconfig_compiler_kf5 from " << m_fileName << ".kcfg" << ".\n"; + m_stream << "// This file is generated by kconfig_compiler_kf5 from " << m_fileName << ".kcfg" + << ".\n"; m_stream << "// All changes you do to this file will be lost.\n"; } @@ -214,7 +218,6 @@ void KConfigCodeGeneratorBase::createIfSetLogic(const CfgEntry *e, const QString void KConfigCodeGeneratorBase::memberMutatorBody(const CfgEntry *e) { - // HACK: Don't open '{' manually, use startScope / endScope to automatically handle whitespace indentation. if (!e->min.isEmpty()) { if (e->min != QLatin1String("0") || !isUnsigned(e->type)) { // skip writing "if uint<0" (#187579) @@ -254,8 +257,7 @@ void KConfigCodeGeneratorBase::memberMutatorBody(const CfgEntry *e) if (signal.modify) { m_stream << whitespace() << " Q_EMIT " << m_this << signal.name << "();\n"; } else { - m_stream << whitespace() << " " << m_this << varPath(QStringLiteral("settingsChanged"), m_cfg) - << " |= " << signalEnumName(signal.name) << ";\n"; + m_stream << whitespace() << " " << m_this << varPath(QStringLiteral("settingsChanged"), m_cfg) << " |= " << signalEnumName(signal.name) << ";\n"; } } if (hasBody) { -- cgit v1.2.1