From 560ad70aeb685c7ec30fa3730ea2de1db15524f5 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Wed, 11 Dec 2024 02:24:17 -0600 Subject: [PATCH 1/9] Allow for optional items in unpackfs --- src/modules/unpackfs/main.py | 15 +++++++++++---- src/modules/unpackfs/unpackfs.conf | 12 ++++++++++++ src/modules/unpackfs/unpackfs.schema.yaml | 1 + 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index a6a84c3d4..fdb4fc9a8 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -48,7 +48,7 @@ class UnpackEntry: :param destination: """ __slots__ = ('source', 'sourcefs', 'destination', 'copied', 'total', 'exclude', 'excludeFile', - 'mountPoint', 'weight', 'condition') + 'mountPoint', 'weight', 'condition', 'optional') def __init__(self, source, sourcefs, destination): """ @@ -72,6 +72,7 @@ class UnpackEntry: self.mountPoint = None self.weight = 1 self.condition = True + self.optional = False def is_file(self): return self.sourcefs == "file" @@ -461,6 +462,7 @@ def run(): for entry in libcalamares.job.configuration["unpack"]: source = os.path.abspath(entry["source"]) sourcefs = entry["sourcefs"] + optional = entry.get("optional", False) if sourcefs not in supported_filesystems: libcalamares.utils.warning("The filesystem for \"{}\" ({}) is not supported by your current kernel".format(source, sourcefs)) @@ -468,9 +470,14 @@ def run(): return (_("Bad unpackfs configuration"), _("The filesystem for \"{}\" ({}) is not supported by your current kernel").format(source, sourcefs)) if not os.path.exists(source): - libcalamares.utils.warning("The source filesystem \"{}\" does not exist".format(source)) - return (_("Bad unpackfs configuration"), - _("The source filesystem \"{}\" does not exist").format(source)) + if optional: + libcalamares.utils.warning("The source filesystem \"{}\" does not exist but is marked as optional, skipping".format(source)) + entry["condition"] = False + continue + else: + libcalamares.utils.warning("The source filesystem \"{}\" does not exist".format(source)) + return (_("Bad unpackfs configuration"), + _("The source filesystem \"{}\" does not exist").format(source)) if sourcefs == "squashfs": if shutil.which("unsquashfs") is None: libcalamares.utils.warning("Failed to find unsquashfs") diff --git a/src/modules/unpackfs/unpackfs.conf b/src/modules/unpackfs/unpackfs.conf index 42f3a943d..1576fa7f3 100644 --- a/src/modules/unpackfs/unpackfs.conf +++ b/src/modules/unpackfs/unpackfs.conf @@ -102,6 +102,18 @@ # sourcefs: squashfs # destination: "" # condition: exampleGlobalStorageVariable.subkey +# +# You may also wish to include optional squashfses, which may not exist at certain times +# depending on your image tooling. If an optional squashfs is not found, it is simply +# skipped. +# +# - source: ./example.standard.sqfs +# sourcefs: squashfs +# destination: "" +# - source: ./example.extras.sqfs +# sourcefs: squashfs +# destination: "" +# optional: true unpack: - source: ../CHANGES diff --git a/src/modules/unpackfs/unpackfs.schema.yaml b/src/modules/unpackfs/unpackfs.schema.yaml index 03faa9440..9dc53c446 100644 --- a/src/modules/unpackfs/unpackfs.schema.yaml +++ b/src/modules/unpackfs/unpackfs.schema.yaml @@ -18,6 +18,7 @@ properties: excludeFile: { type: string } exclude: { type: array, items: { type: string } } weight: { type: integer, exclusiveMinimum: 0 } + optional: { type: boolean } condition: anyOf: - type: boolean From b6b09d0bc269c9106a59006923f8960569771524 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 21 Dec 2024 10:04:22 +0100 Subject: [PATCH 2/9] [libcalamares] Use Qt helper macros for compiler warnings --- src/libcalamares/python/Pybind11Helpers.h | 31 ++++++++++------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/libcalamares/python/Pybind11Helpers.h b/src/libcalamares/python/Pybind11Helpers.h index 0bc2272c6..f222f4965 100644 --- a/src/libcalamares/python/Pybind11Helpers.h +++ b/src/libcalamares/python/Pybind11Helpers.h @@ -14,20 +14,18 @@ #include -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wcovered-switch-default" -#pragma clang diagnostic ignored "-Wfloat-equal" -#pragma clang diagnostic ignored "-Wweak-vtables" -#pragma clang diagnostic ignored "-Wmissing-variable-declarations" -#pragma clang diagnostic ignored "-Wold-style-cast" -#pragma clang diagnostic ignored "-Wshadow-uncaptured-local" -#pragma clang diagnostic ignored "-Wshadow-field-in-constructor" -#pragma clang diagnostic ignored "-Wshadow-field" -#pragma clang diagnostic ignored "-Wdocumentation" -#pragma clang diagnostic ignored "-Wmissing-noreturn" -#pragma clang diagnostic ignored "-Wreserved-identifier" -#endif +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG( "-Wcovered-switch-default" ) +QT_WARNING_DISABLE_CLANG( "-Wfloat-equal" ) +QT_WARNING_DISABLE_CLANG( "-Wweak-vtables" ) +QT_WARNING_DISABLE_CLANG( "-Wmissing-variable-declarations" ) +QT_WARNING_DISABLE_CLANG( "-Wold-style-cast" ) +QT_WARNING_DISABLE_CLANG( "-Wshadow-uncaptured-local" ) +QT_WARNING_DISABLE_CLANG( "-Wshadow-field-in-constructor" ) +QT_WARNING_DISABLE_CLANG( "-Wshadow-field" ) +QT_WARNING_DISABLE_CLANG( "-Wdocumentation" ) +QT_WARNING_DISABLE_CLANG( "-Wmissing-noreturn" ) +QT_WARNING_DISABLE_CLANG( "-Wreserved-identifier" ) #undef slots #include @@ -35,6 +33,8 @@ #include #include +QT_WARNING_POP + namespace Calamares { namespace Python __attribute__( ( visibility( "hidden" ) ) ) @@ -54,8 +54,5 @@ namespace Python __attribute__( ( visibility( "hidden" ) ) ) } // namespace Python } // namespace Calamares -#ifdef __clang__ -#pragma clang diagnostic pop -#endif #endif From 419bedf6617c9543b25769030829b59ebefb3320 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 21 Dec 2024 10:04:22 +0100 Subject: [PATCH 3/9] [libcalamares] Use Qt helper macros for compiler warnings --- src/libcalamares/PythonHelper.cpp | 10 ++--- src/libcalamares/PythonJob.cpp | 10 ++--- src/libcalamares/partition/KPMHelper.h | 18 ++++---- src/libcalamares/python/Api.cpp | 10 ++--- src/libcalamares/utils/BoostPython.h | 59 ++++++++++++-------------- src/libcalamares/utils/Yaml.h | 19 +++------ src/libcalamares/utils/moc-warnings.h | 8 ++-- 7 files changed, 54 insertions(+), 80 deletions(-) diff --git a/src/libcalamares/PythonHelper.cpp b/src/libcalamares/PythonHelper.cpp index 6e18e1d99..03cd95e72 100644 --- a/src/libcalamares/PythonHelper.cpp +++ b/src/libcalamares/PythonHelper.cpp @@ -26,10 +26,8 @@ namespace CalamaresPython boost::python::object variantToPyObject( const QVariant& variant ) { -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" -#endif + QT_WARNING_PUSH + QT_WARNING_DISABLE_CLANG( "-Wswitch-enum" ) #if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) const auto IntVariantType = QVariant::Int; @@ -82,9 +80,7 @@ variantToPyObject( const QVariant& variant ) default: return bp::object(); } -#ifdef __clang__ -#pragma clang diagnostic pop -#endif + QT_WARNING_POP } QVariant diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index 6a92d8dde..6f5ca1927 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -28,10 +28,8 @@ static const char* s_preScript = nullptr; namespace bp = boost::python; -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdisabled-macro-expansion" -#endif +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG( "-Wdisabled-macro-expansion" ) BOOST_PYTHON_FUNCTION_OVERLOADS( mount_overloads, CalamaresPython::mount, 2, 4 ); BOOST_PYTHON_FUNCTION_OVERLOADS( target_env_call_str_overloads, CalamaresPython::target_env_call, 1, 3 ); @@ -52,9 +50,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS( target_env_process_output_overloads, 4 ); BOOST_PYTHON_FUNCTION_OVERLOADS( host_env_process_output_overloads, CalamaresPython::host_env_process_output, 1, 4 ); -#ifdef __clang__ -#pragma clang diagnostic pop -#endif +QT_WARNING_POP BOOST_PYTHON_MODULE( libcalamares ) { diff --git a/src/libcalamares/partition/KPMHelper.h b/src/libcalamares/partition/KPMHelper.h index e61c31956..0a4aaee7c 100644 --- a/src/libcalamares/partition/KPMHelper.h +++ b/src/libcalamares/partition/KPMHelper.h @@ -16,18 +16,18 @@ #ifndef PARTITION_KPMHELPER_H #define PARTITION_KPMHELPER_H +#include + // The kpmcore headers are not C++17 warning-proof, especially // with picky compilers like Clang 10. Since we use Clang for the // find-all-the-warnings case, switch those warnings off for // the we-can't-change-them system headers. -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdocumentation" -#pragma clang diagnostic ignored "-Wsuggest-destructor-override" -#pragma clang diagnostic ignored "-Winconsistent-missing-destructor-override" +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG( "-Wdocumentation" ) +QT_WARNING_DISABLE_CLANG( "-Wsuggest-destructor-override" ) +QT_WARNING_DISABLE_CLANG( "-Winconsistent-missing-destructor-override" ) // Because of __lastType -#pragma clang diagnostic ignored "-Wreserved-identifier" -#endif +QT_WARNING_DISABLE_CLANG( "-Wreserved-identifier" ) #include #include @@ -38,8 +38,6 @@ #include #include -#ifdef __clang__ -#pragma clang diagnostic pop -#endif +QT_WARNING_POP #endif diff --git a/src/libcalamares/python/Api.cpp b/src/libcalamares/python/Api.cpp index cbf817f4c..602389cf0 100644 --- a/src/libcalamares/python/Api.cpp +++ b/src/libcalamares/python/Api.cpp @@ -43,10 +43,8 @@ Calamares::Python::Dictionary variantHashToPyDict( const QVariantHash& variantHa py::object variantToPyObject( const QVariant& variant ) { -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" -#endif + QT_WARNING_PUSH + QT_WARNING_DISABLE_CLANG( "-Wswitch-enum" ) #if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) const auto IntVariantType = QVariant::Int; @@ -99,9 +97,7 @@ variantToPyObject( const QVariant& variant ) default: return py::none(); } -#ifdef __clang__ -#pragma clang diagnostic pop -#endif + QT_WARNING_POP } Calamares::Python::List diff --git a/src/libcalamares/utils/BoostPython.h b/src/libcalamares/utils/BoostPython.h index f39abe7cf..5ba0535f8 100644 --- a/src/libcalamares/utils/BoostPython.h +++ b/src/libcalamares/utils/BoostPython.h @@ -5,7 +5,6 @@ * * Calamares is Free Software: see the License-Identifier above. * - * */ /* @@ -20,36 +19,34 @@ #ifndef UTILS_BOOSTPYTHON_H #define UTILS_BOOSTPYTHON_H -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wreserved-id-macro" -#pragma clang diagnostic ignored "-Wold-style-cast" -#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" -#pragma clang diagnostic ignored "-Wextra-semi-stmt" -#pragma clang diagnostic ignored "-Wall" -#pragma clang diagnostic ignored "-Wimplicit-float-conversion" -#pragma clang diagnostic ignored "-Wundef" -#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec" -#pragma clang diagnostic ignored "-Wshadow-field-in-constructor" -#pragma clang diagnostic ignored "-Wshadow" -#pragma clang diagnostic ignored "-Wmissing-noreturn" -#pragma clang diagnostic ignored "-Wcast-qual" -#pragma clang diagnostic ignored "-Wcast-align" -#pragma clang diagnostic ignored "-Wsign-conversion" -#pragma clang diagnostic ignored "-Wdouble-promotion" -#pragma clang diagnostic ignored "-Wredundant-parens" -#pragma clang diagnostic ignored "-Wweak-vtables" -#pragma clang diagnostic ignored "-Wdeprecated" -#pragma clang diagnostic ignored "-Wmissing-field-initializers" -#pragma clang diagnostic ignored "-Wdisabled-macro-expansion" -#pragma clang diagnostic ignored "-Wdocumentation" -#pragma clang diagnostic ignored "-Wcomma" -#pragma clang diagnostic ignored "-Wunused-parameter" -#pragma clang diagnostic ignored "-Wunused-template" +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG( "-Wreserved-id-macro" ) +QT_WARNING_DISABLE_CLANG( "-Wold-style-cast" ) +QT_WARNING_DISABLE_CLANG( "-Wzero-as-null-pointer-constant" ) +QT_WARNING_DISABLE_CLANG( "-Wextra-semi-stmt" ) +QT_WARNING_DISABLE_CLANG( "-Wall" ) +QT_WARNING_DISABLE_CLANG( "-Wimplicit-float-conversion" ) +QT_WARNING_DISABLE_CLANG( "-Wundef" ) +QT_WARNING_DISABLE_CLANG( "-Wdeprecated-dynamic-exception-spec" ) +QT_WARNING_DISABLE_CLANG( "-Wshadow-field-in-constructor" ) +QT_WARNING_DISABLE_CLANG( "-Wshadow" ) +QT_WARNING_DISABLE_CLANG( "-Wmissing-noreturn" ) +QT_WARNING_DISABLE_CLANG( "-Wcast-qual" ) +QT_WARNING_DISABLE_CLANG( "-Wcast-align" ) +QT_WARNING_DISABLE_CLANG( "-Wsign-conversion" ) +QT_WARNING_DISABLE_CLANG( "-Wdouble-promotion" ) +QT_WARNING_DISABLE_CLANG( "-Wredundant-parens" ) +QT_WARNING_DISABLE_CLANG( "-Wweak-vtables" ) +QT_WARNING_DISABLE_CLANG( "-Wdeprecated" ) +QT_WARNING_DISABLE_CLANG( "-Wmissing-field-initializers" ) +QT_WARNING_DISABLE_CLANG( "-Wdisabled-macro-expansion" ) +QT_WARNING_DISABLE_CLANG( "-Wdocumentation" ) +QT_WARNING_DISABLE_CLANG( "-Wcomma" ) +QT_WARNING_DISABLE_CLANG( "-Wunused-parameter" ) +QT_WARNING_DISABLE_CLANG( "-Wunused-template" ) // Actually for Python headers -#pragma clang diagnostic ignored "-Wreserved-id-macro" -#endif +QT_WARNING_DISABLE_CLANG( "-Wreserved-id-macro" ) #undef slots #include @@ -58,8 +55,6 @@ #include #include -#ifdef __clang__ -#pragma clang diagnostic pop -#endif +QT_WARNING_POP #endif diff --git a/src/libcalamares/utils/Yaml.h b/src/libcalamares/utils/Yaml.h index 68b51c334..b39db68aa 100644 --- a/src/libcalamares/utils/Yaml.h +++ b/src/libcalamares/utils/Yaml.h @@ -4,11 +4,8 @@ * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * * Calamares is Free Software: see the License-Identifier above. * - * - * */ /* @@ -35,19 +32,15 @@ class QFileInfo; // with picky compilers like Clang 8. Since we use Clang for the // find-all-the-warnings case, switch those warnings off for // the we-can't-change-them system headers. -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" -#pragma clang diagnostic ignored "-Wshadow" -#pragma clang diagnostic ignored "-Wfloat-equal" -#pragma clang diagnostic ignored "-Wsuggest-destructor-override" -#endif +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG( "-Wzero-as-null-pointer-constant" ) +QT_WARNING_DISABLE_CLANG( "-Wshadow" ) +QT_WARNING_DISABLE_CLANG( "-Wfloat-equal" ) +QT_WARNING_DISABLE_CLANG( "-Wsuggest-destructor-override" ) #include -#ifdef __clang__ -#pragma clang diagnostic pop -#endif +QT_WARNING_POP /// @brief Appends all the elements of @p node to the string list @p v DLLEXPORT void operator>>( const ::YAML::Node& node, QStringList& v ); diff --git a/src/libcalamares/utils/moc-warnings.h b/src/libcalamares/utils/moc-warnings.h index 05ba34bd6..3345515e8 100644 --- a/src/libcalamares/utils/moc-warnings.h +++ b/src/libcalamares/utils/moc-warnings.h @@ -22,11 +22,11 @@ * automoc does all the work for us. */ #ifdef __clang__ -#pragma clang diagnostic ignored "-Wextra-semi-stmt" -#pragma clang diagnostic ignored "-Wredundant-parens" -#pragma clang diagnostic ignored "-Wreserved-identifier" +QT_WARNING_DISABLE_CLANG( "-Wextra-semi-stmt" ) +QT_WARNING_DISABLE_CLANG( "-Wredundant-parens" ) +QT_WARNING_DISABLE_CLANG( "-Wreserved-identifier" ) #if __clang_major__ >= 17 -#pragma clang diagnostic ignored "-Wunsafe-buffer-usage" +QT_WARNING_DISABLE_CLANG( "-Wunsafe-buffer-usage" ) #endif #endif From af715222926ece9e3d616d3c76bb2634ee70f303 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 21 Dec 2024 10:38:11 +0100 Subject: [PATCH 4/9] [libcalamares] Add missing ; This was a missing ; in code for older Qt versions, which wasn't being reached in any of my (FreeBSD, openSUSE) builds. CLOSES #2411 --- src/libcalamares/compat/Xml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcalamares/compat/Xml.h b/src/libcalamares/compat/Xml.h index 26be358a3..75b775ad5 100644 --- a/src/libcalamares/compat/Xml.h +++ b/src/libcalamares/compat/Xml.h @@ -20,7 +20,7 @@ struct ParseResult QString errorMessage; int errorLine = -1; int errorColumn = -1; -} +}; [[nodiscard]] inline ParseResult setXmlContent( QDomDocument& doc, const QByteArray& ba ) From c251be3ef3195fe9ca8be6d53829118d0d5021bc Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 21 Dec 2024 14:18:01 +0100 Subject: [PATCH 5/9] [plasmalnf] Be quiet at find_package() for Plasma If the requirements are not met, the module will be listed in the skipped-modules overview. --- src/modules/plasmalnf/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/plasmalnf/CMakeLists.txt b/src/modules/plasmalnf/CMakeLists.txt index 50cb630f2..930b3e441 100644 --- a/src/modules/plasmalnf/CMakeLists.txt +++ b/src/modules/plasmalnf/CMakeLists.txt @@ -13,7 +13,7 @@ if(WITH_QT6) set(_plasma_libraries "Plasma::Plasma") set(_plasma_name "Plasma") find_package(${kfname} ${KF_VERSION} QUIET COMPONENTS Config Package) - find_package(Plasma ${PLASMA_VERSION}) + find_package(Plasma ${PLASMA_VERSION} QUIET) else() set(_plasma_libraries "${kfname}::Plasma") set(_plasma_name "KF5Plasma") From 3e9eabe9df8a8412d0cccd583001440a2075bb61 Mon Sep 17 00:00:00 2001 From: Masato TOYOSHIMA Date: Sat, 14 Dec 2024 22:03:46 +0900 Subject: [PATCH 6/9] If you selected "Manual Partitioning", Scan for partition information. --- src/modules/partition/gui/ChoicePage.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 2c7b8376c..a7665bbbc 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -586,8 +586,21 @@ ChoicePage::applyActionChoice( InstallChoice choice ) &ChoicePage::doAlongsideSetupSplitter, Qt::UniqueConnection ); break; - case InstallChoice::NoChoice: case InstallChoice::Manual: + if ( m_core->isDirty() ) + { + ScanningDialog::run( + QtConcurrent::run( + [ = ] + { + QMutexLocker locker( &m_coreMutex ); + m_core->revertDevice( selectedDevice() ); + } ), + [] {}, + this ); + } + break; + case InstallChoice::NoChoice: break; } updateNextEnabled(); From e6fa229b18992e5d26cd4493c942af6748d70fe7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 21 Dec 2024 14:43:40 +0100 Subject: [PATCH 7/9] CMake: suppress install-path warnings with newer CMake None of the edge cases that the policy is for are applicable. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 91521ca0a..c83428a8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,6 +239,9 @@ list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "K_EXPORT_PLASMA_DATAENGINE_WITH_JSON" "K_EXPORT_PLASMA_RUNNER" ) +if(POLICY CMP0171) + cmake_policy(SET CMP0177 NEW) +endif() # CMake Modules include(CMakePackageConfigHelpers) From 186d44e51b9c571f16d2b616b4dd70bd1bdef376 Mon Sep 17 00:00:00 2001 From: Masato TOYOSHIMA Date: Sun, 22 Dec 2024 12:51:50 +0900 Subject: [PATCH 8/9] [libcalamares] Use Qt helper macros for compiler warnings --- src/libcalamares/utils/moc-warnings.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libcalamares/utils/moc-warnings.h b/src/libcalamares/utils/moc-warnings.h index 3345515e8..bbe382ab7 100644 --- a/src/libcalamares/utils/moc-warnings.h +++ b/src/libcalamares/utils/moc-warnings.h @@ -22,6 +22,8 @@ * automoc does all the work for us. */ #ifdef __clang__ +#include +QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG( "-Wextra-semi-stmt" ) QT_WARNING_DISABLE_CLANG( "-Wredundant-parens" ) QT_WARNING_DISABLE_CLANG( "-Wreserved-identifier" ) @@ -29,4 +31,5 @@ QT_WARNING_DISABLE_CLANG( "-Wreserved-identifier" ) #if __clang_major__ >= 17 QT_WARNING_DISABLE_CLANG( "-Wunsafe-buffer-usage" ) #endif +QT_WARNING_POP #endif From 850ac483cb70a3b458fe388349c152a5ada6fa83 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 22 Dec 2024 21:46:35 +0100 Subject: [PATCH 9/9] [libcalamares] Missing include for Qt macros --- src/libcalamares/utils/BoostPython.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcalamares/utils/BoostPython.h b/src/libcalamares/utils/BoostPython.h index 5ba0535f8..5cc5c3176 100644 --- a/src/libcalamares/utils/BoostPython.h +++ b/src/libcalamares/utils/BoostPython.h @@ -19,6 +19,8 @@ #ifndef UTILS_BOOSTPYTHON_H #define UTILS_BOOSTPYTHON_H +#include + QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG( "-Wreserved-id-macro" ) QT_WARNING_DISABLE_CLANG( "-Wold-style-cast" )