diff options
author | Laurent Montel <montel@kde.org> | 2020-01-24 08:02:19 +0100 |
---|---|---|
committer | Laurent Montel <montel@kde.org> | 2020-01-24 08:02:19 +0100 |
commit | e83c46c222095265080eb50b32d69a24297e9310 (patch) | |
tree | 50db023c4e1cc51c1b7353939aa8fa1308e37ba0 /src/kconfig_compiler/KConfigHeaderGenerator.cpp | |
parent | dbcbf1943f2f4a5f05afa687af8afe3f005bf938 (diff) | |
download | kconfig-e83c46c222095265080eb50b32d69a24297e9310.tar.gz kconfig-e83c46c222095265080eb50b32d69a24297e9310.tar.bz2 |
Port endl to \n as it's qt namespaced.
Port "dec"/"hex" as it's Qt namespaced too
Diffstat (limited to 'src/kconfig_compiler/KConfigHeaderGenerator.cpp')
-rw-r--r-- | src/kconfig_compiler/KConfigHeaderGenerator.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/kconfig_compiler/KConfigHeaderGenerator.cpp b/src/kconfig_compiler/KConfigHeaderGenerator.cpp index 47f5358e..5b828ec8 100644 --- a/src/kconfig_compiler/KConfigHeaderGenerator.cpp +++ b/src/kconfig_compiler/KConfigHeaderGenerator.cpp @@ -255,7 +255,14 @@ void KConfigHeaderGenerator::createSignals() // a last comma, as it's valid c++. for (int i = 0, end = parseResult.signalList.size(); i < end; i++) { auto signal = parseResult.signalList.at(i); - stream() << whitespace() << " " << signalEnumName(signal.name) << " = 0x" << hex << val; + stream() << whitespace() << " " << signalEnumName(signal.name) << " = 0x" + << + #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0)) + hex + #else + Qt::hex + #endif + << val; if (i != end-1) { stream() << ",\n"; } @@ -263,7 +270,14 @@ void KConfigHeaderGenerator::createSignals() val <<= 1; } stream() << '\n'; - stream() << whitespace() << "};" << dec << "\n\n"; + stream() << whitespace() << "};" + << + #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0)) + dec + #else + Qt::dec + #endif + << "\n\n"; stream() << " Q_SIGNALS:"; for (const Signal &signal : parseResult.signalList) { @@ -495,7 +509,7 @@ void KConfigHeaderGenerator::createItemAcessors(const CfgEntry *entry, const QSt stream() << ";\n"; } - stream() <<endl; + stream() << '\n'; } void KConfigHeaderGenerator::createDefaultValueMember(const CfgEntry *entry) |