diff --git a/.clang-format b/.clang-format index 187c3638f..aa4aa0e2a 100644 --- a/.clang-format +++ b/.clang-format @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- BasedOnStyle: WebKit diff --git a/.editorconfig b/.editorconfig index d5851076b..44e191e5c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,5 @@ -# http://EditorConfig.org +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 root = true diff --git a/.gitattributes b/.gitattributes index 3b8a7f1e8..6a8126fad 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + .editorconfig export-ignore .gitattributes export-ignore .github export-ignore diff --git a/.gitignore b/.gitignore index da0f082a6..5bf3c57ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # C++ objects and libs *.slo diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 000000000..a2b9cf8c3 --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,85 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Calamares +Source: https://github.com/calamares/calamares.git + +### ACTUAL LICENSES +# +# Images in the locale module are a bit unclear; they were added +# by Teo in 2014 but I suspect they came from somewhere else. +# +Files: src/modules/locale/images/timezone*.png +License: GPL-3.0-or-later +Copyright: 2014 Teo Mrnjavac + +Files: man/calamares.8 +License: GPL-3.0-or-later +Copyright: 2017 Jonathan Carter + +### BUILD ARTIFACTS / NOT SOURCE +# +# QRC Files are basically build artifacts +# +FILES: src/modules/*/*.qrc +License: CC0-1.0 +Copyright: no + +# GitHub issue templates are not part of the source +# +Files: .github/ISSUE_TEMPLATE/* +License: CC0-1.0 +Copyright: no + +# Packaging information +# +Files: data/FreeBSD/distinfo data/FreeBSD/pkg-descr data/FreeBSD/pkg-plist +License: CC0-1.0 +Copyright: no + +# Example data for timezones, which is copied out of zoneinfo, +# which has this notice: +# +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. +# +Files: data/example-root/usr/share/zoneinfo/Zulu data/example-root/usr/share/zoneinfo/UTC data/example-root/usr/share/zoneinfo/America/New_York +License: CC0-1.0 +Copyright: no + +### TRANSLATIONS +# +# .desktop files and template change only with translation +# +FILES: calamares.desktop* +License: CC0-1.0 +Copyright: no + +# Transifex translations derive from the source, and have no +# embedded copyright information. +# +Files: lang/*.ts +License: GPL-3.0-or-later +Copyright: 2020 Calamares authors and translators + +# Translations of branding slideshow are the same +Files: src/branding/default/lang/*.ts +License: GPL-3.0-or-later +Copyright: 2020 Calamares authors and translators + +# Python translation files have some copyright information, but +# it's generally very sketchy. +# +Files: lang/python.pot +License: GPL-3.0-or-later +Copyright: 2020 Calamares authors and translators + +Files: lang/python/*/LC_MESSAGES/python.po +License: GPL-3.0-or-later +Copyright: 2020 Calamares authors and translators + +Files: src/modules/dummypythonqt/lang/dummypythonqt.pot +License: GPL-3.0-or-later +Copyright: 2020 Calamares authors and translators + +Files: src/modules/dummypythonqt/lang/*/LC_MESSAGES/dummypythonqt.po +License: GPL-3.0-or-later +Copyright: 2020 Calamares authors and translators diff --git a/.travis.yml b/.travis.yml index bded09831..a9fcbb28b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# language: cpp python: diff --git a/.tx/config b/.tx/config index 686a98bbe..65a8521b5 100644 --- a/.tx/config +++ b/.tx/config @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 + [main] host = https://www.transifex.com diff --git a/3rdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp b/3rdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp index 77e95e649..284870e06 100644 --- a/3rdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp +++ b/3rdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.h b/3rdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.h index b9c5d588f..19fdaa082 100644 --- a/3rdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.h +++ b/3rdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.h @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/kdsingleapplicationguard/kdsharedmemorylocker.cpp b/3rdparty/kdsingleapplicationguard/kdsharedmemorylocker.cpp index a13a45a27..3af326193 100644 --- a/3rdparty/kdsingleapplicationguard/kdsharedmemorylocker.cpp +++ b/3rdparty/kdsingleapplicationguard/kdsharedmemorylocker.cpp @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/kdsingleapplicationguard/kdsharedmemorylocker.h b/3rdparty/kdsingleapplicationguard/kdsharedmemorylocker.h index 82b759283..64b5c267f 100644 --- a/3rdparty/kdsingleapplicationguard/kdsharedmemorylocker.h +++ b/3rdparty/kdsingleapplicationguard/kdsharedmemorylocker.h @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp b/3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp index 8ddf7aad6..52eb60d37 100644 --- a/3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp +++ b/3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.h b/3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.h index 8ac411a68..8e7c7b498 100644 --- a/3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.h +++ b/3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.h @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/kdsingleapplicationguard/kdtoolsglobal.cpp b/3rdparty/kdsingleapplicationguard/kdtoolsglobal.cpp index d3405e82f..f886189c3 100644 --- a/3rdparty/kdsingleapplicationguard/kdtoolsglobal.cpp +++ b/3rdparty/kdsingleapplicationguard/kdtoolsglobal.cpp @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/kdsingleapplicationguard/kdtoolsglobal.h b/3rdparty/kdsingleapplicationguard/kdtoolsglobal.h index 37ca5857e..5086ddd71 100644 --- a/3rdparty/kdsingleapplicationguard/kdtoolsglobal.h +++ b/3rdparty/kdsingleapplicationguard/kdtoolsglobal.h @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/kdsingleapplicationguard/pimpl_ptr.cpp b/3rdparty/kdsingleapplicationguard/pimpl_ptr.cpp index 35b52d419..f2b0a4dd9 100644 --- a/3rdparty/kdsingleapplicationguard/pimpl_ptr.cpp +++ b/3rdparty/kdsingleapplicationguard/pimpl_ptr.cpp @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/kdsingleapplicationguard/pimpl_ptr.h b/3rdparty/kdsingleapplicationguard/pimpl_ptr.h index 41b33b582..b8b4786ba 100644 --- a/3rdparty/kdsingleapplicationguard/pimpl_ptr.h +++ b/3rdparty/kdsingleapplicationguard/pimpl_ptr.h @@ -1,6 +1,6 @@ /* + * SPDX-FileCopyrightText: 2001-2010 Klaralvdalens Datakonsult AB. * SPDX-License-Identifier: LGPL-2.0-only - * License-Filename: LICENSES/LGPLv2-KDAB * * The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. */ diff --git a/3rdparty/waitingspinnerwidget.cpp b/3rdparty/waitingspinnerwidget.cpp index 45c689019..98931a6ad 100644 --- a/3rdparty/waitingspinnerwidget.cpp +++ b/3rdparty/waitingspinnerwidget.cpp @@ -1,6 +1,8 @@ /* + * SPDX-FileCopyrightText: 2012-2014 Alexander Turkin + * SPDX-FileCopyrightText: 2014 William Hallatt + * SPDX-FileCopyrightText: 2015 Jacob Dawid * SPDX-License-Identifier: MIT - * License-Filename: LICENSES/MIT-QtWaitingSpinner */ /* Original Work Copyright (c) 2012-2014 Alexander Turkin diff --git a/3rdparty/waitingspinnerwidget.h b/3rdparty/waitingspinnerwidget.h index b3e8df9a0..c8c6b9687 100644 --- a/3rdparty/waitingspinnerwidget.h +++ b/3rdparty/waitingspinnerwidget.h @@ -1,11 +1,14 @@ /* + * SPDX-FileCopyrightText: 2012-2014 Alexander Turkin + * SPDX-FileCopyrightText: 2014 William Hallatt + * SPDX-FileCopyrightText: 2015 Jacob Dawid * SPDX-License-Identifier: MIT - * License-Filename: LICENSES/MIT-QtWaitingSpinner */ /* Original Work Copyright (c) 2012-2014 Alexander Turkin Modified 2014 by William Hallatt Modified 2015 by Jacob Dawid + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to diff --git a/AUTHORS b/AUTHORS index ecd0aafc8..912d48da7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,7 @@ + + # MAINTAINER Calamares development is sponsored by Blue Systems GmbH - Liberating Software. diff --git a/CHANGES b/CHANGES index b4e4fd5c0..0f6dd7de1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ + + This is the changelog for Calamares. For each release, the major changes and contributors are listed. Note that Calamares does not have a historical changelog -- this log starts with version 3.2.0. The release notes on the @@ -6,13 +10,33 @@ website will have to do for older versions. # 3.2.30 (unreleased) # This release contains contributions from (alphabetically by first name): - - No external contributors yet + - Anke Boersma + - Asif Mahmud Shimon + - Manzoor Ahmed Munawar + - Sai Kamal + +This release has two giant source-code changes that have no effect +on functionality, but do touch each and every source file: + - SPDX headers for licensing information, following the standard + set by REUSE.software ; all source files and resources have + SPDX-License-Identifier information and copyright notices. All + of the boilerplate texts have been removed. + - Calamares coding style has been mechanically applied to the entire + codebase. This was already done to most of it, but there were + some hold-outs. ## Core ## - - No core changes yet + - Network access status is deprecated in Qt 5.15's QNetworkAccessManager, + and was not useful already in some previous versions. Replace its + use in the Calamares network service by testing-it-ourself directly + via a synchronous ping. (Thanks to Asif) + - New Telugu translation. (Thanks to Sai) + - Urdu translation started. (Thanks to Manzoor) ## Modules ## - - No module changes yet + - *keyboardq* and *localeq* improvements. (Thanks to Anke) + - *users* module did not set up autologin properly. This is yet another + regression left over from 3.2.28. (Reported by Phil and pcrepix, #1498) # 3.2.29 (2020-08-20) # diff --git a/CMakeLists.txt b/CMakeLists.txt index 16ea24fc7..b82c116c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,20 +1,15 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # # SPDX-FileCopyrightText: 2017 Adriaan de Groot -# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-License-Identifier: BSD-2-Clause # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +### # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Calamares is Free Software: see the License-Identifier above. # -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . +# Individual files may have different licenses (like the CMake +# infrastructure, which is BSD-2-Clause licensed). Check the SPDX +# identifiers in each file. # ### # @@ -145,13 +140,14 @@ set( CALAMARES_DESCRIPTION_SUMMARY # NOTE: update these lines by running `txstats.py`, or for full automation # `txstats.py -e`. See also # -# Total 68 languages -set( _tx_complete ca fi_FI he hr nl pt_BR sq tg tr_TR uk zh_TW ) -set( _tx_good as ast az az_AZ be cs_CZ da de es fr hi hu it_IT ja - ko lt ml pt_PT ru sk sv zh_CN ) -set( _tx_ok ar bg el en_GB es_MX es_PR et eu fa gl id is mr nb - pl ro sl sr sr@latin th ) -set( _tx_incomplete bn ca@valencia eo fr_CH gu ie kk kn lo lv mk ne_NP +# Total 69 languages +set( _tx_complete az az_AZ ca cs_CZ da fi_FI he hi hr ja nl pt_BR + sq sv tg tr_TR uk zh_TW ) +set( _tx_good as ast be de es fr hu it_IT ko lt ml pt_PT ru sk + zh_CN ) +set( _tx_ok ar bg bn el en_GB es_MX es_PR et eu fa gl id is mr nb + pl ro sl sr sr@latin te th ) +set( _tx_incomplete ca@valencia eo fr_CH gu ie kk kn lo lv mk ne_NP ur uz ) ### Required versions diff --git a/CMakeModules/BoostPython3.cmake b/CMakeModules/BoostPython3.cmake index 021c1947a..bd1d24e0e 100644 --- a/CMakeModules/BoostPython3.cmake +++ b/CMakeModules/BoostPython3.cmake @@ -1,3 +1,17 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2014 Aurélien Gâteau +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-FileCopyrightText: 2019 Kevin Kofler +# SPDX-License-Identifier: BSD-2-Clause +# +### +# +# Handles the mess that Boost::Python is before CMake 3.16 and +# Boost 1.70 or so. +# +### +# # On Ubuntu 14.04, the libboost-python1.54-dev package comes with one library # for each Python version: # libboost_python-py27.so @@ -68,7 +82,7 @@ macro( find_boost_python3 boost_version python_version found_var ) endif() set( ${found_var} ${_fbp_found} ) - + # This is superfluous, but allows proper reporting in the features list if ( _fbp_found ) find_package( Boost ${boost_version} COMPONENTS ${_fbp_found} ) diff --git a/CMakeModules/CMakeColors.cmake b/CMakeModules/CMakeColors.cmake index 97739627d..073c24de6 100644 --- a/CMakeModules/CMakeColors.cmake +++ b/CMakeModules/CMakeColors.cmake @@ -1,3 +1,14 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2014 Kevin Kofler +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# +### +# +# Defines a handful of strings that, with normal xterm handling, +# will change colors in the output, so it's nicer to read. if(NOT WIN32) set(_use_color ON) if("0" STREQUAL "$ENV{CLICOLOR}") diff --git a/CMakeModules/CMakeDateStamp.cmake b/CMakeModules/CMakeDateStamp.cmake index 0b6a3896f..15482100f 100644 --- a/CMakeModules/CMakeDateStamp.cmake +++ b/CMakeModules/CMakeDateStamp.cmake @@ -1,3 +1,11 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-License-Identifier: BSD-2-Clause +# +### +# +# Find today's date, for versioning purposes. find_program(DATE_EXECUTABLE NAMES date) mark_as_advanced(DATE_EXECUTABLE) diff --git a/CMakeModules/CMakeVersionSource.cmake b/CMakeModules/CMakeVersionSource.cmake index 826546807..295fffa5d 100644 --- a/CMakeModules/CMakeVersionSource.cmake +++ b/CMakeModules/CMakeVersionSource.cmake @@ -1,3 +1,10 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-License-Identifier: BSD-2-Clause +# +### +# # Try to identify the current development source version. set(CMAKE_VERSION_SOURCE "") if(EXISTS ${CMAKE_SOURCE_DIR}/.git/HEAD) diff --git a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake index 70fcd9279..062ad6706 100644 --- a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake +++ b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake @@ -1,20 +1,11 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Calamares is Free Software: see the License-Identifier above. # -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . -# -# SPDX-License-Identifier: GPL-3.0-or-later -# License-Filename: LICENSE # ### # diff --git a/CMakeModules/CalamaresAddLibrary.cmake b/CMakeModules/CalamaresAddLibrary.cmake index 901791e30..0cbad7424 100644 --- a/CMakeModules/CalamaresAddLibrary.cmake +++ b/CMakeModules/CalamaresAddLibrary.cmake @@ -1,20 +1,11 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Calamares is Free Software: see the License-Identifier above. # -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . -# -# SPDX-License-Identifier: GPL-3.0-or-later -# License-Filename: LICENSE # ### # diff --git a/CMakeModules/CalamaresAddModuleSubdirectory.cmake b/CMakeModules/CalamaresAddModuleSubdirectory.cmake index 86f0b8f4c..87f8547f8 100644 --- a/CMakeModules/CalamaresAddModuleSubdirectory.cmake +++ b/CMakeModules/CalamaresAddModuleSubdirectory.cmake @@ -1,20 +1,11 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Calamares is Free Software: see the License-Identifier above. # -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . -# -# SPDX-License-Identifier: GPL-3.0-or-later -# License-Filename: LICENSE # ### # diff --git a/CMakeModules/CalamaresAddPlugin.cmake b/CMakeModules/CalamaresAddPlugin.cmake index a90e6df63..55865999c 100644 --- a/CMakeModules/CalamaresAddPlugin.cmake +++ b/CMakeModules/CalamaresAddPlugin.cmake @@ -1,20 +1,11 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Calamares is Free Software: see the License-Identifier above. # -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . -# -# SPDX-License-Identifier: GPL-3.0-or-later -# License-Filename: LICENSE # ### # diff --git a/CMakeModules/CalamaresAddTest.cmake b/CMakeModules/CalamaresAddTest.cmake index 4dd673745..5bedf81b5 100644 --- a/CMakeModules/CalamaresAddTest.cmake +++ b/CMakeModules/CalamaresAddTest.cmake @@ -1,20 +1,10 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Calamares is Free Software: see the License-Identifier above. # -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . -# -# SPDX-License-Identifier: GPL-3.0-or-later -# License-Filename: LICENSE # ### # diff --git a/CMakeModules/CalamaresAddTranslations.cmake b/CMakeModules/CalamaresAddTranslations.cmake index 5015301d2..56953187c 100644 --- a/CMakeModules/CalamaresAddTranslations.cmake +++ b/CMakeModules/CalamaresAddTranslations.cmake @@ -1,20 +1,10 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Calamares is Free Software: see the License-Identifier above. # -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . -# -# SPDX-License-Identifier: GPL-3.0-or-later -# License-Filename: LICENSE # ### # @@ -22,57 +12,14 @@ include( CMakeParseArguments ) -# Internal macro for adding the C++ / Qt translations to the -# build and install tree. Should be called only once, from -# src/calamares/CMakeLists.txt. -macro(add_calamares_translations language) - list( APPEND CALAMARES_LANGUAGES ${ARGV} ) - - set( calamares_i18n_qrc_content "" ) - - # calamares and qt language files - foreach( lang ${CALAMARES_LANGUAGES} ) - foreach( tlsource "calamares_${lang}" "tz_${lang}" ) - if( EXISTS "${CMAKE_SOURCE_DIR}/lang/${tlsource}.ts" ) - set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}${tlsource}.qm\n" ) - list( APPEND TS_FILES "${CMAKE_SOURCE_DIR}/lang/${tlsource}.ts" ) - endif() - endforeach() - endforeach() - - set( trans_file calamares_i18n ) - set( trans_infile ${CMAKE_CURRENT_BINARY_DIR}/${trans_file}.qrc ) - set( trans_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${trans_file}.cxx ) - - configure_file( ${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in ${trans_infile} @ONLY ) - - qt5_add_translation(QM_FILES ${TS_FILES}) - - # Run the resource compiler (rcc_options should already be set) - add_custom_command( - OUTPUT ${trans_outfile} - COMMAND "${Qt5Core_RCC_EXECUTABLE}" - ARGS ${rcc_options} --format-version 1 -name ${trans_file} -o ${trans_outfile} ${trans_infile} - MAIN_DEPENDENCY ${trans_infile} - DEPENDS ${QM_FILES} - ) -endmacro() - -# Internal macro for Python translations -# -# Translations of the Python modules that don't have their own -# lang/ subdirectories -- these are collected in top-level -# lang/python//LC_MESSAGES/python.mo -macro(add_calamares_python_translations language) - set( CALAMARES_LANGUAGES "" ) - list( APPEND CALAMARES_LANGUAGES ${ARGV} ) - - install_calamares_gettext_translations( python - SOURCE_DIR ${CMAKE_SOURCE_DIR}/lang/python - FILENAME python.mo - RENAME calamares-python.mo - ) -endmacro() +# The Gettext module is still old-fashioned, ALLCAPS variables +find_package( Gettext ) +set_package_properties( GETTEXT PROPERTIES + DESCRIPTION "GNU gettext (translation) tools." + URL "https://www.gnu.org/software/gettext/" + PURPOSE "Gettext is used in the translation of Python modules." + TYPE REQUIRED +) # Installs a directory containing language-code-labeled subdirectories with # gettext data into the appropriate system directory. Allows renaming the @@ -104,31 +51,52 @@ function( install_calamares_gettext_translations ) if( NOT TRANSLATION_RENAME ) set( TRANSLATION_RENAME "${TRANSLATION_FILENAME}" ) endif() + string( REGEX REPLACE ".mo$" ".po" TRANSLATION_SOURCE_FILENAME "${TRANSLATION_FILENAME}" ) - message(STATUS "Installing gettext translations for ${TRANSLATION_NAME}") - message(STATUS " Installing ${TRANSLATION_FILENAME} from ${TRANSLATION_SOURCE_DIR}") + if ( GETTEXT_FOUND AND GETTEXT_MSGFMT_EXECUTABLE ) + message( STATUS "Installing gettext translations for ${TRANSLATION_NAME}") + message( STATUS " Installing ${TRANSLATION_FILENAME} from ${TRANSLATION_SOURCE_DIR}") + else() + message( WARNING "Gettext translations requested for ${TRANSLATION_NAME}, but gettext was not found." ) + return() + endif() + + set( TARGET_NAME calamares-gettext-translations-${NAME} ) + if( NOT TARGET "${TARGET_NAME}" ) + add_custom_target( "${TARGET_NAME}" ALL ) + endif() set( TRANSLATION_NAME "${NAME}" ) - set( INSTALLED_TRANSLATIONS "" ) foreach( lang ${CALAMARES_TRANSLATION_LANGUAGES} ) # Global - set( lang_mo "${TRANSLATION_SOURCE_DIR}/${lang}/LC_MESSAGES/${TRANSLATION_FILENAME}" ) + string( MAKE_C_IDENTIFIER "${TARGET_NAME}-${lang}" TARGET_SUBNAME ) + + set( lang_po "${TRANSLATION_SOURCE_DIR}/${lang}/LC_MESSAGES/${TRANSLATION_SOURCE_FILENAME}" ) + set( lang_mo_dir "${CMAKE_BINARY_DIR}/lang/${lang}/LC_MESSAGES" ) + set( lang_mo "${lang_mo_dir}/${TRANSLATION_RENAME}" ) if( lang STREQUAL "en" ) message( STATUS " Skipping ${TRANSLATION_NAME} translations for en_US" ) - else( EXISTS ${lang_mo} ) - list( APPEND INSTALLED_LANGUAGES "${lang}" ) + else() + # We **don't** use the gettext macro's here because the source + # structure doesn't match: we are calling this once per language + # for all of Calamares's languages, while the gettext module + # expects it to be called once, for a given language source-dir. + # + # Using any of the gettext macros just gets us multiple rules + # for python.gmo, and it wants to use msgmerge, besides, which + # doesn't fit our Transifex workflow. + make_directory( ${lang_mo_dir} ) + add_custom_command( + OUTPUT ${lang_mo} + COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} + ARGS -o ${lang_mo} ${lang_po} + MAIN_DEPENDENCY ${lang_po} + ) + add_custom_target( "${TARGET_SUBNAME}" DEPENDS ${lang_mo} ) + add_dependencies( "${TARGET_NAME}" "${TARGET_SUBNAME}" ) install( FILES ${lang_mo} DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${lang}/LC_MESSAGES/ - RENAME ${TRANSLATION_RENAME} ) - # TODO: make translations available in build dir too, for - # translation when running calamares -d from builddir. - set(_build_lc ${CMAKE_BINARY_DIR}/lang/${lang}/LC_MESSAGES/) - file(COPY ${lang_mo} DESTINATION ${_build_lc}) - if (NOT TRANSLATION_FILENAME STREQUAL TRANSLATION_RENAME) - file(RENAME ${_build_lc}${TRANSLATION_FILENAME} ${_build_lc}${TRANSLATION_RENAME}) - endif() - endif() endforeach() endfunction() diff --git a/CMakeModules/CalamaresAutomoc.cmake b/CMakeModules/CalamaresAutomoc.cmake index c9a08a20d..c7dbd72bf 100644 --- a/CMakeModules/CalamaresAutomoc.cmake +++ b/CMakeModules/CalamaresAutomoc.cmake @@ -1,20 +1,10 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Calamares is Free Software: see the License-Identifier above. # -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . -# -# SPDX-License-Identifier: GPL-3.0-or-later -# License-Filename: LICENSE # ### # diff --git a/CMakeModules/FindCrypt.cmake b/CMakeModules/FindCrypt.cmake index d17d70178..94f8a4510 100644 --- a/CMakeModules/FindCrypt.cmake +++ b/CMakeModules/FindCrypt.cmake @@ -1,3 +1,11 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# +### +# # - Find libcrypt # Find the libcrypt includes and the libcrypt libraries # This module defines diff --git a/CMakeModules/FindLIBPARTED.cmake b/CMakeModules/FindLIBPARTED.cmake index 97e7d9758..494271003 100644 --- a/CMakeModules/FindLIBPARTED.cmake +++ b/CMakeModules/FindLIBPARTED.cmake @@ -1,4 +1,5 @@ -# Copyright (C) 2008,2010,2011 by Volker Lanz +# SPDX-FileCopyrightText: 2008,2010,2011 by Volker Lanz +# SPDX-License-Identifier: BSD-2-Clause # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -44,7 +45,7 @@ else (LIBPARTED_FS_RESIZE_LIBRARY) set(LIBPARTED_LIBS ${LIBPARTED_LIBRARY}) endif (LIBPARTED_FS_RESIZE_LIBRARY) -# KDE adds -ansi to the C make flags, parted headers use GNU extensions, so +# KDE adds -ansi to the C make flags, parted headers use GNU extensions, so # undo that unset(CMAKE_C_FLAGS) diff --git a/CMakeModules/FindLibPWQuality.cmake b/CMakeModules/FindLibPWQuality.cmake index 2728afb1e..2a9943f3d 100644 --- a/CMakeModules/FindLibPWQuality.cmake +++ b/CMakeModules/FindLibPWQuality.cmake @@ -1,3 +1,10 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2018 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# +### +# # Locate libpwquality # https://github.com/libpwquality/libpwquality # diff --git a/CMakeModules/FindPythonQt.cmake b/CMakeModules/FindPythonQt.cmake index 519e1c93e..81208a86e 100644 --- a/CMakeModules/FindPythonQt.cmake +++ b/CMakeModules/FindPythonQt.cmake @@ -1,3 +1,11 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2016 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# +### +# # Find PythonQt # # Sets PYTHONQT_FOUND, PYTHONQT_INCLUDE_DIR, PYTHONQT_LIBRARY, PYTHONQT_LIBRARIES diff --git a/CMakeModules/FindYAMLCPP.cmake b/CMakeModules/FindYAMLCPP.cmake index 395c794bb..0752c7bd7 100644 --- a/CMakeModules/FindYAMLCPP.cmake +++ b/CMakeModules/FindYAMLCPP.cmake @@ -1,3 +1,11 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# +### +# # Locate yaml-cpp # # This module defines diff --git a/CMakeModules/IncludeKPMCore.cmake b/CMakeModules/IncludeKPMCore.cmake deleted file mode 100644 index 4b4b8b3f2..000000000 --- a/CMakeModules/IncludeKPMCore.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# Shared CMake core for finding KPMCore -# -# This is wrapped into a CMake include file because there's a bunch of -# pre-requisites that need searching for before looking for KPMCore. -# If you just do find_package( KPMCore ) without finding the things -# it links against first, you get CMake errors. -# -# -find_package(ECM 5.10.0 REQUIRED NO_MODULE) -set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) - -include(KDEInstallDirs) -include(GenerateExportHeader) -find_package( KF5 REQUIRED CoreAddons ) -find_package( KF5 REQUIRED Config I18n Service WidgetsAddons ) - -find_package( KPMcore 3.2 REQUIRED ) diff --git a/CalamaresConfig.cmake.in b/CalamaresConfig.cmake.in index 4c62fb477..f51b5991d 100644 --- a/CalamaresConfig.cmake.in +++ b/CalamaresConfig.cmake.in @@ -1,3 +1,10 @@ +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# +# Note that Calamares itself is GPL-3.0-or-later: the above license +# applies to **this** CMake file. +# # Config file for the Calamares package # # The following IMPORTED targets are defined: diff --git a/Dockerfile b/Dockerfile index 2c8be23a0..7a1cad92a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,5 @@ +# SPDX-FileCopyrightText: 2017 Rohan Garg +# SPDX-License-Identifier: BSD-2-Clause + FROM kdeneon/all:user RUN sudo apt-get update && sudo apt-get -y install build-essential cmake extra-cmake-modules gettext kio-dev libatasmart-dev libboost-python-dev libkf5config-dev libkf5coreaddons-dev libkf5i18n-dev libkf5iconthemes-dev libkf5parts-dev libkf5service-dev libkf5solid-dev libkpmcore-dev libparted-dev libpolkit-qt5-1-dev libqt5svg5-dev libqt5webkit5-dev libyaml-cpp-dev os-prober pkg-config python3-dev qtbase5-dev qtdeclarative5-dev qttools5-dev qttools5-dev-tools diff --git a/LICENSES/BSD2 b/LICENSES/BSD-2-Clause.txt similarity index 100% rename from LICENSES/BSD2 rename to LICENSES/BSD-2-Clause.txt diff --git a/LICENSES/BSD3-SameGame b/LICENSES/BSD3-SameGame deleted file mode 100644 index 9aefc27c5..000000000 --- a/LICENSES/BSD3-SameGame +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/LICENSES/CC-BY-4.0.txt b/LICENSES/CC-BY-4.0.txt new file mode 100644 index 000000000..3f92dfc5f --- /dev/null +++ b/LICENSES/CC-BY-4.0.txt @@ -0,0 +1,324 @@ +Creative Commons Attribution 4.0 International Creative Commons Corporation +("Creative Commons") is not a law firm and does not provide legal services +or legal advice. Distribution of Creative Commons public licenses does not +create a lawyer-client or other relationship. Creative Commons makes its licenses +and related information available on an "as-is" basis. Creative Commons gives +no warranties regarding its licenses, any material licensed under their terms +and conditions, or any related information. Creative Commons disclaims all +liability for damages resulting from their use to the fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions +that creators and other rights holders may use to share original works of +authorship and other material subject to copyright and certain other rights +specified in the public license below. The following considerations are for +informational purposes only, are not exhaustive, and do not form part of our +licenses. + +Considerations for licensors: Our public licenses are intended for use by +those authorized to give the public permission to use material in ways otherwise +restricted by copyright and certain other rights. Our licenses are irrevocable. +Licensors should read and understand the terms and conditions of the license +they choose before applying it. Licensors should also secure all rights necessary +before applying our licenses so that the public can reuse the material as +expected. Licensors should clearly mark any material not subject to the license. +This includes other CC-licensed material, or material used under an exception +or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors + +Considerations for the public: By using one of our public licenses, a licensor +grants the public permission to use the licensed material under specified +terms and conditions. If the licensor's permission is not necessary for any +reason–for example, because of any applicable exception or limitation to copyright–then +that use is not regulated by the license. Our licenses grant only permissions +under copyright and certain other rights that a licensor has authority to +grant. Use of the licensed material may still be restricted for other reasons, +including because others have copyright or other rights in the material. A +licensor may make special requests, such as asking that all changes be marked +or described. Although not required by our licenses, you are encouraged to +respect those requests where reasonable. More considerations for the public +: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution +4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to +be bound by the terms and conditions of this Creative Commons Attribution +4.0 International Public License ("Public License"). To the extent this Public +License may be interpreted as a contract, You are granted the Licensed Rights +in consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the Licensor +receives from making the Licensed Material available under these terms and +conditions. + +Section 1 – Definitions. + +a. Adapted Material means material subject to Copyright and Similar Rights +that is derived from or based upon the Licensed Material and in which the +Licensed Material is translated, altered, arranged, transformed, or otherwise +modified in a manner requiring permission under the Copyright and Similar +Rights held by the Licensor. For purposes of this Public License, where the +Licensed Material is a musical work, performance, or sound recording, Adapted +Material is always produced where the Licensed Material is synched in timed +relation with a moving image. + +b. Adapter's License means the license You apply to Your Copyright and Similar +Rights in Your contributions to Adapted Material in accordance with the terms +and conditions of this Public License. + +c. Copyright and Similar Rights means copyright and/or similar rights closely +related to copyright including, without limitation, performance, broadcast, +sound recording, and Sui Generis Database Rights, without regard to how the +rights are labeled or categorized. For purposes of this Public License, the +rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +d. Effective Technological Measures means those measures that, in the absence +of proper authority, may not be circumvented under laws fulfilling obligations +under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, +and/or similar international agreements. + +e. Exceptions and Limitations means fair use, fair dealing, and/or any other +exception or limitation to Copyright and Similar Rights that applies to Your +use of the Licensed Material. + +f. Licensed Material means the artistic or literary work, database, or other +material to which the Licensor applied this Public License. + +g. Licensed Rights means the rights granted to You subject to the terms and +conditions of this Public License, which are limited to all Copyright and +Similar Rights that apply to Your use of the Licensed Material and that the +Licensor has authority to license. + +h. Licensor means the individual(s) or entity(ies) granting rights under this +Public License. + +i. Share means to provide material to the public by any means or process that +requires permission under the Licensed Rights, such as reproduction, public +display, public performance, distribution, dissemination, communication, or +importation, and to make material available to the public including in ways +that members of the public may access the material from a place and at a time +individually chosen by them. + +j. Sui Generis Database Rights means rights other than copyright resulting +from Directive 96/9/EC of the European Parliament and of the Council of 11 +March 1996 on the legal protection of databases, as amended and/or succeeded, +as well as other essentially equivalent rights anywhere in the world. + +k. You means the individual or entity exercising the Licensed Rights under +this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + a. License grant. + +1. Subject to the terms and conditions of this Public License, the Licensor +hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, +irrevocable license to exercise the Licensed Rights in the Licensed Material +to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + +2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions +and Limitations apply to Your use, this Public License does not apply, and +You do not need to comply with its terms and conditions. + + 3. Term. The term of this Public License is specified in Section 6(a). + +4. Media and formats; technical modifications allowed. The Licensor authorizes +You to exercise the Licensed Rights in all media and formats whether now known +or hereafter created, and to make technical modifications necessary to do +so. The Licensor waives and/or agrees not to assert any right or authority +to forbid You from making technical modifications necessary to exercise the +Licensed Rights, including technical modifications necessary to circumvent +Effective Technological Measures. For purposes of this Public License, simply +making modifications authorized by this Section 2(a)(4) never produces Adapted +Material. + + 5. Downstream recipients. + +A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed +Material automatically receives an offer from the Licensor to exercise the +Licensed Rights under the terms and conditions of this Public License. + +B. No downstream restrictions. You may not offer or impose any additional +or different terms or conditions on, or apply any Effective Technological +Measures to, the Licensed Material if doing so restricts exercise of the Licensed +Rights by any recipient of the Licensed Material. + +6. No endorsement. Nothing in this Public License constitutes or may be construed +as permission to assert or imply that You are, or that Your use of the Licensed +Material is, connected with, or sponsored, endorsed, or granted official status +by, the Licensor or others designated to receive attribution as provided in +Section 3(a)(1)(A)(i). + + b. Other rights. + +1. Moral rights, such as the right of integrity, are not licensed under this +Public License, nor are publicity, privacy, and/or other similar personality +rights; however, to the extent possible, the Licensor waives and/or agrees +not to assert any such rights held by the Licensor to the limited extent necessary +to allow You to exercise the Licensed Rights, but not otherwise. + +2. Patent and trademark rights are not licensed under this Public License. + +3. To the extent possible, the Licensor waives any right to collect royalties +from You for the exercise of the Licensed Rights, whether directly or through +a collecting society under any voluntary or waivable statutory or compulsory +licensing scheme. In all other cases the Licensor expressly reserves any right +to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following +conditions. + + a. Attribution. + +1. If You Share the Licensed Material (including in modified form), You must: + +A. retain the following if it is supplied by the Licensor with the Licensed +Material: + +i. identification of the creator(s) of the Licensed Material and any others +designated to receive attribution, in any reasonable manner requested by the +Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + +v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + +B. indicate if You modified the Licensed Material and retain an indication +of any previous modifications; and + +C. indicate the Licensed Material is licensed under this Public License, and +include the text of, or the URI or hyperlink to, this Public License. + +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner +based on the medium, means, and context in which You Share the Licensed Material. +For example, it may be reasonable to satisfy the conditions by providing a +URI or hyperlink to a resource that includes the required information. + +3. If requested by the Licensor, You must remove any of the information required +by Section 3(a)(1)(A) to the extent reasonably practicable. + +4. If You Share Adapted Material You produce, the Adapter's License You apply +must not prevent recipients of the Adapted Material from complying with this +Public License. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to +Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, +reuse, reproduce, and Share all or a substantial portion of the contents of +the database; + +b. if You include all or a substantial portion of the database contents in +a database in which You have Sui Generis Database Rights, then the database +in which You have Sui Generis Database Rights (but not its individual contents) +is Adapted Material; and + +c. You must comply with the conditions in Section 3(a) if You Share all or +a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace +Your obligations under this Public License where the Licensed Rights include +other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. Unless otherwise separately undertaken by the Licensor, to the extent possible, +the Licensor offers the Licensed Material as-is and as-available, and makes +no representations or warranties of any kind concerning the Licensed Material, +whether express, implied, statutory, or other. This includes, without limitation, +warranties of title, merchantability, fitness for a particular purpose, non-infringement, +absence of latent or other defects, accuracy, or the presence or absence of +errors, whether or not known or discoverable. Where disclaimers of warranties +are not allowed in full or in part, this disclaimer may not apply to You. + +b. To the extent possible, in no event will the Licensor be liable to You +on any legal theory (including, without limitation, negligence) or otherwise +for any direct, special, indirect, incidental, consequential, punitive, exemplary, +or other losses, costs, expenses, or damages arising out of this Public License +or use of the Licensed Material, even if the Licensor has been advised of +the possibility of such losses, costs, expenses, or damages. Where a limitation +of liability is not allowed in full or in part, this limitation may not apply +to You. + +c. The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most closely +approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights +licensed here. However, if You fail to comply with this Public License, then +Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section +6(a), it reinstates: + +1. automatically as of the date the violation is cured, provided it is cured +within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + +c. For the avoidance of doubt, this Section 6(b) does not affect any right +the Licensor may have to seek remedies for Your violations of this Public +License. + +d. For the avoidance of doubt, the Licensor may also offer the Licensed Material +under separate terms or conditions or stop distributing the Licensed Material +at any time; however, doing so will not terminate this Public License. + + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or +conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed +Material not stated herein are separate from and independent of the terms +and conditions of this Public License. + +Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not +be interpreted to, reduce, limit, restrict, or impose conditions on any use +of the Licensed Material that could lawfully be made without permission under +this Public License. + +b. To the extent possible, if any provision of this Public License is deemed +unenforceable, it shall be automatically reformed to the minimum extent necessary +to make it enforceable. If the provision cannot be reformed, it shall be severed +from this Public License without affecting the enforceability of the remaining +terms and conditions. + +c. No term or condition of this Public License will be waived and no failure +to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation +upon, or waiver of, any privileges and immunities that apply to the Licensor +or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative +Commons may elect to apply one of its public licenses to material it publishes +and in those instances will be considered the "Licensor." The text of the +Creative Commons public licenses is dedicated to the public domain under the +CC0 Public Domain Dedication. Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as otherwise +permitted by the Creative Commons policies published at creativecommons.org/policies, +Creative Commons does not authorize the use of the trademark "Creative Commons" +or any other trademark or logo of Creative Commons without its prior written +consent including, without limitation, in connection with any unauthorized +modifications to any of its public licenses or any other arrangements, understandings, +or agreements concerning use of licensed material. For the avoidance of doubt, +this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 100644 index 000000000..a343ccd43 --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,119 @@ +Creative Commons Legal Code + +CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES +NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE +AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION +ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE +OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS +LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION +OR WORKS PROVIDED HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer exclusive +Copyright and Related Rights (defined below) upon the creator and subsequent +owner(s) (each and all, an "owner") of an original work of authorship and/or +a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later claims +of infringement build upon, modify, incorporate in other works, reuse and +redistribute as freely as possible in any form whatsoever and for any purposes, +including without limitation commercial purposes. These owners may contribute +to the Commons to promote the ideal of a free culture and the further production +of creative, cultural and scientific works, or to gain reputation or greater +distribution for their Work in part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with +a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or +her Copyright and Related Rights in the Work and the meaning and intended +legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be protected +by copyright and related or neighboring rights ("Copyright and Related Rights"). +Copyright and Related Rights include, but are not limited to, the following: + +i. the right to reproduce, adapt, distribute, perform, display, communicate, +and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + +iii. publicity and privacy rights pertaining to a person's image or likeness +depicted in a Work; + +iv. rights protecting against unfair competition in regards to a Work, subject +to the limitations in paragraph 4(a), below; + +v. rights protecting the extraction, dissemination, use and reuse of data +in a Work; + +vi. database rights (such as those arising under Directive 96/9/EC of the +European Parliament and of the Council of 11 March 1996 on the legal protection +of databases, and under any national implementation thereof, including any +amended or successor version of such directive); and + +vii. other similar, equivalent or corresponding rights throughout the world +based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time extensions), +(iii) in any current or future medium and for any number of copies, and (iv) +for any purpose whatsoever, including without limitation commercial, advertising +or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the +benefit of each member of the public at large and to the detriment of Affirmer's +heirs and successors, fully intending that such Waiver shall not be subject +to revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account Affirmer's +express Statement of Purpose. In addition, to the extent the Waiver is so +judged Affirmer hereby grants to each affected person a royalty-free, non +transferable, non sublicensable, non exclusive, irrevocable and unconditional +license to exercise Affirmer's Copyright and Related Rights in the Work (i) +in all territories worldwide, (ii) for the maximum duration provided by applicable +law or treaty (including future time extensions), (iii) in any current or +future medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional purposes +(the "License"). The License shall be deemed effective as of the date CC0 +was applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder of +the License, and in such case Affirmer hereby affirms that he or she will +not (i) exercise any of his or her remaining Copyright and Related Rights +in the Work or (ii) assert any associated claims and causes of action with +respect to the Work, in either case contrary to Affirmer's express Statement +of Purpose. + + 4. Limitations and Disclaimers. + +a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, +licensed or otherwise affected by this document. + +b. Affirmer offers the Work as-is and makes no representations or warranties +of any kind concerning the Work, express, implied, statutory or otherwise, +including without limitation warranties of title, merchantability, fitness +for a particular purpose, non infringement, or the absence of latent or other +defects, accuracy, or the present or absence of errors, whether or not discoverable, +all to the greatest extent permissible under applicable law. + +c. Affirmer disclaims responsibility for clearing rights of other persons +that may apply to the Work or any use thereof, including without limitation +any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims +responsibility for obtaining any necessary consents, permissions or other +rights required for any use of the Work. + +d. Affirmer understands and acknowledges that Creative Commons is not a party +to this document and has no duty or obligation with respect to this CC0 or +use of the Work. diff --git a/LICENSE b/LICENSES/GPL-3.0-or-later.txt similarity index 100% rename from LICENSE rename to LICENSES/GPL-3.0-or-later.txt diff --git a/LICENSES/GPLv2+-libpwquality b/LICENSES/GPLv2+-libpwquality deleted file mode 100644 index 5d1984656..000000000 --- a/LICENSES/GPLv2+-libpwquality +++ /dev/null @@ -1,383 +0,0 @@ -Unless otherwise *explicitly* stated the following text describes the -licensed conditions under which the contents of this libpwquality release -may be distributed: - -------------------------------------------------------------------------- -Redistribution and use in source and binary forms of libpwquality, with -or without modification, are permitted provided that the following -conditions are met: - -1. Redistributions of source code must retain any existing copyright - notice, and this entire permission notice in its entirety, - including the disclaimer of warranties. - -2. Redistributions in binary form must reproduce all prior and current - copyright notices, this list of conditions, and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - -3. The name of any author may not be used to endorse or promote - products derived from this software without their specific prior - written permission. - -ALTERNATIVELY, this product may be distributed under the terms of the -GNU General Public License version 2 or later, in which case the provisions -of the GNU GPL are required INSTEAD OF the above restrictions. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -The full text of the GNU GENERAL PUBLIC LICENSE Version 2 is included -below. - -------------------------------------------------------------------------- - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/LICENSES/GPLv3+-ImageRegistry b/LICENSES/GPLv3+-ImageRegistry deleted file mode 100644 index 362e89766..000000000 --- a/LICENSES/GPLv3+-ImageRegistry +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2012, Christian Muehlhaeuser - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ diff --git a/LICENSES/LGPLv2-KDAB b/LICENSES/LGPL-2.0-only.txt similarity index 100% rename from LICENSES/LGPLv2-KDAB rename to LICENSES/LGPL-2.0-only.txt diff --git a/LICENSES/LGPL-2.1-only.txt b/LICENSES/LGPL-2.1-only.txt new file mode 100644 index 000000000..130dffb31 --- /dev/null +++ b/LICENSES/LGPL-2.1-only.txt @@ -0,0 +1,467 @@ +GNU LESSER GENERAL PUBLIC LICENSE + +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. + +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts as the +successor of the GNU Library Public License, version 2, hence the version +number 2.1.] + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public Licenses are intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. + +This license, the Lesser General Public License, applies to some specially +designated software packages--typically libraries--of the Free Software Foundation +and other authors who decide to use it. You can use it too, but we suggest +you first think carefully about whether this license or the ordinary General +Public License is the better strategy to use in any particular case, based +on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. +Our General Public Licenses are designed to make sure that you have the freedom +to distribute copies of free software (and charge for this service if you +wish); that you receive source code or can get it if you want it; that you +can change the software and use pieces of it in new free programs; and that +you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors +to deny you these rights or to ask you to surrender these rights. These restrictions +translate to certain responsibilities for you if you distribute copies of +the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for +a fee, you must give the recipients all the rights that we gave you. You must +make sure that they, too, receive or can get the source code. If you link +other code with the library, you must provide complete object files to the +recipients, so that they can relink them with the library after making changes +to the library and recompiling it. And you must show them these terms so they +know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, +and (2) we offer you this license, which gives you legal permission to copy, +distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no +warranty for the free library. Also, if the library is modified by someone +else and passed on, the recipients should know that what they have is not +the original version, so that the original author's reputation will not be +affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free +program. We wish to make sure that a company cannot effectively restrict the +users of a free program by obtaining a restrictive license from a patent holder. +Therefore, we insist that any patent license obtained for a version of the +library must be consistent with the full freedom of use specified in this +license. + +Most GNU software, including some libraries, is covered by the ordinary GNU +General Public License. This license, the GNU Lesser General Public License, +applies to certain designated libraries, and is quite different from the ordinary +General Public License. We use this license for certain libraries in order +to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared +library, the combination of the two is legally speaking a combined work, a +derivative of the original library. The ordinary General Public License therefore +permits such linking only if the entire combination fits its criteria of freedom. +The Lesser General Public License permits more lax criteria for linking other +code with the library. + +We call this license the "Lesser" General Public License because it does Less +to protect the user's freedom than the ordinary General Public License. It +also provides other free software developers Less of an advantage over competing +non-free programs. These disadvantages are the reason we use the ordinary +General Public License for many libraries. However, the Lesser license provides +advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the +widest possible use of a certain library, so that it becomes a de-facto standard. +To achieve this, non-free programs must be allowed to use the library. A more +frequent case is that a free library does the same job as widely used non-free +libraries. In this case, there is little to gain by limiting the free library +to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs +enables a greater number of people to use a large body of free software. For +example, permission to use the GNU C Library in non-free programs enables +many more people to use the whole GNU operating system, as well as its variant, +the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' +freedom, it does ensure that the user of a program that is linked with the +Library has the freedom and the wherewithal to run that program using a modified +version of the Library. + +The precise terms and conditions for copying, distribution and modification +follow. Pay close attention to the difference between a "work based on the +library" and a "work that uses the library". The former contains code derived +from the library, whereas the latter must be combined with the library in +order to run. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License Agreement applies to any software library or other program +which contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Lesser General +Public License (also called "this License"). Each licensee is addressed as +"you". + +A "library" means a collection of software functions and/or data prepared +so as to be conveniently linked with application programs (which use some +of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has +been distributed under these terms. A "work based on the Library" means either +the Library or any derivative work under copyright law: that is to say, a +work containing the Library or a portion of it, either verbatim or with modifications +and/or translated straightforwardly into another language. (Hereinafter, translation +is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications +to it. For a library, complete source code means all the source code for all +modules it contains, plus any associated interface definition files, plus +the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered +by this License; they are outside its scope. The act of running a program +using the Library is not restricted, and output from such a program is covered +only if its contents constitute a work based on the Library (independent of +the use of the Library in a tool for writing it). Whether that is true depends +on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and disclaimer +of warranty; keep intact all the notices that refer to this License and to +the absence of any warranty; and distribute a copy of this License along with +the Library. + +You may charge a fee for the physical act of transferring a copy, and you +may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, +thus forming a work based on the Library, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all +of these conditions: + + a) The modified work must itself be a software library. + +b) You must cause the files modified to carry prominent notices stating that +you changed the files and the date of any change. + +c) You must cause the whole of the work to be licensed at no charge to all +third parties under the terms of this License. + +d) If a facility in the modified Library refers to a function or a table of +data to be supplied by an application program that uses the facility, other +than as an argument passed when the facility is invoked, then you must make +a good faith effort to ensure that, in the event an application does not supply +such function or table, the facility still operates, and performs whatever +part of its purpose remains meaningful. + +(For example, a function in a library to compute square roots has a purpose +that is entirely well-defined independent of the application. Therefore, Subsection +2d requires that any application-supplied function or table used by this function +must be optional: if the application does not supply it, the square root function +must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Library, and can be reasonably +considered independent and separate works in themselves, then this License, +and its terms, do not apply to those sections when you distribute them as +separate works. But when you distribute the same sections as part of a whole +which is a work based on the Library, the distribution of the whole must be +on the terms of this License, whose permissions for other licensees extend +to the entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise +the right to control the distribution of derivative or collective works based +on the Library. + +In addition, mere aggregation of another work not based on the Library with +the Library (or with a work based on the Library) on a volume of a storage +or distribution medium does not bring the other work under the scope of this +License. + +3. You may opt to apply the terms of the ordinary GNU General Public License +instead of this License to a given copy of the Library. To do this, you must +alter all the notices that refer to this License, so that they refer to the +ordinary GNU General Public License, version 2, instead of to this License. +(If a newer version than version 2 of the ordinary GNU General Public License +has appeared, then you can specify that version instead if you wish.) Do not +make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, +so the ordinary GNU General Public License applies to all subsequent copies +and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library +into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of +it, under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you accompany it with the complete corresponding +machine-readable source code, which must be distributed under the terms of +Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated +place, then offering equivalent access to copy the source code from the same +place satisfies the requirement to distribute the source code, even though +third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but +is designed to work with the Library by being compiled or linked with it, +is called a "work that uses the Library". Such a work, in isolation, is not +a derivative work of the Library, and therefore falls outside the scope of +this License. + +However, linking a "work that uses the Library" with the Library creates an +executable that is a derivative of the Library (because it contains portions +of the Library), rather than a "work that uses the library". The executable +is therefore covered by this License. Section 6 states terms for distribution +of such executables. + +When a "work that uses the Library" uses material from a header file that +is part of the Library, the object code for the work may be a derivative work +of the Library even though the source code is not. Whether this is true is +especially significant if the work can be linked without the Library, or if +the work is itself a library. The threshold for this to be true is not precisely +defined by law. + +If such an object file uses only numerical parameters, data structure layouts +and accessors, and small macros and small inline functions (ten lines or less +in length), then the use of the object file is unrestricted, regardless of +whether it is legally a derivative work. (Executables containing this object +code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute +the object code for the work under the terms of Section 6. Any executables +containing that work also fall under Section 6, whether or not they are linked +directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work +that uses the Library" with the Library to produce a work containing portions +of the Library, and distribute that work under terms of your choice, provided +that the terms permit modification of the work for the customer's own use +and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library +is used in it and that the Library and its use are covered by this License. +You must supply a copy of this License. If the work during execution displays +copyright notices, you must include the copyright notice for the Library among +them, as well as a reference directing the user to the copy of this License. +Also, you must do one of these things: + +a) Accompany the work with the complete corresponding machine-readable source +code for the Library including whatever changes were used in the work (which +must be distributed under Sections 1 and 2 above); and, if the work is an +executable linked with the Library, with the complete machine-readable "work +that uses the Library", as object code and/or source code, so that the user +can modify the Library and then relink to produce a modified executable containing +the modified Library. (It is understood that the user who changes the contents +of definitions files in the Library will not necessarily be able to recompile +the application to use the modified definitions.) + +b) Use a suitable shared library mechanism for linking with the Library. A +suitable mechanism is one that (1) uses at run time a copy of the library +already present on the user's computer system, rather than copying library +functions into the executable, and (2) will operate properly with a modified +version of the library, if the user installs one, as long as the modified +version is interface-compatible with the version that the work was made with. + +c) Accompany the work with a written offer, valid for at least three years, +to give the same user the materials specified in Subsection 6a, above, for +a charge no more than the cost of performing this distribution. + +d) If distribution of the work is made by offering access to copy from a designated +place, offer equivalent access to copy the above specified materials from +the same place. + +e) Verify that the user has already received a copy of these materials or +that you have already sent this user a copy. + +For an executable, the required form of the "work that uses the Library" must +include any data and utility programs needed for reproducing the executable +from it. However, as a special exception, the materials to be distributed +need not include anything that is normally distributed (in either source or +binary form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component itself +accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of +other proprietary libraries that do not normally accompany the operating system. +Such a contradiction means you cannot use both them and the Library together +in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side +in a single library together with other library facilities not covered by +this License, and distribute such a combined library, provided that the separate +distribution of the work based on the Library and of the other library facilities +is otherwise permitted, and provided that you do these two things: + +a) Accompany the combined library with a copy of the same work based on the +Library, uncombined with any other library facilities. This must be distributed +under the terms of the Sections above. + +b) Give prominent notice with the combined library of the fact that part of +it is a work based on the Library, and explaining where to find the accompanying +uncombined form of the same work. + +8. You may not copy, modify, sublicense, link with, or distribute the Library +except as expressly provided under this License. Any attempt otherwise to +copy, modify, sublicense, link with, or distribute the Library is void, and +will automatically terminate your rights under this License. However, parties +who have received copies, or rights, from you under this License will not +have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed +it. However, nothing else grants you permission to modify or distribute the +Library or its derivative works. These actions are prohibited by law if you +do not accept this License. Therefore, by modifying or distributing the Library +(or any work based on the Library), you indicate your acceptance of this License +to do so, and all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), +the recipient automatically receives a license from the original licensor +to copy, distribute, link with or modify the Library subject to these terms +and conditions. You may not impose any further restrictions on the recipients' +exercise of the rights granted herein. You are not responsible for enforcing +compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement +or for any other reason (not limited to patent issues), conditions are imposed +on you (whether by court order, agreement or otherwise) that contradict the +conditions of this License, they do not excuse you from the conditions of +this License. If you cannot distribute so as to satisfy simultaneously your +obligations under this License and any other pertinent obligations, then as +a consequence you may not distribute the Library at all. For example, if a +patent license would not permit royalty-free redistribution of the Library +by all those who receive copies directly or indirectly through you, then the +only way you could satisfy both it and this License would be to refrain entirely +from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents +or other property right claims or to contest validity of any such claims; +this section has the sole purpose of protecting the integrity of the free +software distribution system which is implemented by public license practices. +Many people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose +that choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain +countries either by patents or by copyrighted interfaces, the original copyright +holder who places the Library under this License may add an explicit geographical +distribution limitation excluding those countries, so that distribution is +permitted only in or among countries not thus excluded. In such case, this +License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of +the Lesser General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to address +new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies +a version number of this License which applies to it and "any later version", +you have the option of following the terms and conditions either of that version +or of any later version published by the Free Software Foundation. If the +Library does not specify a license version number, you may choose any version +ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs +whose distribution conditions are incompatible with these, write to the author +to ask for permission. For software which is copyrighted by the Free Software +Foundation, write to the Free Software Foundation; we sometimes make exceptions +for this. Our decision will be guided by the two goals of preserving the free +status of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY +"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE +OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE +THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE +OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA +OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES +OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH +HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Libraries + +If you develop a new library, and you want it to be of the greatest possible +use to the public, we recommend making it free software that everyone can +redistribute and change. You can do so by permitting redistribution under +these terms (or, alternatively, under the terms of the ordinary General Public +License). + +To apply these terms, attach the following notices to the library. It is safest +to attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the "copyright" +line and a pointer to where the full notice is found. + +< one line to give the library's name and an idea of what it does. > + +Copyright (C) < year > < name of author > + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2.1 of the License, or (at your option) +any later version. + +This library is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 51 +Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information +on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the library, if necessary. Here +is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in + +the library `Frob' (a library for tweaking knobs) written + +by James Random Hacker. + +< signature of Ty Coon > , 1 April 1990 + +Ty Coon, President of Vice + +That's all there is to it! diff --git a/LICENSES/LGPL-3.0-or-later.txt b/LICENSES/LGPL-3.0-or-later.txt new file mode 100644 index 000000000..bd405afbe --- /dev/null +++ b/LICENSES/LGPL-3.0-or-later.txt @@ -0,0 +1,163 @@ +GNU LESSER GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates the terms +and conditions of version 3 of the GNU General Public License, supplemented +by the additional permissions listed below. + + 0. Additional Definitions. + + + +As used herein, "this License" refers to version 3 of the GNU Lesser General +Public License, and the "GNU GPL" refers to version 3 of the GNU General Public +License. + + + +"The Library" refers to a covered work governed by this License, other than +an Application or a Combined Work as defined below. + + + +An "Application" is any work that makes use of an interface provided by the +Library, but which is not otherwise based on the Library. Defining a subclass +of a class defined by the Library is deemed a mode of using an interface provided +by the Library. + + + +A "Combined Work" is a work produced by combining or linking an Application +with the Library. The particular version of the Library with which the Combined +Work was made is also called the "Linked Version". + + + +The "Minimal Corresponding Source" for a Combined Work means the Corresponding +Source for the Combined Work, excluding any source code for portions of the +Combined Work that, considered in isolation, are based on the Application, +and not on the Linked Version. + + + +The "Corresponding Application Code" for a Combined Work means the object +code and/or source code for the Application, including any data and utility +programs needed for reproducing the Combined Work from the Application, but +excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + +You may convey a covered work under sections 3 and 4 of this License without +being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + +If you modify a copy of the Library, and, in your modifications, a facility +refers to a function or data to be supplied by an Application that uses the +facility (other than as an argument passed when the facility is invoked), +then you may convey a copy of the modified version: + +a) under this License, provided that you make a good faith effort to ensure +that, in the event an Application does not supply the function or data, the +facility still operates, and performs whatever part of its purpose remains +meaningful, or + +b) under the GNU GPL, with none of the additional permissions of this License +applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + +The object code form of an Application may incorporate material from a header +file that is part of the Library. You may convey such object code under terms +of your choice, provided that, if the incorporated material is not limited +to numerical parameters, data structure layouts and accessors, or small macros, +inline functions and templates (ten or fewer lines in length), you do both +of the following: + +a) Give prominent notice with each copy of the object code that the Library +is used in it and that the Library and its use are covered by this License. + +b) Accompany the object code with a copy of the GNU GPL and this license document. + + 4. Combined Works. + +You may convey a Combined Work under terms of your choice that, taken together, +effectively do not restrict modification of the portions of the Library contained +in the Combined Work and reverse engineering for debugging such modifications, +if you also do each of the following: + +a) Give prominent notice with each copy of the Combined Work that the Library +is used in it and that the Library and its use are covered by this License. + +b) Accompany the Combined Work with a copy of the GNU GPL and this license +document. + +c) For a Combined Work that displays copyright notices during execution, include +the copyright notice for the Library among these notices, as well as a reference +directing the user to the copies of the GNU GPL and this license document. + + d) Do one of the following: + +0) Convey the Minimal Corresponding Source under the terms of this License, +and the Corresponding Application Code in a form suitable for, and under terms +that permit, the user to recombine or relink the Application with a modified +version of the Linked Version to produce a modified Combined Work, in the +manner specified by section 6 of the GNU GPL for conveying Corresponding Source. + +1) Use a suitable shared library mechanism for linking with the Library. A +suitable mechanism is one that (a) uses at run time a copy of the Library +already present on the user's computer system, and (b) will operate properly +with a modified version of the Library that is interface-compatible with the +Linked Version. + +e) Provide Installation Information, but only if you would otherwise be required +to provide such information under section 6 of the GNU GPL, and only to the +extent that such information is necessary to install and execute a modified +version of the Combined Work produced by recombining or relinking the Application +with a modified version of the Linked Version. (If you use option 4d0, the +Installation Information must accompany the Minimal Corresponding Source and +Corresponding Application Code. If you use option 4d1, you must provide the +Installation Information in the manner specified by section 6 of the GNU GPL +for conveying Corresponding Source.) + + 5. Combined Libraries. + +You may place library facilities that are a work based on the Library side +by side in a single library together with other library facilities that are +not Applications and are not covered by this License, and convey such a combined +library under terms of your choice, if you do both of the following: + +a) Accompany the combined library with a copy of the same work based on the +Library, uncombined with any other library facilities, conveyed under the +terms of this License. + +b) Give prominent notice with the combined library that part of it is a work +based on the Library, and explaining where to find the accompanying uncombined +form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + +The Free Software Foundation may publish revised and/or new versions of the +GNU Lesser General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to address +new problems or concerns. + +Each version is given a distinguishing version number. If the Library as you +received it specifies that a certain numbered version of the GNU Lesser General +Public License "or any later version" applies to it, you have the option of +following the terms and conditions either of that published version or of +any later version published by the Free Software Foundation. If the Library +as you received it does not specify a version number of the GNU Lesser General +Public License, you may choose any version of the GNU Lesser General Public +License ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide whether +future versions of the GNU Lesser General Public License shall apply, that +proxy's public statement of acceptance of any version is permanent authorization +for you to choose that version for the Library. diff --git a/LICENSES/LGPLv2.1-Presentation b/LICENSES/LGPLv2.1-Presentation deleted file mode 100644 index 1bb6461eb..000000000 --- a/LICENSES/LGPLv2.1-Presentation +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QML Presentation System. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QML Presentation System. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - diff --git a/LICENSES/LGPLv2.1-Presentation-Exception b/LICENSES/LGPLv2.1-Presentation-Exception deleted file mode 100644 index 7e2e30ff9..000000000 --- a/LICENSES/LGPLv2.1-Presentation-Exception +++ /dev/null @@ -1,22 +0,0 @@ -Digia Qt LGPL Exception version 1.1 - -As an additional permission to the GNU Lesser General Public License version -2.1, the object code form of a "work that uses the Library" may incorporate -material from a header file that is part of the Library. You may distribute -such object code under terms of your choice, provided that: - (i) the header files of the Library have not been modified; and - (ii) the incorporated material is limited to numerical parameters, data - structure layouts, accessors, macros, inline functions and - templates; and - (iii) you comply with the terms of Section 6 of the GNU Lesser General - Public License version 2.1. - -Moreover, you may apply this exception to a modified version of the Library, -provided that such modification does not involve copying material from the -Library into the modified Library's header files unless such material is -limited to (i) numerical parameters; (ii) data structure layouts; -(iii) accessors; and (iv) small macros, templates and inline functions of -five lines or less in length. - -Furthermore, you are not required to apply this additional permission to a -modified version of the Library. diff --git a/LICENSES/LGPLv3-Breeze b/LICENSES/LGPLv3-Breeze deleted file mode 100644 index 63d73657c..000000000 --- a/LICENSES/LGPLv3-Breeze +++ /dev/null @@ -1,209 +0,0 @@ -The Breeze Icon Theme in icons/ - - Copyright (C) 2014 Uri Herrera and others - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see . - -Clarification: - - The GNU Lesser General Public License or LGPL is written for - software libraries in the first place. We expressly want the LGPL to - be valid for this artwork library too. - - KDE Breeze theme icons is a special kind of software library, it is an - artwork library, it's elements can be used in a Graphical User Interface, or - GUI. - - Source code, for this library means: - - where they exist, SVG; - - otherwise, if applicable, the multi-layered formats xcf or psd, or - otherwise png. - - The LGPL in some sections obliges you to make the files carry - notices. With images this is in some cases impossible or hardly useful. - - With this library a notice is placed at a prominent place in the directory - containing the elements. You may follow this practice. - - The exception in section 5 of the GNU Lesser General Public License covers - the use of elements of this art library in a GUI. - - https://vdesign.kde.org/ - ------ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/LICENSES/MIT-QtWaitingSpinner b/LICENSES/MIT-QtWaitingSpinner deleted file mode 100644 index c85c97aeb..000000000 --- a/LICENSES/MIT-QtWaitingSpinner +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Original Work Copyright (c) 2012-2015 Alexander Turkin -Modified 2014 by William Hallatt - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 000000000..204b93da4 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,19 @@ +MIT License Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 2544ebb69..3ba9221d6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ + + ### Calamares: Distribution-Independent Installer Framework --------- diff --git a/ci/AppImage.md b/ci/AppImage.md deleted file mode 100644 index 7fa51a8bc..000000000 --- a/ci/AppImage.md +++ /dev/null @@ -1,45 +0,0 @@ -# AppImage building for Calamares - -> It is possible to build Calamares as an AppImage (perhaps other -> containerized formats as well). This might make sense for -> OEM phase-1 deployments in environments where Calamares is -> not using the native toolkit. - -## AppImage tools - -You will need - - [`linuxdeploy-x86_64.AppImage`](https://github.com/linuxdeploy/linuxdeploy/releases) - - [`linuxdeploy-plugin-qt-x86_64.AppImage`](https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases) - - [`linuxdeploy-plugin-conda.sh`](https://github.com/linuxdeploy/linuxdeploy-plugin-conda) - -These tools should run -- they are bundled as AppImages after all -- on -any modern Linux system. The [AppImage packaging documentation](https://docs.appimage.org/packaging-guide/) -explains how the whole tooling works. - -If the tools are not present, the build script (see below) will download them, -but you should save them for later. - -## AppImage build - -From the **source** directory, run `ci/AppImage.sh`: - - Use `--tools-dir` to copy the tools from a local cache rather than - downloading them again. - - Run it with `--cmake-args` for special CMake handling. - - Use `--skip-build` to avoid rebuilding Calamares all the time. - - Use `--config-dir` to copy in Calamares configuration files (e.g. - *settings.conf* and the module configuration files) from a given - directory. - -The build process will: - - copy (or download) the AppImage tools into a fresh build directory - - configure and build Calamares with suitable settings - - modifies the standard `.desktop` file to be AppImage-compatible - - builds the image with the AppImage tools - -## AppImage caveats - -The resulting AppImage, `Calamares-x86_64.AppImage`, can be run as if it is -a regular Calamares executable. For internal reasons it always passes the -`-X` flag; any other command-line flags are passed in unchanged. Internally, -`XDG_*_DIRS` are used to get Calamares to find the resources inside the AppImage -rather than in the host system. diff --git a/ci/AppImage.sh b/ci/AppImage.sh index 1bb067b1e..116023c53 100755 --- a/ci/AppImage.sh +++ b/ci/AppImage.sh @@ -1,9 +1,8 @@ #! /bin/sh # +# SPDX-FileCopyrightText: 2019 Adriaan de Groot # SPDX-License-Identifier: BSD-2-Clause # -# Copyright 2019 Adriaan de Groot -# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/ci/HACKING.md b/ci/HACKING.md deleted file mode 100644 index f1c8b750b..000000000 --- a/ci/HACKING.md +++ /dev/null @@ -1 +0,0 @@ -This has moved [to the wiki](https://github.com/calamares/calamares/wiki/Develop-Code). diff --git a/ci/RELEASE.md b/ci/RELEASE.md index 7fa19c26a..3bb6b1b9e 100644 --- a/ci/RELEASE.md +++ b/ci/RELEASE.md @@ -1,5 +1,10 @@ # Calamares Release Process + + > Calamares releases are now rolling when-they-are-ready releases. > Releases are made from *calamares* and tagged there. When, in future, > LTS releases resume, these steps may be edited again. diff --git a/ci/RELEASE.sh b/ci/RELEASE.sh index 82c77c3e2..6f1b198c9 100755 --- a/ci/RELEASE.sh +++ b/ci/RELEASE.sh @@ -1,5 +1,8 @@ #! /bin/sh # +# SPDX-FileCopyrightText: 2018 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# ### USAGE # # Release script for Calamares diff --git a/ci/astylerc b/ci/astylerc index 7fb769a9d..01eda2522 100644 --- a/ci/astylerc +++ b/ci/astylerc @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2014 Aurélien Gâteau +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause + # Do not create a backup file suffix=none diff --git a/ci/calamaresstyle b/ci/calamaresstyle index 44f9fe91f..d2ce360bb 100755 --- a/ci/calamaresstyle +++ b/ci/calamaresstyle @@ -1,7 +1,16 @@ #!/bin/sh # +# SPDX-FileCopyrightText: 2014 Aurélien Gâteau +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# # Calls astyle with settings matching Calamares coding style -# Requires astyle >= 2.04 and clang-format-7 +# Requires astyle >= 2.04 and clang-format-7 -8 or -9 +# +# Clang-format-10 is **not** supported, since it changes a default +# that re-introduces a space into empty function bodies; this +# can be turned off with a style setting, but that breaks +# older format versions which don't recognize the setting. # # You can pass in directory names, in which case the files # in that directory (NOT below it) are processed. @@ -38,8 +47,10 @@ done style_some() { - $AS --options=$(dirname $0)/astylerc --quiet "$@" - $CF -i -style=file "$@" + if test -n "$*" ; then + $AS --options=$(dirname $0)/astylerc --quiet "$@" + $CF -i -style=file "$@" + fi } if test "x$any_dirs" = "xyes" ; then diff --git a/ci/configvalidator.py b/ci/configvalidator.py index 9d1bc21a5..5c0ee4559 100644 --- a/ci/configvalidator.py +++ b/ci/configvalidator.py @@ -2,7 +2,6 @@ # # SPDX-FileCopyrightText: 2020 Adriaan de Groot # SPDX-License-Identifier: BSD-2-Clause -# License-Filename: LICENSES/BSD2 # usage = """ Validates a Calamares config file -- YAML syntax -- against a schema. diff --git a/ci/coverity-model.c b/ci/coverity-model.c index b4282397c..1d6345335 100644 --- a/ci/coverity-model.c +++ b/ci/coverity-model.c @@ -3,4 +3,7 @@ Calamares doesn't seem to geenerate any false positives, so the model-file is empty. + + SPDX-FileCopyrightText: 2017 Adriaan de Groot + SPDX-License-Identifier: BSD-2-Clause */ diff --git a/ci/cppcheck.sh b/ci/cppcheck.sh deleted file mode 100755 index e55e97ee4..000000000 --- a/ci/cppcheck.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd "$WORKSPACE" -cppcheck --enable=all --inconclusive --xml --xml-version=2 src 2> cppcheck.xml \ No newline at end of file diff --git a/ci/travis-config.sh b/ci/travis-config.sh index 565b3deba..15163cc99 100644 --- a/ci/travis-config.sh +++ b/ci/travis-config.sh @@ -1,5 +1,8 @@ # Build configuration on Travis. # +# SPDX-FileCopyrightText: 2018 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# # Defines a CMAKE_ARGS variable for use with cmake # # This file is sourced by travis.sh, and exports the variables diff --git a/ci/travis-continuous.sh b/ci/travis-continuous.sh index 567a55d3d..ceb80df9b 100755 --- a/ci/travis-continuous.sh +++ b/ci/travis-continuous.sh @@ -1,5 +1,8 @@ #! /bin/sh # +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# # Travis CI script for use on every-commit: # - build and install Calamares # diff --git a/ci/travis-coverity.sh b/ci/travis-coverity.sh index 78535df65..5ec73568a 100755 --- a/ci/travis-coverity.sh +++ b/ci/travis-coverity.sh @@ -1,5 +1,8 @@ #! /bin/sh # +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# # Travis CI script for weekly (cron) use: # - use the coverity tool to build and and upload results # diff --git a/ci/travis.sh b/ci/travis.sh index 737da95d4..e182e48bb 100755 --- a/ci/travis.sh +++ b/ci/travis.sh @@ -1,5 +1,8 @@ #! /bin/sh # +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# # Travis build driver script: # - the regular CI runs, triggered by commits, run a script that builds # and installs calamares, and then runs the tests. diff --git a/ci/txcheck.sh b/ci/txcheck.sh index 229cc8a73..cedae6682 100644 --- a/ci/txcheck.sh +++ b/ci/txcheck.sh @@ -1,10 +1,10 @@ #! /bin/sh ### LICENSE -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# SPDX-License-Identifier: BSD-2-Clause # SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # # This file is Free Software: you can redistribute it and/or modify # it under the terms of the 2-clause BSD License. diff --git a/ci/txpull.sh b/ci/txpull.sh index 63c70fa49..f68814560 100755 --- a/ci/txpull.sh +++ b/ci/txpull.sh @@ -1,11 +1,11 @@ #!/bin/sh ### LICENSE -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# SPDX-License-Identifier: BSD-2-Clause -# SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot # SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # # This file is Free Software: you can redistribute it and/or modify # it under the terms of the 2-clause BSD License. @@ -126,7 +126,7 @@ for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do # Convert PO files to MO files for POFILE in $(find ${MODULE_DIR} -name "*.po") ; do sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' $POFILE - msgfmt -o ${POFILE%.po}.mo $POFILE + # msgfmt -o ${POFILE%.po}.mo $POFILE done git add --verbose ${MODULE_DIR}/lang/* git commit "$AUTHOR" --message="i18n: [${MODULE_NAME}] $BOILERPLATE" | true @@ -136,7 +136,7 @@ done for POFILE in $(find lang -name "python.po") ; do sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' $POFILE - msgfmt -o ${POFILE%.po}.mo $POFILE + # msgfmt -o ${POFILE%.po}.mo $POFILE done git add --verbose lang/python* git commit "$AUTHOR" --message="i18n: [python] $BOILERPLATE" | true diff --git a/ci/txpush.sh b/ci/txpush.sh index 00d8d401b..363a234e8 100755 --- a/ci/txpush.sh +++ b/ci/txpush.sh @@ -1,11 +1,11 @@ #!/bin/sh ### LICENSE -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# SPDX-License-Identifier: BSD-2-Clause -# SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot # SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # # This file is Free Software: you can redistribute it and/or modify # it under the terms of the 2-clause BSD License. diff --git a/ci/txreduce.py b/ci/txreduce.py index 6e8ae3f35..a556d78fb 100644 --- a/ci/txreduce.py +++ b/ci/txreduce.py @@ -1,5 +1,8 @@ #! /usr/bin/env python3 # +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# # Reduce a translation file -- generally, a Timezone translation -- by # dropping untranslated strings. An untranslated string is one that # has an empty translation **and** is marked unfinished. diff --git a/ci/txstats.py b/ci/txstats.py index 40fe3f43b..d7997701a 100755 --- a/ci/txstats.py +++ b/ci/txstats.py @@ -1,5 +1,8 @@ #! /usr/bin/env python3 # +# SPDX-FileCopyrightText: 2018 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# # Uses the Transifex API to get a list of enabled languages, # and outputs CMake settings for inclusion into CMakeLists.txt. # diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in index df95fb9d8..d223136a9 100644 --- a/cmake_uninstall.cmake.in +++ b/cmake_uninstall.cmake.in @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-License-Identifier: BSD-2-Clause + IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") diff --git a/com.github.calamares.calamares.policy b/com.github.calamares.calamares.policy index 6bc250e3b..976ec0f1a 100644 --- a/com.github.calamares.calamares.policy +++ b/com.github.calamares.calamares.policy @@ -1,4 +1,7 @@ + @@ -19,4 +22,4 @@ /usr/bin/calamares true - \ No newline at end of file + diff --git a/data/FreeBSD/Makefile b/data/FreeBSD/Makefile index 520a05638..d9b7e5043 100644 --- a/data/FreeBSD/Makefile +++ b/data/FreeBSD/Makefile @@ -1,4 +1,7 @@ # $FreeBSD$ +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause PORTNAME= calamares DISTVERSION= 3.2.25 diff --git a/data/completion/bash/calamares b/data/completion/bash/calamares index 47c2bb268..a73ca38a9 100644 --- a/data/completion/bash/calamares +++ b/data/completion/bash/calamares @@ -1,19 +1,10 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2020, Gaël PORTAY +# SPDX-FileCopyrightText: 2020 Gaël PORTAY +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . _calamares() { diff --git a/data/config-appimage/branding/default/squid.png.license b/data/config-appimage/branding/default/squid.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/data/config-appimage/branding/default/squid.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/config-appimage/modules/displaymanager.conf b/data/config-appimage/modules/displaymanager.conf index 8f8e9c704..5c9554602 100644 --- a/data/config-appimage/modules/displaymanager.conf +++ b/data/config-appimage/modules/displaymanager.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configure one or more display managers (e.g. SDDM) # with a "best effort" approach. --- diff --git a/data/config-appimage/modules/finished.conf b/data/config-appimage/modules/finished.conf index 48bbdc031..f0280ef58 100644 --- a/data/config-appimage/modules/finished.conf +++ b/data/config-appimage/modules/finished.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the "finished" page, which is usually shown only at # the end of the installation (successful or not). --- diff --git a/data/config-appimage/modules/keyboard.conf b/data/config-appimage/modules/keyboard.conf index ee97c3939..d122f30d7 100644 --- a/data/config-appimage/modules/keyboard.conf +++ b/data/config-appimage/modules/keyboard.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # NOTE: you must have ckbcomp installed and runnable # on the live system, for keyboard layout previews. --- diff --git a/data/config-appimage/modules/locale.conf b/data/config-appimage/modules/locale.conf index 8ae016279..5e8aa3ab5 100644 --- a/data/config-appimage/modules/locale.conf +++ b/data/config-appimage/modules/locale.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# --- # This settings are used to set your default system time zone. # Time zones are usually located under /usr/share/zoneinfo and diff --git a/data/config-appimage/modules/users.conf b/data/config-appimage/modules/users.conf index bdf812878..4d9cc4394 100644 --- a/data/config-appimage/modules/users.conf +++ b/data/config-appimage/modules/users.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the one-user-system user module. # # Besides these settings, the user module also places the following diff --git a/data/config-appimage/modules/welcome.conf b/data/config-appimage/modules/welcome.conf index 0cfb59546..2978010b7 100644 --- a/data/config-appimage/modules/welcome.conf +++ b/data/config-appimage/modules/welcome.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the welcome module. The welcome page # displays some information from the branding file. # Which parts it displays can be configured through diff --git a/data/config-appimage/settings.conf b/data/config-appimage/settings.conf index 756710492..defef0b44 100644 --- a/data/config-appimage/settings.conf +++ b/data/config-appimage/settings.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration file for Calamares # Syntax is YAML 1.2 --- diff --git a/data/example-root/README.md b/data/example-root/README.md index 7173b3eaf..9d8987286 100644 --- a/data/example-root/README.md +++ b/data/example-root/README.md @@ -1,5 +1,9 @@ # Example Filesystem + + This is a filesystem that will be used as / in an example distro, *if* you build the `example-distro` target and use the default unpackfs configuration. It should hold files and configuration diff --git a/data/example-root/etc/bash.bashrc b/data/example-root/etc/bash.bashrc index 42bd3d007..7de2a283d 100644 --- a/data/example-root/etc/bash.bashrc +++ b/data/example-root/etc/bash.bashrc @@ -1,2 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Global .profile -- add /sbin_1 PATH=$PATH:/sbin_1:/xbin diff --git a/data/example-root/etc/group b/data/example-root/etc/group index 1dbf9013e..3130ae3e8 100644 --- a/data/example-root/etc/group +++ b/data/example-root/etc/group @@ -1 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# root:x:0: diff --git a/data/example-root/etc/issue b/data/example-root/etc/issue index ce0ac58e3..22cce578e 100644 --- a/data/example-root/etc/issue +++ b/data/example-root/etc/issue @@ -1 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# This is an example /etc/issue file. diff --git a/data/example-root/etc/locale.gen b/data/example-root/etc/locale.gen index 5e729a18d..e2df1eaef 100644 --- a/data/example-root/etc/locale.gen +++ b/data/example-root/etc/locale.gen @@ -1,486 +1,10 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # This file lists locales that you wish to have built. You can find a list # of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add # user defined locales to /usr/local/share/i18n/SUPPORTED. If you change # this file, you need to rerun locale-gen. - -# aa_DJ ISO-8859-1 -# aa_DJ.UTF-8 UTF-8 -# aa_ER UTF-8 -# aa_ER@saaho UTF-8 -# aa_ET UTF-8 -# af_ZA ISO-8859-1 -# af_ZA.UTF-8 UTF-8 -# ak_GH UTF-8 -# am_ET UTF-8 -# an_ES ISO-8859-15 -# an_ES.UTF-8 UTF-8 -# anp_IN UTF-8 -# ar_AE ISO-8859-6 -# ar_AE.UTF-8 UTF-8 -# ar_BH ISO-8859-6 -# ar_BH.UTF-8 UTF-8 -# ar_DZ ISO-8859-6 -# ar_DZ.UTF-8 UTF-8 -# ar_EG ISO-8859-6 -# ar_EG.UTF-8 UTF-8 -# ar_IN UTF-8 -# ar_IQ ISO-8859-6 -# ar_IQ.UTF-8 UTF-8 -# ar_JO ISO-8859-6 -# ar_JO.UTF-8 UTF-8 -# ar_KW ISO-8859-6 -# ar_KW.UTF-8 UTF-8 -# ar_LB ISO-8859-6 -# ar_LB.UTF-8 UTF-8 -# ar_LY ISO-8859-6 -# ar_LY.UTF-8 UTF-8 -# ar_MA ISO-8859-6 -# ar_MA.UTF-8 UTF-8 -# ar_OM ISO-8859-6 -# ar_OM.UTF-8 UTF-8 -# ar_QA ISO-8859-6 -# ar_QA.UTF-8 UTF-8 -# ar_SA ISO-8859-6 -# ar_SA.UTF-8 UTF-8 -# ar_SD ISO-8859-6 -# ar_SD.UTF-8 UTF-8 -# ar_SS UTF-8 -# ar_SY ISO-8859-6 -# ar_SY.UTF-8 UTF-8 -# ar_TN ISO-8859-6 -# ar_TN.UTF-8 UTF-8 -# ar_YE ISO-8859-6 -# ar_YE.UTF-8 UTF-8 -# as_IN UTF-8 -# ast_ES ISO-8859-15 -# ast_ES.UTF-8 UTF-8 -# ayc_PE UTF-8 -# az_AZ UTF-8 -# be_BY CP1251 -# be_BY.UTF-8 UTF-8 -# be_BY@latin UTF-8 -# bem_ZM UTF-8 -# ber_DZ UTF-8 -# ber_MA UTF-8 -# bg_BG CP1251 -# bg_BG.UTF-8 UTF-8 -# bhb_IN.UTF-8 UTF-8 -# bho_IN UTF-8 -# bn_BD UTF-8 -# bn_IN UTF-8 -# bo_CN UTF-8 -# bo_IN UTF-8 -# br_FR ISO-8859-1 -# br_FR.UTF-8 UTF-8 -# br_FR@euro ISO-8859-15 -# brx_IN UTF-8 -# bs_BA ISO-8859-2 -# bs_BA.UTF-8 UTF-8 -# byn_ER UTF-8 -# ca_AD ISO-8859-15 -# ca_AD.UTF-8 UTF-8 -# ca_ES ISO-8859-1 -# ca_ES.UTF-8 UTF-8 -# ca_ES.UTF-8@valencia UTF-8 -# ca_ES@euro ISO-8859-15 -# ca_ES@valencia ISO-8859-15 -# ca_FR ISO-8859-15 -# ca_FR.UTF-8 UTF-8 -# ca_IT ISO-8859-15 -# ca_IT.UTF-8 UTF-8 -# ce_RU UTF-8 -# ckb_IQ UTF-8 -# cmn_TW UTF-8 -# crh_UA UTF-8 -# cs_CZ ISO-8859-2 -# cs_CZ.UTF-8 UTF-8 -# csb_PL UTF-8 -# cv_RU UTF-8 -# cy_GB ISO-8859-14 -# cy_GB.UTF-8 UTF-8 -# da_DK ISO-8859-1 -# da_DK.UTF-8 UTF-8 -# de_AT ISO-8859-1 -# de_AT.UTF-8 UTF-8 -# de_AT@euro ISO-8859-15 -# de_BE ISO-8859-1 -# de_BE.UTF-8 UTF-8 -# de_BE@euro ISO-8859-15 -# de_CH ISO-8859-1 -# de_CH.UTF-8 UTF-8 -# de_DE ISO-8859-1 -# de_DE.UTF-8 UTF-8 -# de_DE@euro ISO-8859-15 -# de_LI.UTF-8 UTF-8 -# de_LU ISO-8859-1 -# de_LU.UTF-8 UTF-8 -# de_LU@euro ISO-8859-15 -# doi_IN UTF-8 -# dv_MV UTF-8 -# dz_BT UTF-8 -# el_CY ISO-8859-7 -# el_CY.UTF-8 UTF-8 -# el_GR ISO-8859-7 -# el_GR.UTF-8 UTF-8 -# en_AG UTF-8 -# en_AU ISO-8859-1 -# en_AU.UTF-8 UTF-8 -# en_BW ISO-8859-1 -# en_BW.UTF-8 UTF-8 -# en_CA ISO-8859-1 en_CA.UTF-8 UTF-8 -# en_DK ISO-8859-1 -# en_DK.ISO-8859-15 ISO-8859-15 -# en_DK.UTF-8 UTF-8 -# en_GB ISO-8859-1 -# en_GB.ISO-8859-15 ISO-8859-15 -# en_GB.UTF-8 UTF-8 -# en_HK ISO-8859-1 -# en_HK.UTF-8 UTF-8 -# en_IE ISO-8859-1 -# en_IE.UTF-8 UTF-8 -# en_IE@euro ISO-8859-15 -# en_IN UTF-8 -# en_NG UTF-8 -# en_NZ ISO-8859-1 -# en_NZ.UTF-8 UTF-8 -# en_PH ISO-8859-1 -# en_PH.UTF-8 UTF-8 -# en_SG ISO-8859-1 -# en_SG.UTF-8 UTF-8 -# en_US ISO-8859-1 -# en_US.ISO-8859-15 ISO-8859-15 en_US.UTF-8 UTF-8 -# en_ZA ISO-8859-1 -# en_ZA.UTF-8 UTF-8 -# en_ZM UTF-8 -# en_ZW ISO-8859-1 -# en_ZW.UTF-8 UTF-8 -# eo ISO-8859-3 -# eo.UTF-8 UTF-8 -# eo_US.UTF-8 UTF-8 -# es_AR ISO-8859-1 -# es_AR.UTF-8 UTF-8 -# es_BO ISO-8859-1 -# es_BO.UTF-8 UTF-8 -# es_CL ISO-8859-1 -# es_CL.UTF-8 UTF-8 -# es_CO ISO-8859-1 -# es_CO.UTF-8 UTF-8 -# es_CR ISO-8859-1 -# es_CR.UTF-8 UTF-8 -# es_CU UTF-8 -# es_DO ISO-8859-1 -# es_DO.UTF-8 UTF-8 -# es_EC ISO-8859-1 -# es_EC.UTF-8 UTF-8 -# es_ES ISO-8859-1 -# es_ES.UTF-8 UTF-8 -# es_ES@euro ISO-8859-15 -# es_GT ISO-8859-1 -# es_GT.UTF-8 UTF-8 -# es_HN ISO-8859-1 -# es_HN.UTF-8 UTF-8 -# es_MX ISO-8859-1 -# es_MX.UTF-8 UTF-8 -# es_NI ISO-8859-1 -# es_NI.UTF-8 UTF-8 -# es_PA ISO-8859-1 -# es_PA.UTF-8 UTF-8 -# es_PE ISO-8859-1 -# es_PE.UTF-8 UTF-8 -# es_PR ISO-8859-1 -# es_PR.UTF-8 UTF-8 -# es_PY ISO-8859-1 -# es_PY.UTF-8 UTF-8 -# es_SV ISO-8859-1 -# es_SV.UTF-8 UTF-8 -# es_US ISO-8859-1 -# es_US.UTF-8 UTF-8 -# es_UY ISO-8859-1 -# es_UY.UTF-8 UTF-8 -# es_VE ISO-8859-1 -# es_VE.UTF-8 UTF-8 -# et_EE ISO-8859-1 -# et_EE.ISO-8859-15 ISO-8859-15 -# et_EE.UTF-8 UTF-8 -# eu_ES ISO-8859-1 -# eu_ES.UTF-8 UTF-8 -# eu_ES@euro ISO-8859-15 -# eu_FR ISO-8859-1 -# eu_FR.UTF-8 UTF-8 -# eu_FR@euro ISO-8859-15 -# fa_IR UTF-8 -# ff_SN UTF-8 -# fi_FI ISO-8859-1 -# fi_FI.UTF-8 UTF-8 -# fi_FI@euro ISO-8859-15 -# fil_PH UTF-8 -# fo_FO ISO-8859-1 -# fo_FO.UTF-8 UTF-8 -# fr_BE ISO-8859-1 -# fr_BE.UTF-8 UTF-8 -# fr_BE@euro ISO-8859-15 -# fr_CA ISO-8859-1 -# fr_CA.UTF-8 UTF-8 -# fr_CH ISO-8859-1 -# fr_CH.UTF-8 UTF-8 -# fr_FR ISO-8859-1 -# fr_FR.UTF-8 UTF-8 -# fr_FR@euro ISO-8859-15 -# fr_LU ISO-8859-1 -# fr_LU.UTF-8 UTF-8 -# fr_LU@euro ISO-8859-15 -# fur_IT UTF-8 -# fy_DE UTF-8 -# fy_NL UTF-8 -# ga_IE ISO-8859-1 -# ga_IE.UTF-8 UTF-8 -# ga_IE@euro ISO-8859-15 -# gd_GB ISO-8859-15 -# gd_GB.UTF-8 UTF-8 -# gez_ER UTF-8 -# gez_ER@abegede UTF-8 -# gez_ET UTF-8 -# gez_ET@abegede UTF-8 -# gl_ES ISO-8859-1 -# gl_ES.UTF-8 UTF-8 -# gl_ES@euro ISO-8859-15 -# gu_IN UTF-8 -# gv_GB ISO-8859-1 -# gv_GB.UTF-8 UTF-8 -# ha_NG UTF-8 -# hak_TW UTF-8 -# he_IL ISO-8859-8 -# he_IL.UTF-8 UTF-8 -# hi_IN UTF-8 -# hne_IN UTF-8 -# hr_HR ISO-8859-2 -# hr_HR.UTF-8 UTF-8 -# hsb_DE ISO-8859-2 -# hsb_DE.UTF-8 UTF-8 -# ht_HT UTF-8 -# hu_HU ISO-8859-2 -# hu_HU.UTF-8 UTF-8 -# hy_AM UTF-8 -# hy_AM.ARMSCII-8 ARMSCII-8 -# ia_FR UTF-8 -# id_ID ISO-8859-1 -# id_ID.UTF-8 UTF-8 -# ig_NG UTF-8 -# ik_CA UTF-8 -# is_IS ISO-8859-1 -# is_IS.UTF-8 UTF-8 -# it_CH ISO-8859-1 -# it_CH.UTF-8 UTF-8 -# it_IT ISO-8859-1 -# it_IT.UTF-8 UTF-8 -# it_IT@euro ISO-8859-15 -# iu_CA UTF-8 -# iw_IL ISO-8859-8 -# iw_IL.UTF-8 UTF-8 -# ja_JP.EUC-JP EUC-JP -# ja_JP.UTF-8 UTF-8 -# ka_GE GEORGIAN-PS -# ka_GE.UTF-8 UTF-8 -# kk_KZ PT154 -# kk_KZ RK1048 -# kk_KZ.UTF-8 UTF-8 -# kl_GL ISO-8859-1 -# kl_GL.UTF-8 UTF-8 -# km_KH UTF-8 -# kn_IN UTF-8 -# ko_KR.EUC-KR EUC-KR -# ko_KR.UTF-8 UTF-8 -# kok_IN UTF-8 -# ks_IN UTF-8 -# ks_IN@devanagari UTF-8 -# ku_TR ISO-8859-9 -# ku_TR.UTF-8 UTF-8 -# kw_GB ISO-8859-1 -# kw_GB.UTF-8 UTF-8 -# ky_KG UTF-8 -# lb_LU UTF-8 -# lg_UG ISO-8859-10 -# lg_UG.UTF-8 UTF-8 -# li_BE UTF-8 -# li_NL UTF-8 -# lij_IT UTF-8 -# ln_CD UTF-8 -# lo_LA UTF-8 -# lt_LT ISO-8859-13 -# lt_LT.UTF-8 UTF-8 -# lv_LV ISO-8859-13 -# lv_LV.UTF-8 UTF-8 -# lzh_TW UTF-8 -# mag_IN UTF-8 -# mai_IN UTF-8 -# mg_MG ISO-8859-15 -# mg_MG.UTF-8 UTF-8 -# mhr_RU UTF-8 -# mi_NZ ISO-8859-13 -# mi_NZ.UTF-8 UTF-8 -# mk_MK ISO-8859-5 -# mk_MK.UTF-8 UTF-8 -# ml_IN UTF-8 -# mn_MN UTF-8 -# mni_IN UTF-8 -# mr_IN UTF-8 -# ms_MY ISO-8859-1 -# ms_MY.UTF-8 UTF-8 -# mt_MT ISO-8859-3 -# mt_MT.UTF-8 UTF-8 -# my_MM UTF-8 -# nan_TW UTF-8 -# nan_TW@latin UTF-8 -# nb_NO ISO-8859-1 -# nb_NO.UTF-8 UTF-8 -# nds_DE UTF-8 -# nds_NL UTF-8 -# ne_NP UTF-8 -# nhn_MX UTF-8 -# niu_NU UTF-8 -# niu_NZ UTF-8 -# nl_AW UTF-8 -# nl_BE ISO-8859-1 -# nl_BE.UTF-8 UTF-8 -# nl_BE@euro ISO-8859-15 -# nl_NL ISO-8859-1 -# nl_NL.UTF-8 UTF-8 -# nl_NL@euro ISO-8859-15 -# nn_NO ISO-8859-1 -# nn_NO.UTF-8 UTF-8 -# nr_ZA UTF-8 -# nso_ZA UTF-8 -# oc_FR ISO-8859-1 -# oc_FR.UTF-8 UTF-8 -# om_ET UTF-8 -# om_KE ISO-8859-1 -# om_KE.UTF-8 UTF-8 -# or_IN UTF-8 -# os_RU UTF-8 -# pa_IN UTF-8 -# pa_PK UTF-8 -# pap_AN UTF-8 -# pap_AW UTF-8 -# pap_CW UTF-8 -# pl_PL ISO-8859-2 -# pl_PL.UTF-8 UTF-8 -# ps_AF UTF-8 -# pt_BR ISO-8859-1 -# pt_BR.UTF-8 UTF-8 -# pt_PT ISO-8859-1 -# pt_PT.UTF-8 UTF-8 -# pt_PT@euro ISO-8859-15 -# quz_PE UTF-8 -# raj_IN UTF-8 -# ro_RO ISO-8859-2 -# ro_RO.UTF-8 UTF-8 -# ru_RU ISO-8859-5 -# ru_RU.CP1251 CP1251 -# ru_RU.KOI8-R KOI8-R -# ru_RU.UTF-8 UTF-8 -# ru_UA KOI8-U -# ru_UA.UTF-8 UTF-8 -# rw_RW UTF-8 -# sa_IN UTF-8 -# sat_IN UTF-8 -# sc_IT UTF-8 -# sd_IN UTF-8 -# sd_IN@devanagari UTF-8 -# sd_PK UTF-8 -# se_NO UTF-8 -# shs_CA UTF-8 -# si_LK UTF-8 -# sid_ET UTF-8 -# sk_SK ISO-8859-2 -# sk_SK.UTF-8 UTF-8 -# sl_SI ISO-8859-2 -# sl_SI.UTF-8 UTF-8 -# so_DJ ISO-8859-1 -# so_DJ.UTF-8 UTF-8 -# so_ET UTF-8 -# so_KE ISO-8859-1 -# so_KE.UTF-8 UTF-8 -# so_SO ISO-8859-1 -# so_SO.UTF-8 UTF-8 -# sq_AL ISO-8859-1 -# sq_AL.UTF-8 UTF-8 -# sq_MK UTF-8 -# sr_ME UTF-8 -# sr_RS UTF-8 -# sr_RS@latin UTF-8 -# ss_ZA UTF-8 -# st_ZA ISO-8859-1 -# st_ZA.UTF-8 UTF-8 -# sv_FI ISO-8859-1 -# sv_FI.UTF-8 UTF-8 -# sv_FI@euro ISO-8859-15 -# sv_SE ISO-8859-1 -# sv_SE.ISO-8859-15 ISO-8859-15 -# sv_SE.UTF-8 UTF-8 -# sw_KE UTF-8 -# sw_TZ UTF-8 -# szl_PL UTF-8 -# ta_IN UTF-8 -# ta_LK UTF-8 -# tcy_IN.UTF-8 UTF-8 -# te_IN UTF-8 -# tg_TJ KOI8-T -# tg_TJ.UTF-8 UTF-8 -# th_TH TIS-620 -# th_TH.UTF-8 UTF-8 -# the_NP UTF-8 -# ti_ER UTF-8 -# ti_ET UTF-8 -# tig_ER UTF-8 -# tk_TM UTF-8 -# tl_PH ISO-8859-1 -# tl_PH.UTF-8 UTF-8 -# tn_ZA UTF-8 -# tr_CY ISO-8859-9 -# tr_CY.UTF-8 UTF-8 -# tr_TR ISO-8859-9 -# tr_TR.UTF-8 UTF-8 -# ts_ZA UTF-8 -# tt_RU UTF-8 -# tt_RU@iqtelif UTF-8 -# ug_CN UTF-8 -# ug_CN@latin UTF-8 -# uk_UA KOI8-U -# uk_UA.UTF-8 UTF-8 -# unm_US UTF-8 -# ur_IN UTF-8 -# ur_PK UTF-8 -# uz_UZ ISO-8859-1 -# uz_UZ.UTF-8 UTF-8 -# uz_UZ@cyrillic UTF-8 -# ve_ZA UTF-8 -# vi_VN UTF-8 -# wa_BE ISO-8859-1 -# wa_BE.UTF-8 UTF-8 -# wa_BE@euro ISO-8859-15 -# wae_CH UTF-8 -# wal_ET UTF-8 -# wo_SN UTF-8 -# xh_ZA ISO-8859-1 -# xh_ZA.UTF-8 UTF-8 -# yi_US CP1255 -# yi_US.UTF-8 UTF-8 -# yo_NG UTF-8 -# yue_HK UTF-8 -# zh_CN GB2312 -# zh_CN.GB18030 GB18030 -# zh_CN.GBK GBK -# zh_CN.UTF-8 UTF-8 -# zh_HK BIG5-HKSCS -# zh_HK.UTF-8 UTF-8 -# zh_SG GB2312 -# zh_SG.GBK GBK -# zh_SG.UTF-8 UTF-8 -# zh_TW BIG5 -# zh_TW.EUC-TW EUC-TW -# zh_TW.UTF-8 UTF-8 -# zu_ZA ISO-8859-1 -# zu_ZA.UTF-8 UTF-8 diff --git a/data/example-root/etc/profile b/data/example-root/etc/profile index 42bd3d007..7de2a283d 100644 --- a/data/example-root/etc/profile +++ b/data/example-root/etc/profile @@ -1,2 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Global .profile -- add /sbin_1 PATH=$PATH:/sbin_1:/xbin diff --git a/data/example-root/xbin/linux-version b/data/example-root/xbin/linux-version index 3e91d5333..87b040d34 100755 --- a/data/example-root/xbin/linux-version +++ b/data/example-root/xbin/linux-version @@ -1 +1,5 @@ #! /bin/true +# +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# diff --git a/data/example-root/xbin/useradd b/data/example-root/xbin/useradd index 3e91d5333..87b040d34 100755 --- a/data/example-root/xbin/useradd +++ b/data/example-root/xbin/useradd @@ -1 +1,5 @@ #! /bin/true +# +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# diff --git a/data/images/boot-environment.svg.license b/data/images/boot-environment.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/boot-environment.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/bugs.svg.license b/data/images/bugs.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/bugs.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/fail.svgz.license b/data/images/fail.svgz.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/data/images/fail.svgz.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/help-donate.svg.license b/data/images/help-donate.svg.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/data/images/help-donate.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/data/images/help.svg.license b/data/images/help.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/help.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/information.svgz.license b/data/images/information.svgz.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/data/images/information.svgz.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/no.svgz.license b/data/images/no.svgz.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/data/images/no.svgz.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/partition-alongside.svg.license b/data/images/partition-alongside.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/partition-alongside.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/partition-disk.svg.license b/data/images/partition-disk.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/partition-disk.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/partition-erase-auto.svg.license b/data/images/partition-erase-auto.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/partition-erase-auto.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/partition-manual.svg.license b/data/images/partition-manual.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/partition-manual.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/partition-partition.svg.license b/data/images/partition-partition.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/partition-partition.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/partition-replace-os.svg.license b/data/images/partition-replace-os.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/partition-replace-os.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/partition-table.svg.license b/data/images/partition-table.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/partition-table.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/release.svg.license b/data/images/release.svg.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/data/images/release.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/squid.png.license b/data/images/squid.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/data/images/squid.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/squid.svg.license b/data/images/squid.svg.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/data/images/squid.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/data/images/state-error.svg.license b/data/images/state-error.svg.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/data/images/state-error.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/data/images/state-ok.svg.license b/data/images/state-ok.svg.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/data/images/state-ok.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/data/images/state-warning.svg.license b/data/images/state-warning.svg.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/data/images/state-warning.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/data/images/yes.svgz.license b/data/images/yes.svgz.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/data/images/yes.svgz.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/io.calamares.calamares.appdata.xml b/io.calamares.calamares.appdata.xml index d49a33b0f..9b1f883bd 100644 --- a/io.calamares.calamares.appdata.xml +++ b/io.calamares.calamares.appdata.xml @@ -1,4 +1,7 @@ + io.calamares.calamares.desktop CC0-1.0 diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt index efc6d6188..8658653ab 100644 --- a/lang/CMakeLists.txt +++ b/lang/CMakeLists.txt @@ -1,25 +1,20 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . -# -# SPDX-License-Identifier: GPL-3.0-or-later -# License-Filename: LICENSE +# SPDX-FileCopyrightText: 2018 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause # ### +include( CalamaresAddTranslations ) + find_package(Qt5 COMPONENTS Xml) if( Qt5Xml_FOUND ) add_executable(txload txload.cpp) target_link_libraries(txload Qt5::Xml) endif() + +install_calamares_gettext_translations( python + SOURCE_DIR ${CMAKE_SOURCE_DIR}/lang/python + FILENAME python.mo + RENAME calamares-python.mo +) diff --git a/lang/calamares_de.ts b/lang/calamares_de.ts index a70360e82..bf2c4f635 100644 --- a/lang/calamares_de.ts +++ b/lang/calamares_de.ts @@ -717,7 +717,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. Set timezone to %1/%2. - + Setze Zeitzone auf %1%2. @@ -802,7 +802,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. '%1' is not allowed as username. - + '%1' ist als Benutzername nicht erlaubt. @@ -827,7 +827,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. '%1' is not allowed as hostname. - + '%1' ist als Computername nicht erlaubt. @@ -2860,7 +2860,8 @@ Ausgabe: <p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/> Setup can continue, but some features might be disabled.</p> - + <p>Dieser Computer erfüllt einige empfohlene Bedingungen nicht für die Installation von %1.<br/> + Die Installation kann fortgesetzt werden, aber einige Funktionen könnten deaktiviert sein.</p> @@ -2971,13 +2972,15 @@ Ausgabe: <p>This computer does not satisfy the minimum requirements for installing %1.<br/> Installation cannot continue.</p> - + <p>Dieser Computer erfüllt die minimalen Bedingungen nicht für die Installation von %1.<br/> + Die Installation kan nicht fortgesetzt werden.</p> <p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/> Setup can continue, but some features might be disabled.</p> - + <p>Dieser Computer erfüllt einige empfohlene Bedingungen nicht für die Installation von %1.<br/> + Die Installation kann fortgesetzt werden, aber einige Funktionen könnten deaktiviert sein.</p> @@ -3443,28 +3446,28 @@ Ausgabe: KDE user feedback - + KDE Benutzer-Feedback Configuring KDE user feedback. - + Konfiguriere KDE Benutzer-Feedback. Error in KDE user feedback configuration. - + Fehler bei der Konfiguration des KDE Benutzer-Feedbacks. Could not configure KDE user feedback correctly, script error %1. - + Konnte KDE Benutzer-Feedback nicht korrekt konfigurieren, Skriptfehler %1. Could not configure KDE user feedback correctly, Calamares error %1. - + Konnte KDE Benutzer-Feedback nicht korrekt konfigurieren, Calamares-Fehler %1. @@ -3511,7 +3514,7 @@ Ausgabe: <html><head/><body><p>Click here to send <span style=" font-weight:600;">no information at all</span> about your installation.</p></body></html> - + <html><head/><body><p>Hier klicken, um <span style=" font-weight:600;">keinerlei Informationen </span> über Ihre Installation zu senden.</p></body></html> diff --git a/lang/calamares_i18n.qrc.in b/lang/calamares_i18n.qrc.in index 1f0ac1604..dd7931e09 100644 --- a/lang/calamares_i18n.qrc.in +++ b/lang/calamares_i18n.qrc.in @@ -1,5 +1,9 @@ - - + + + + @calamares_i18n_qrc_content@ - + diff --git a/lang/calamares_pt_BR.ts b/lang/calamares_pt_BR.ts index 9611c6005..7c7b65959 100644 --- a/lang/calamares_pt_BR.ts +++ b/lang/calamares_pt_BR.ts @@ -2323,7 +2323,7 @@ O instalador será fechado e todas as alterações serão perdidas. Choose a password to keep your account safe. - Escolha uma senha para mantar a sua conta segura. + Escolha uma senha para manter a sua conta segura. diff --git a/lang/calamares_te.ts b/lang/calamares_te.ts new file mode 100644 index 000000000..5ffd22999 --- /dev/null +++ b/lang/calamares_te.ts @@ -0,0 +1,3922 @@ + + + + + BootInfoWidget + + + The <strong>boot environment</strong> of this system.<br><br>Older x86 systems only support <strong>BIOS</strong>.<br>Modern systems usually use <strong>EFI</strong>, but may also show up as BIOS if started in compatibility mode. + + + + + This system was started with an <strong>EFI</strong> boot environment.<br><br>To configure startup from an EFI environment, this installer must deploy a boot loader application, like <strong>GRUB</strong> or <strong>systemd-boot</strong> on an <strong>EFI System Partition</strong>. This is automatic, unless you choose manual partitioning, in which case you must choose it or create it on your own. + + + + + This system was started with a <strong>BIOS</strong> boot environment.<br><br>To configure startup from a BIOS environment, this installer must install a boot loader, like <strong>GRUB</strong>, either at the beginning of a partition or on the <strong>Master Boot Record</strong> near the beginning of the partition table (preferred). This is automatic, unless you choose manual partitioning, in which case you must set it up on your own. + + + + + BootLoaderModel + + + Master Boot Record of %1 + + + + + Boot Partition + + + + + System Partition + + + + + Do not install a boot loader + + + + + %1 (%2) + + + + + Calamares::BlankViewStep + + + Blank Page + + + + + Calamares::DebugWindow + + + Form + + + + + GlobalStorage + + + + + JobQueue + + + + + Modules + + + + + Type: + + + + + + none + + + + + Interface: + + + + + Tools + + + + + Reload Stylesheet + + + + + Widget Tree + + + + + Debug information + + + + + Calamares::ExecutionViewStep + + + Set up + + + + + Install + + + + + Calamares::FailJob + + + Job failed (%1) + + + + + Programmed job failure was explicitly requested. + + + + + Calamares::JobThread + + + Done + ముగించు + + + + Calamares::NamedJob + + + Example job (%1) + + + + + Calamares::ProcessJob + + + Run command '%1' in target system. + + + + + Run command '%1'. + + + + + Running command %1 %2 + + + + + Calamares::PythonJob + + + Running %1 operation. + + + + + Bad working directory path + + + + + Working directory %1 for python job %2 is not readable. + + + + + Bad main script file + + + + + Main script file %1 for python job %2 is not readable. + + + + + Boost.Python error in job "%1". + + + + + Calamares::QmlViewStep + + + Loading ... + + + + + QML Step <i>%1</i>. + + + + + Loading failed. + + + + + Calamares::RequirementsChecker + + + Requirements checking for module <i>%1</i> is complete. + + + + + Waiting for %n module(s). + + + + + + + + (%n second(s)) + + + + + + + + System-requirements checking is complete. + + + + + Calamares::ViewManager + + + Setup Failed + + + + + Installation Failed + + + + + Would you like to paste the install log to the web? + + + + + Error + లోపం + + + + + &Yes + + + + + + &No + + + + + &Close + + + + + Install Log Paste URL + + + + + The upload was unsuccessful. No web-paste was done. + + + + + Calamares Initialization Failed + + + + + %1 can not be installed. Calamares was unable to load all of the configured modules. This is a problem with the way Calamares is being used by the distribution. + + + + + <br/>The following modules could not be loaded: + + + + + Continue with setup? + + + + + Continue with installation? + + + + + The %1 setup program is about to make changes to your disk in order to set up %2.<br/><strong>You will not be able to undo these changes.</strong> + + + + + The %1 installer is about to make changes to your disk in order to install %2.<br/><strong>You will not be able to undo these changes.</strong> + + + + + &Set up now + + + + + &Install now + + + + + Go &back + + + + + &Set up + + + + + &Install + + + + + Setup is complete. Close the setup program. + + + + + The installation is complete. Close the installer. + + + + + Cancel setup without changing the system. + + + + + Cancel installation without changing the system. + + + + + &Next + + + + + &Back + + + + + &Done + + + + + &Cancel + + + + + Cancel setup? + + + + + Cancel installation? + + + + + Do you really want to cancel the current setup process? +The setup program will quit and all changes will be lost. + + + + + Do you really want to cancel the current install process? +The installer will quit and all changes will be lost. + + + + + CalamaresPython::Helper + + + Unknown exception type + + + + + unparseable Python error + + + + + unparseable Python traceback + + + + + Unfetchable Python error. + + + + + CalamaresUtils + + + Install log posted to: +%1 + + + + + CalamaresWindow + + + Show debug information + + + + + &Back + + + + + &Next + + + + + &Cancel + + + + + %1 Setup Program + + + + + %1 Installer + + + + + CheckerContainer + + + Gathering system information... + + + + + ChoicePage + + + Form + + + + + Select storage de&vice: + + + + + + + + Current: + + + + + After: + + + + + <strong>Manual partitioning</strong><br/>You can create or resize partitions yourself. + + + + + Reuse %1 as home partition for %2. + + + + + <strong>Select a partition to shrink, then drag the bottom bar to resize</strong> + + + + + %1 will be shrunk to %2MiB and a new %3MiB partition will be created for %4. + + + + + Boot loader location: + + + + + <strong>Select a partition to install on</strong> + + + + + An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1. + + + + + The EFI system partition at %1 will be used for starting %2. + + + + + EFI system partition: + + + + + This storage device does not seem to have an operating system on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. + + + + + + + + <strong>Erase disk</strong><br/>This will <font color="red">delete</font> all data currently present on the selected storage device. + + + + + + + + <strong>Install alongside</strong><br/>The installer will shrink a partition to make room for %1. + + + + + + + + <strong>Replace a partition</strong><br/>Replaces a partition with %1. + + + + + This storage device has %1 on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. + + + + + This storage device already has an operating system on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. + + + + + This storage device has multiple operating systems on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. + + + + + No Swap + + + + + Reuse Swap + + + + + Swap (no Hibernate) + + + + + Swap (with Hibernate) + + + + + Swap to file + + + + + ClearMountsJob + + + Clear mounts for partitioning operations on %1 + + + + + Clearing mounts for partitioning operations on %1. + + + + + Cleared all mounts for %1 + + + + + ClearTempMountsJob + + + Clear all temporary mounts. + + + + + Clearing all temporary mounts. + + + + + Cannot get list of temporary mounts. + + + + + Cleared all temporary mounts. + + + + + CommandList + + + + Could not run command. + + + + + The command runs in the host environment and needs to know the root path, but no rootMountPoint is defined. + + + + + The command needs to know the user's name, but no username is defined. + + + + + Config + + + Set keyboard model to %1.<br/> + + + + + Set keyboard layout to %1/%2. + + + + + Set timezone to %1/%2. + + + + + The system language will be set to %1. + + + + + The numbers and dates locale will be set to %1. + + + + + Network Installation. (Disabled: Incorrect configuration) + + + + + Network Installation. (Disabled: Received invalid groups data) + + + + + Network Installation. (Disabled: internal error) + + + + + Network Installation. (Disabled: Unable to fetch package lists, check your network connection) + + + + + This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> + + + + + This computer does not satisfy the minimum requirements for installing %1.<br/>Installation cannot continue. <a href="#details">Details...</a> + + + + + This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. + + + + + This computer does not satisfy some of the recommended requirements for installing %1.<br/>Installation can continue, but some features might be disabled. + + + + + This program will ask you some questions and set up %2 on your computer. + + + + + <h1>Welcome to the Calamares setup program for %1</h1> + + + + + <h1>Welcome to %1 setup</h1> + + + + + <h1>Welcome to the Calamares installer for %1</h1> + + + + + <h1>Welcome to the %1 installer</h1> + + + + + Your username is too long. + + + + + '%1' is not allowed as username. + + + + + Your username must start with a lowercase letter or underscore. + + + + + Only lowercase letters, numbers, underscore and hyphen are allowed. + + + + + Your hostname is too short. + + + + + Your hostname is too long. + + + + + '%1' is not allowed as hostname. + + + + + Only letters, numbers, underscore and hyphen are allowed. + + + + + ContextualProcessJob + + + Contextual Processes Job + + + + + CreatePartitionDialog + + + Create a Partition + + + + + Si&ze: + + + + + MiB + + + + + Partition &Type: + + + + + &Primary + + + + + E&xtended + + + + + Fi&le System: + + + + + LVM LV name + + + + + &Mount Point: + + + + + Flags: + + + + + En&crypt + + + + + Logical + + + + + Primary + + + + + GPT + + + + + Mountpoint already in use. Please select another one. + + + + + CreatePartitionJob + + + Create new %2MiB partition on %4 (%3) with file system %1. + + + + + Create new <strong>%2MiB</strong> partition on <strong>%4</strong> (%3) with file system <strong>%1</strong>. + + + + + Creating new %1 partition on %2. + + + + + The installer failed to create partition on disk '%1'. + + + + + CreatePartitionTableDialog + + + Create Partition Table + + + + + Creating a new partition table will delete all existing data on the disk. + + + + + What kind of partition table do you want to create? + + + + + Master Boot Record (MBR) + + + + + GUID Partition Table (GPT) + + + + + CreatePartitionTableJob + + + Create new %1 partition table on %2. + + + + + Create new <strong>%1</strong> partition table on <strong>%2</strong> (%3). + + + + + Creating new %1 partition table on %2. + + + + + The installer failed to create a partition table on %1. + + + + + CreateUserJob + + + Create user %1 + + + + + Create user <strong>%1</strong>. + + + + + Creating user %1. + + + + + Cannot create sudoers file for writing. + + + + + Cannot chmod sudoers file. + + + + + CreateVolumeGroupDialog + + + Create Volume Group + + + + + CreateVolumeGroupJob + + + Create new volume group named %1. + + + + + Create new volume group named <strong>%1</strong>. + + + + + Creating new volume group named %1. + + + + + The installer failed to create a volume group named '%1'. + + + + + DeactivateVolumeGroupJob + + + + Deactivate volume group named %1. + + + + + Deactivate volume group named <strong>%1</strong>. + + + + + The installer failed to deactivate a volume group named %1. + + + + + DeletePartitionJob + + + Delete partition %1. + + + + + Delete partition <strong>%1</strong>. + + + + + Deleting partition %1. + + + + + The installer failed to delete partition %1. + + + + + DeviceInfoWidget + + + This device has a <strong>%1</strong> partition table. + + + + + This is a <strong>loop</strong> device.<br><br>It is a pseudo-device with no partition table that makes a file accessible as a block device. This kind of setup usually only contains a single filesystem. + + + + + This installer <strong>cannot detect a partition table</strong> on the selected storage device.<br><br>The device either has no partition table, or the partition table is corrupted or of an unknown type.<br>This installer can create a new partition table for you, either automatically, or through the manual partitioning page. + + + + + <br><br>This is the recommended partition table type for modern systems which start from an <strong>EFI</strong> boot environment. + + + + + <br><br>This partition table type is only advisable on older systems which start from a <strong>BIOS</strong> boot environment. GPT is recommended in most other cases.<br><br><strong>Warning:</strong> the MBR partition table is an obsolete MS-DOS era standard.<br>Only 4 <em>primary</em> partitions may be created, and of those 4, one can be an <em>extended</em> partition, which may in turn contain many <em>logical</em> partitions. + + + + + The type of <strong>partition table</strong> on the selected storage device.<br><br>The only way to change the partition table type is to erase and recreate the partition table from scratch, which destroys all data on the storage device.<br>This installer will keep the current partition table unless you explicitly choose otherwise.<br>If unsure, on modern systems GPT is preferred. + + + + + DeviceModel + + + %1 - %2 (%3) + device[name] - size[number] (device-node[name]) + + + + + %1 - (%2) + device[name] - (device-node[name]) + + + + + DracutLuksCfgJob + + + Write LUKS configuration for Dracut to %1 + + + + + Skip writing LUKS configuration for Dracut: "/" partition is not encrypted + + + + + Failed to open %1 + + + + + DummyCppJob + + + Dummy C++ Job + + + + + EditExistingPartitionDialog + + + Edit Existing Partition + + + + + Content: + + + + + &Keep + + + + + Format + తుడిచివేయు + + + + Warning: Formatting the partition will erase all existing data. + హెచ్చరిక : తుడిచివేయటం వలన ఈ విభజనలోని సమాచారం మొత్తం పోతుంది + + + + &Mount Point: + + + + + Si&ze: + + + + + MiB + + + + + Fi&le System: + + + + + Flags: + + + + + Mountpoint already in use. Please select another one. + + + + + EncryptWidget + + + Form + + + + + En&crypt system + + + + + Passphrase + + + + + Confirm passphrase + + + + + + Please enter the same passphrase in both boxes. + + + + + FillGlobalStorageJob + + + Set partition information + విభజన సమాచారం ఏర్పాటు + + + + Install %1 on <strong>new</strong> %2 system partition. + + + + + Set up <strong>new</strong> %2 partition with mount point <strong>%1</strong>. + + + + + Install %2 on %3 system partition <strong>%1</strong>. + + + + + Set up %3 partition <strong>%1</strong> with mount point <strong>%2</strong>. + + + + + Install boot loader on <strong>%1</strong>. + + + + + Setting up mount points. + + + + + FinishedPage + + + Form + + + + + &Restart now + + + + + <h1>All done.</h1><br/>%1 has been set up on your computer.<br/>You may now start using your new system. + + + + + <html><head/><body><p>When this box is checked, your system will restart immediately when you click on <span style="font-style:italic;">Done</span> or close the setup program.</p></body></html> + + + + + <h1>All done.</h1><br/>%1 has been installed on your computer.<br/>You may now restart into your new system, or continue using the %2 Live environment. + + + + + <html><head/><body><p>When this box is checked, your system will restart immediately when you click on <span style="font-style:italic;">Done</span> or close the installer.</p></body></html> + + + + + <h1>Setup Failed</h1><br/>%1 has not been set up on your computer.<br/>The error message was: %2. + + + + + <h1>Installation Failed</h1><br/>%1 has not been installed on your computer.<br/>The error message was: %2. + + + + + FinishedViewStep + + + Finish + + + + + Setup Complete + + + + + Installation Complete + + + + + The setup of %1 is complete. + + + + + The installation of %1 is complete. + + + + + FormatPartitionJob + + + Format partition %1 (file system: %2, size: %3 MiB) on %4. + + + + + Format <strong>%3MiB</strong> partition <strong>%1</strong> with file system <strong>%2</strong>. + + + + + Formatting partition %1 with file system %2. + + + + + The installer failed to format partition %1 on disk '%2'. + + + + + GeneralRequirements + + + has at least %1 GiB available drive space + + + + + There is not enough drive space. At least %1 GiB is required. + + + + + has at least %1 GiB working memory + + + + + The system does not have enough working memory. At least %1 GiB is required. + + + + + is plugged in to a power source + + + + + The system is not plugged in to a power source. + + + + + is connected to the Internet + + + + + The system is not connected to the Internet. + + + + + is running the installer as an administrator (root) + + + + + The setup program is not running with administrator rights. + + + + + The installer is not running with administrator rights. + + + + + has a screen large enough to show the whole installer + + + + + The screen is too small to display the setup program. + + + + + The screen is too small to display the installer. + + + + + HostInfoJob + + + Collecting information about your machine. + + + + + IDJob + + + + + + OEM Batch Identifier + + + + + Could not create directories <code>%1</code>. + + + + + Could not open file <code>%1</code>. + + + + + Could not write to file <code>%1</code>. + + + + + InitcpioJob + + + Creating initramfs with mkinitcpio. + + + + + InitramfsJob + + + Creating initramfs. + + + + + InteractiveTerminalPage + + + Konsole not installed + + + + + Please install KDE Konsole and try again! + + + + + Executing script: &nbsp;<code>%1</code> + + + + + InteractiveTerminalViewStep + + + Script + + + + + KeyboardPage + + + Set keyboard model to %1.<br/> + + + + + Set keyboard layout to %1/%2. + + + + + KeyboardQmlViewStep + + + Keyboard + + + + + KeyboardViewStep + + + Keyboard + + + + + LCLocaleDialog + + + System locale setting + + + + + The system locale setting affects the language and character set for some command line user interface elements.<br/>The current setting is <strong>%1</strong>. + + + + + &Cancel + + + + + &OK + + + + + LicensePage + + + Form + + + + + <h1>License Agreement</h1> + + + + + I accept the terms and conditions above. + + + + + Please review the End User License Agreements (EULAs). + + + + + This setup procedure will install proprietary software that is subject to licensing terms. + + + + + If you do not agree with the terms, the setup procedure cannot continue. + + + + + This setup procedure can install proprietary software that is subject to licensing terms in order to provide additional features and enhance the user experience. + + + + + If you do not agree with the terms, proprietary software will not be installed, and open source alternatives will be used instead. + + + + + LicenseViewStep + + + License + + + + + LicenseWidget + + + URL: %1 + + + + + <strong>%1 driver</strong><br/>by %2 + %1 is an untranslatable product name, example: Creative Audigy driver + + + + + <strong>%1 graphics driver</strong><br/><font color="Grey">by %2</font> + %1 is usually a vendor name, example: Nvidia graphics driver + + + + + <strong>%1 browser plugin</strong><br/><font color="Grey">by %2</font> + + + + + <strong>%1 codec</strong><br/><font color="Grey">by %2</font> + + + + + <strong>%1 package</strong><br/><font color="Grey">by %2</font> + + + + + <strong>%1</strong><br/><font color="Grey">by %2</font> + + + + + File: %1 + + + + + Hide license text + + + + + Show the license text + + + + + Open license agreement in browser. + + + + + LocalePage + + + Region: + + + + + Zone: + + + + + + &Change... + + + + + LocaleQmlViewStep + + + Location + + + + + LocaleViewStep + + + Location + + + + + LuksBootKeyFileJob + + + Configuring LUKS key file. + + + + + + No partitions are defined. + + + + + + + Encrypted rootfs setup error + + + + + Root partition %1 is LUKS but no passphrase has been set. + + + + + Could not create LUKS key file for root partition %1. + + + + + Could not configure LUKS key file on partition %1. + + + + + MachineIdJob + + + Generate machine-id. + + + + + Configuration Error + + + + + No root mount point is set for MachineId. + + + + + Map + + + Timezone: %1 + + + + + Please select your preferred location on the map so the installer can suggest the locale + and timezone settings for you. You can fine-tune the suggested settings below. Search the map by dragging + to move and using the +/- buttons to zoom in/out or use mouse scrolling for zooming. + + + + + NetInstallViewStep + + + + Package selection + + + + + Office software + + + + + Office package + + + + + Browser software + + + + + Browser package + + + + + Web browser + + + + + Kernel + + + + + Services + + + + + Login + + + + + Desktop + + + + + Applications + + + + + Communication + + + + + Development + + + + + Office + + + + + Multimedia + + + + + Internet + + + + + Theming + + + + + Gaming + + + + + Utilities + + + + + NotesQmlViewStep + + + Notes + + + + + OEMPage + + + Ba&tch: + + + + + <html><head/><body><p>Enter a batch-identifier here. This will be stored in the target system.</p></body></html> + + + + + <html><head/><body><h1>OEM Configuration</h1><p>Calamares will use OEM settings while configuring the target system.</p></body></html> + + + + + OEMViewStep + + + OEM Configuration + + + + + Set the OEM Batch Identifier to <code>%1</code>. + + + + + Offline + + + Timezone: %1 + + + + + To be able to select a timezone, make sure you are connected to the internet. Restart the installer after connecting. You can fine-tune Language and Locale settings below. + + + + + PWQ + + + Password is too short + + + + + Password is too long + + + + + Password is too weak + + + + + Memory allocation error when setting '%1' + + + + + Memory allocation error + + + + + The password is the same as the old one + + + + + The password is a palindrome + + + + + The password differs with case changes only + + + + + The password is too similar to the old one + + + + + The password contains the user name in some form + + + + + The password contains words from the real name of the user in some form + + + + + The password contains forbidden words in some form + + + + + The password contains less than %1 digits + + + + + The password contains too few digits + + + + + The password contains less than %1 uppercase letters + + + + + The password contains too few uppercase letters + + + + + The password contains less than %1 lowercase letters + + + + + The password contains too few lowercase letters + + + + + The password contains less than %1 non-alphanumeric characters + + + + + The password contains too few non-alphanumeric characters + + + + + The password is shorter than %1 characters + + + + + The password is too short + + + + + The password is just rotated old one + + + + + The password contains less than %1 character classes + + + + + The password does not contain enough character classes + + + + + The password contains more than %1 same characters consecutively + + + + + The password contains too many same characters consecutively + + + + + The password contains more than %1 characters of the same class consecutively + + + + + The password contains too many characters of the same class consecutively + + + + + The password contains monotonic sequence longer than %1 characters + + + + + The password contains too long of a monotonic character sequence + + + + + No password supplied + + + + + Cannot obtain random numbers from the RNG device + + + + + Password generation failed - required entropy too low for settings + + + + + The password fails the dictionary check - %1 + + + + + The password fails the dictionary check + + + + + Unknown setting - %1 + + + + + Unknown setting + + + + + Bad integer value of setting - %1 + + + + + Bad integer value + + + + + Setting %1 is not of integer type + + + + + Setting is not of integer type + + + + + Setting %1 is not of string type + + + + + Setting is not of string type + + + + + Opening the configuration file failed + + + + + The configuration file is malformed + + + + + Fatal failure + + + + + Unknown error + + + + + Password is empty + + + + + PackageChooserPage + + + Form + + + + + Product Name + + + + + TextLabel + + + + + Long Product Description + + + + + Package Selection + + + + + Please pick a product from the list. The selected product will be installed. + + + + + PackageChooserViewStep + + + Packages + + + + + PackageModel + + + Name + + + + + Description + + + + + Page_Keyboard + + + Form + + + + + Keyboard Model: + + + + + Type here to test your keyboard + + + + + Page_UserSetup + + + Form + + + + + What is your name? + మీ పేరు ఏమిటి ? + + + + Your Full Name + + + + + What name do you want to use to log in? + ప్రవేశించడానికి ఈ పేరుని ఉపయోగిస్తారు + + + + login + + + + + What is the name of this computer? + + + + + <small>This name will be used if you make the computer visible to others on a network.</small> + + + + + Computer Name + + + + + Choose a password to keep your account safe. + మీ ఖాతా ను భద్రపరుచుకోవడానికి ఒక మంత్రమును ఎంచుకోండి + + + + + <small>Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals.</small> + అదే మంత్రిని మళ్ళీ ఇక్కడ ఇవ్వండి, దానివలన మీరు పైన ఇచ్చిన దాంట్లో ఏమి అయినా దోషములు ఉంటే సరిదిద్దుకోవచ్చు. ఒక మంచి మంత్రంలో, ఒక అక్షరము, ఒక సంఖ్యా, ఒక విరామచిహ్నం, ఉండాలి. అది కనీసం ఎనిమిది అక్షరాలా పొడవు ఉండాలి. దీనిని కొన్ని వారాలు కానీ నెలలకు కానీ మార్చాలి. + + + + + Password + + + + + + Repeat Password + + + + + When this box is checked, password-strength checking is done and you will not be able to use a weak password. + + + + + Require strong passwords. + + + + + Log in automatically without asking for the password. + + + + + Use the same password for the administrator account. + + + + + Choose a password for the administrator account. + + + + + + <small>Enter the same password twice, so that it can be checked for typing errors.</small> + + + + + PartitionLabelsView + + + Root + + + + + Home + + + + + Boot + + + + + EFI system + + + + + Swap + + + + + New partition for %1 + + + + + New partition + + + + + %1 %2 + size[number] filesystem[name] + + + + + PartitionModel + + + + Free Space + + + + + + New partition + + + + + Name + + + + + File System + + + + + Mount Point + + + + + Size + + + + + PartitionPage + + + Form + + + + + Storage de&vice: + + + + + &Revert All Changes + + + + + New Partition &Table + + + + + Cre&ate + + + + + &Edit + + + + + &Delete + + + + + New Volume Group + + + + + Resize Volume Group + + + + + Deactivate Volume Group + + + + + Remove Volume Group + + + + + I&nstall boot loader on: + + + + + Are you sure you want to create a new partition table on %1? + + + + + Can not create new partition + + + + + The partition table on %1 already has %2 primary partitions, and no more can be added. Please remove one primary partition and add an extended partition, instead. + + + + + PartitionViewStep + + + Gathering system information... + + + + + Partitions + + + + + Install %1 <strong>alongside</strong> another operating system. + + + + + <strong>Erase</strong> disk and install %1. + + + + + <strong>Replace</strong> a partition with %1. + + + + + <strong>Manual</strong> partitioning. + + + + + Install %1 <strong>alongside</strong> another operating system on disk <strong>%2</strong> (%3). + + + + + <strong>Erase</strong> disk <strong>%2</strong> (%3) and install %1. + + + + + <strong>Replace</strong> a partition on disk <strong>%2</strong> (%3) with %1. + + + + + <strong>Manual</strong> partitioning on disk <strong>%1</strong> (%2). + + + + + Disk <strong>%1</strong> (%2) + + + + + Current: + + + + + After: + + + + + No EFI system partition configured + + + + + An EFI system partition is necessary to start %1.<br/><br/>To configure an EFI system partition, go back and select or create a FAT32 filesystem with the <strong>%3</strong> flag enabled and mount point <strong>%2</strong>.<br/><br/>You can continue without setting up an EFI system partition but your system may fail to start. + + + + + An EFI system partition is necessary to start %1.<br/><br/>A partition was configured with mount point <strong>%2</strong> but its <strong>%3</strong> flag is not set.<br/>To set the flag, go back and edit the partition.<br/><br/>You can continue without setting the flag but your system may fail to start. + + + + + EFI system partition flag not set + + + + + Option to use GPT on BIOS + + + + + A GPT partition table is the best option for all systems. This installer supports such a setup for BIOS systems too.<br/><br/>To configure a GPT partition table on BIOS, (if not done so already) go back and set the partition table to GPT, next create a 8 MB unformatted partition with the <strong>bios_grub</strong> flag enabled.<br/><br/>An unformatted 8 MB partition is necessary to start %1 on a BIOS system with GPT. + + + + + Boot partition not encrypted + + + + + A separate boot partition was set up together with an encrypted root partition, but the boot partition is not encrypted.<br/><br/>There are security concerns with this kind of setup, because important system files are kept on an unencrypted partition.<br/>You may continue if you wish, but filesystem unlocking will happen later during system startup.<br/>To encrypt the boot partition, go back and recreate it, selecting <strong>Encrypt</strong> in the partition creation window. + + + + + has at least one disk device available. + + + + + There are no partitions to install on. + + + + + PlasmaLnfJob + + + Plasma Look-and-Feel Job + + + + + + Could not select KDE Plasma Look-and-Feel package + + + + + PlasmaLnfPage + + + Form + + + + + Please choose a look-and-feel for the KDE Plasma Desktop. You can also skip this step and configure the look-and-feel once the system is set up. Clicking on a look-and-feel selection will give you a live preview of that look-and-feel. + + + + + Please choose a look-and-feel for the KDE Plasma Desktop. You can also skip this step and configure the look-and-feel once the system is installed. Clicking on a look-and-feel selection will give you a live preview of that look-and-feel. + + + + + PlasmaLnfViewStep + + + Look-and-Feel + + + + + PreserveFiles + + + Saving files for later ... + + + + + No files configured to save for later. + + + + + Not all of the configured files could be preserved. + + + + + ProcessResult + + + +There was no output from the command. + + + + + +Output: + + + + + + External command crashed. + + + + + Command <i>%1</i> crashed. + + + + + External command failed to start. + + + + + Command <i>%1</i> failed to start. + + + + + Internal error when starting command. + + + + + Bad parameters for process job call. + + + + + External command failed to finish. + + + + + Command <i>%1</i> failed to finish in %2 seconds. + + + + + External command finished with errors. + + + + + Command <i>%1</i> finished with exit code %2. + + + + + QObject + + + %1 (%2) + + + + + unknown + + + + + extended + + + + + unformatted + + + + + swap + + + + + Default Keyboard Model + + + + + + Default + + + + + + + + File not found + + + + + Path <pre>%1</pre> must be an absolute path. + + + + + Could not create new random file <pre>%1</pre>. + + + + + No product + + + + + No description provided. + + + + + (no mount point) + + + + + Unpartitioned space or unknown partition table + + + + + Recommended + + + <p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/> + Setup can continue, but some features might be disabled.</p> + + + + + RemoveUserJob + + + Remove live user from target system + + + + + RemoveVolumeGroupJob + + + + Remove Volume Group named %1. + + + + + Remove Volume Group named <strong>%1</strong>. + + + + + The installer failed to remove a volume group named '%1'. + + + + + ReplaceWidget + + + Form + + + + + Select where to install %1.<br/><font color="red">Warning: </font>this will delete all files on the selected partition. + + + + + The selected item does not appear to be a valid partition. + + + + + %1 cannot be installed on empty space. Please select an existing partition. + + + + + %1 cannot be installed on an extended partition. Please select an existing primary or logical partition. + + + + + %1 cannot be installed on this partition. + + + + + Data partition (%1) + + + + + Unknown system partition (%1) + + + + + %1 system partition (%2) + + + + + <strong>%4</strong><br/><br/>The partition %1 is too small for %2. Please select a partition with capacity at least %3 GiB. + + + + + <strong>%2</strong><br/><br/>An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1. + + + + + + + <strong>%3</strong><br/><br/>%1 will be installed on %2.<br/><font color="red">Warning: </font>all data on partition %2 will be lost. + + + + + The EFI system partition at %1 will be used for starting %2. + + + + + EFI system partition: + + + + + Requirements + + + <p>This computer does not satisfy the minimum requirements for installing %1.<br/> + Installation cannot continue.</p> + + + + + <p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/> + Setup can continue, but some features might be disabled.</p> + + + + + ResizeFSJob + + + Resize Filesystem Job + + + + + Invalid configuration + + + + + The file-system resize job has an invalid configuration and will not run. + + + + + KPMCore not Available + + + + + Calamares cannot start KPMCore for the file-system resize job. + + + + + + + + + Resize Failed + + + + + The filesystem %1 could not be found in this system, and cannot be resized. + + + + + The device %1 could not be found in this system, and cannot be resized. + + + + + + The filesystem %1 cannot be resized. + + + + + + The device %1 cannot be resized. + + + + + The filesystem %1 must be resized, but cannot. + + + + + The device %1 must be resized, but cannot + + + + + ResizePartitionJob + + + Resize partition %1. + + + + + Resize <strong>%2MiB</strong> partition <strong>%1</strong> to <strong>%3MiB</strong>. + + + + + Resizing %2MiB partition %1 to %3MiB. + + + + + The installer failed to resize partition %1 on disk '%2'. + + + + + ResizeVolumeGroupDialog + + + Resize Volume Group + + + + + ResizeVolumeGroupJob + + + + Resize volume group named %1 from %2 to %3. + + + + + Resize volume group named <strong>%1</strong> from <strong>%2</strong> to <strong>%3</strong>. + + + + + The installer failed to resize a volume group named '%1'. + + + + + ResultsListDialog + + + For best results, please ensure that this computer: + + + + + System requirements + + + + + ResultsListWidget + + + This computer does not satisfy the minimum requirements for setting up %1.<br/>Setup cannot continue. <a href="#details">Details...</a> + + + + + This computer does not satisfy the minimum requirements for installing %1.<br/>Installation cannot continue. <a href="#details">Details...</a> + + + + + This computer does not satisfy some of the recommended requirements for setting up %1.<br/>Setup can continue, but some features might be disabled. + + + + + This computer does not satisfy some of the recommended requirements for installing %1.<br/>Installation can continue, but some features might be disabled. + + + + + This program will ask you some questions and set up %2 on your computer. + + + + + ScanningDialog + + + Scanning storage devices... + + + + + Partitioning + + + + + SetHostNameJob + + + Set hostname %1 + + + + + Set hostname <strong>%1</strong>. + + + + + Setting hostname %1. + + + + + + Internal Error + + + + + + Cannot write hostname to target system + + + + + SetKeyboardLayoutJob + + + Set keyboard model to %1, layout to %2-%3 + + + + + Failed to write keyboard configuration for the virtual console. + + + + + + + Failed to write to %1 + + + + + Failed to write keyboard configuration for X11. + + + + + Failed to write keyboard configuration to existing /etc/default directory. + + + + + SetPartFlagsJob + + + Set flags on partition %1. + + + + + Set flags on %1MiB %2 partition. + + + + + Set flags on new partition. + + + + + Clear flags on partition <strong>%1</strong>. + + + + + Clear flags on %1MiB <strong>%2</strong> partition. + + + + + Clear flags on new partition. + + + + + Flag partition <strong>%1</strong> as <strong>%2</strong>. + + + + + Flag %1MiB <strong>%2</strong> partition as <strong>%3</strong>. + + + + + Flag new partition as <strong>%1</strong>. + + + + + Clearing flags on partition <strong>%1</strong>. + + + + + Clearing flags on %1MiB <strong>%2</strong> partition. + + + + + Clearing flags on new partition. + + + + + Setting flags <strong>%2</strong> on partition <strong>%1</strong>. + + + + + Setting flags <strong>%3</strong> on %1MiB <strong>%2</strong> partition. + + + + + Setting flags <strong>%1</strong> on new partition. + + + + + The installer failed to set flags on partition %1. + + + + + SetPasswordJob + + + Set password for user %1 + + + + + Setting password for user %1. + + + + + Bad destination system path. + + + + + rootMountPoint is %1 + + + + + Cannot disable root account. + + + + + passwd terminated with error code %1. + + + + + Cannot set password for user %1. + + + + + usermod terminated with error code %1. + + + + + SetTimezoneJob + + + Set timezone to %1/%2 + + + + + Cannot access selected timezone path. + + + + + Bad path: %1 + + + + + Cannot set timezone. + + + + + Link creation failed, target: %1; link name: %2 + + + + + Cannot set timezone, + + + + + Cannot open /etc/timezone for writing + + + + + ShellProcessJob + + + Shell Processes Job + + + + + SlideCounter + + + %L1 / %L2 + slide counter, %1 of %2 (numeric) + + + + + SummaryPage + + + This is an overview of what will happen once you start the setup procedure. + + + + + This is an overview of what will happen once you start the install procedure. + + + + + SummaryViewStep + + + Summary + + + + + TrackingInstallJob + + + Installation feedback + + + + + Sending installation feedback. + + + + + Internal error in install-tracking. + + + + + HTTP request timed out. + + + + + TrackingKUserFeedbackJob + + + KDE user feedback + + + + + Configuring KDE user feedback. + + + + + + Error in KDE user feedback configuration. + + + + + Could not configure KDE user feedback correctly, script error %1. + + + + + Could not configure KDE user feedback correctly, Calamares error %1. + + + + + TrackingMachineUpdateManagerJob + + + Machine feedback + + + + + Configuring machine feedback. + + + + + + Error in machine feedback configuration. + + + + + Could not configure machine feedback correctly, script error %1. + + + + + Could not configure machine feedback correctly, Calamares error %1. + + + + + TrackingPage + + + Form + + + + + Placeholder + + + + + <html><head/><body><p>Click here to send <span style=" font-weight:600;">no information at all</span> about your installation.</p></body></html> + + + + + <html><head/><body><p><a href="placeholder"><span style=" text-decoration: underline; color:#2980b9;">Click here for more information about user feedback</span></a></p></body></html> + + + + + Tracking helps %1 to see how often it is installed, what hardware it is installed on and which applications are used. To see what will be sent, please click the help icon next to each area. + + + + + By selecting this you will send information about your installation and hardware. This information will only be sent <b>once</b> after the installation finishes. + + + + + By selecting this you will periodically send information about your <b>machine</b> installation, hardware and applications, to %1. + + + + + By selecting this you will regularly send information about your <b>user</b> installation, hardware, applications and application usage patterns, to %1. + + + + + TrackingViewStep + + + Feedback + + + + + UsersPage + + + <small>If more than one person will use this computer, you can create multiple accounts after setup.</small> + + + + + <small>If more than one person will use this computer, you can create multiple accounts after installation.</small> + + + + + Your passwords do not match! + + + + + UsersViewStep + + + Users + + + + + VariantModel + + + Key + + + + + Value + + + + + VolumeGroupBaseDialog + + + Create Volume Group + + + + + List of Physical Volumes + + + + + Volume Group Name: + + + + + Volume Group Type: + + + + + Physical Extent Size: + + + + + MiB + + + + + Total Size: + + + + + Used Size: + + + + + Total Sectors: + + + + + Quantity of LVs: + + + + + WelcomePage + + + Form + + + + + + Select application and system language + + + + + &About + + + + + Open donations website + + + + + &Donate + + + + + Open help and support website + + + + + &Support + + + + + Open issues and bug-tracking website + + + + + &Known issues + + + + + Open release notes website + + + + + &Release notes + + + + + <h1>Welcome to the Calamares setup program for %1.</h1> + + + + + <h1>Welcome to %1 setup.</h1> + + + + + <h1>Welcome to the Calamares installer for %1.</h1> + + + + + <h1>Welcome to the %1 installer.</h1> + + + + + %1 support + + + + + About %1 setup + + + + + About %1 installer + + + + + <h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Thanks to <a href="https://calamares.io/team/">the Calamares team</a> and the <a href="https://www.transifex.com/calamares/calamares/">Calamares translators team</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> development is sponsored by <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. + + + + + WelcomeQmlViewStep + + + Welcome + + + + + WelcomeViewStep + + + Welcome + + + + + about + + + <h1>%1</h1><br/> + <strong>%2<br/> + for %3</strong><br/><br/> + Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/> + Copyright 2017-2020 Adriaan de Groot &lt;groot@kde.org&gt;<br/> + Thanks to <a href='https://calamares.io/team/'>the Calamares team</a> + and the <a href='https://www.transifex.com/calamares/calamares/'>Calamares + translators team</a>.<br/><br/> + <a href='https://calamares.io/'>Calamares</a> + development is sponsored by <br/> + <a href='http://www.blue-systems.com/'>Blue Systems</a> - + Liberating Software. + + + + + Back + + + + + i18n + + + <h1>Languages</h1> </br> + The system locale setting affects the language and character set for some command line user interface elements. The current setting is <strong>%1</strong>. + + + + + <h1>Locales</h1> </br> + The system locale setting affects the numbers and dates format. The current setting is <strong>%1</strong>. + + + + + Back + + + + + keyboardq + + + Keyboard Model + + + + + Pick your preferred keyboard model or use the default one based on the detected hardware + + + + + Refresh + + + + + + Layouts + + + + + + Keyboard Layout + + + + + Models + + + + + Variants + + + + + Test your keyboard + + + + + localeq + + + Change + + + + + notesqml + + + <h3>%1</h3> + <p>These are example release notes.</p> + + + + + release_notes + + + <h3>%1</h3> + <p>This an example QML file, showing options in RichText with Flickable content.</p> + + <p>QML with RichText can use HTML tags, Flickable content is useful for touchscreens.</p> + + <p><b>This is bold text</b></p> + <p><i>This is italic text</i></p> + <p><u>This is underlined text</u></p> + <p><center>This text will be center-aligned.</center></p> + <p><s>This is strikethrough</s></p> + + <p>Code example: + <code>ls -l /home</code></p> + + <p><b>Lists:</b></p> + <ul> + <li>Intel CPU systems</li> + <li>AMD CPU systems</li> + </ul> + + <p>The vertical scrollbar is adjustable, current width set to 10.</p> + + + + + Back + + + + + welcomeq + + + <h3>Welcome to the %1 <quote>%2</quote> installer</h3> + <p>This program will ask you some questions and set up %1 on your computer.</p> + + + + + About + + + + + Support + + + + + Known issues + + + + + Release notes + + + + + Donate + + + + diff --git a/lang/python/ar/LC_MESSAGES/python.mo b/lang/python/ar/LC_MESSAGES/python.mo deleted file mode 100644 index 53869a8e7..000000000 Binary files a/lang/python/ar/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/as/LC_MESSAGES/python.mo b/lang/python/as/LC_MESSAGES/python.mo deleted file mode 100644 index f9533c495..000000000 Binary files a/lang/python/as/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ast/LC_MESSAGES/python.mo b/lang/python/ast/LC_MESSAGES/python.mo deleted file mode 100644 index d14fb29fa..000000000 Binary files a/lang/python/ast/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/az/LC_MESSAGES/python.mo b/lang/python/az/LC_MESSAGES/python.mo deleted file mode 100644 index 30568e957..000000000 Binary files a/lang/python/az/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/az_AZ/LC_MESSAGES/python.mo b/lang/python/az_AZ/LC_MESSAGES/python.mo deleted file mode 100644 index 7ecad241f..000000000 Binary files a/lang/python/az_AZ/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/be/LC_MESSAGES/python.mo b/lang/python/be/LC_MESSAGES/python.mo deleted file mode 100644 index 0f786f5e7..000000000 Binary files a/lang/python/be/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/bg/LC_MESSAGES/python.mo b/lang/python/bg/LC_MESSAGES/python.mo deleted file mode 100644 index 6f3e15740..000000000 Binary files a/lang/python/bg/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/bn/LC_MESSAGES/python.mo b/lang/python/bn/LC_MESSAGES/python.mo deleted file mode 100644 index 7faa09a2c..000000000 Binary files a/lang/python/bn/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ca/LC_MESSAGES/python.mo b/lang/python/ca/LC_MESSAGES/python.mo deleted file mode 100644 index 69051c442..000000000 Binary files a/lang/python/ca/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ca@valencia/LC_MESSAGES/python.mo b/lang/python/ca@valencia/LC_MESSAGES/python.mo deleted file mode 100644 index ab2697f1e..000000000 Binary files a/lang/python/ca@valencia/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/cs_CZ/LC_MESSAGES/python.mo b/lang/python/cs_CZ/LC_MESSAGES/python.mo deleted file mode 100644 index 8062d80c4..000000000 Binary files a/lang/python/cs_CZ/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/da/LC_MESSAGES/python.mo b/lang/python/da/LC_MESSAGES/python.mo deleted file mode 100644 index e20269910..000000000 Binary files a/lang/python/da/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/de/LC_MESSAGES/python.mo b/lang/python/de/LC_MESSAGES/python.mo deleted file mode 100644 index fb100aa4b..000000000 Binary files a/lang/python/de/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/el/LC_MESSAGES/python.mo b/lang/python/el/LC_MESSAGES/python.mo deleted file mode 100644 index 5fc568093..000000000 Binary files a/lang/python/el/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/en_GB/LC_MESSAGES/python.mo b/lang/python/en_GB/LC_MESSAGES/python.mo deleted file mode 100644 index 4c2401cc7..000000000 Binary files a/lang/python/en_GB/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/eo/LC_MESSAGES/python.mo b/lang/python/eo/LC_MESSAGES/python.mo deleted file mode 100644 index 0f910a110..000000000 Binary files a/lang/python/eo/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/es/LC_MESSAGES/python.mo b/lang/python/es/LC_MESSAGES/python.mo deleted file mode 100644 index d2ab2f337..000000000 Binary files a/lang/python/es/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/es_MX/LC_MESSAGES/python.mo b/lang/python/es_MX/LC_MESSAGES/python.mo deleted file mode 100644 index 86619f9ff..000000000 Binary files a/lang/python/es_MX/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/es_PR/LC_MESSAGES/python.mo b/lang/python/es_PR/LC_MESSAGES/python.mo deleted file mode 100644 index d3872bc6f..000000000 Binary files a/lang/python/es_PR/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/et/LC_MESSAGES/python.mo b/lang/python/et/LC_MESSAGES/python.mo deleted file mode 100644 index bc59b5fe4..000000000 Binary files a/lang/python/et/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/eu/LC_MESSAGES/python.mo b/lang/python/eu/LC_MESSAGES/python.mo deleted file mode 100644 index 6ec9f5277..000000000 Binary files a/lang/python/eu/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/fa/LC_MESSAGES/python.mo b/lang/python/fa/LC_MESSAGES/python.mo deleted file mode 100644 index f3e832135..000000000 Binary files a/lang/python/fa/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/fi_FI/LC_MESSAGES/python.mo b/lang/python/fi_FI/LC_MESSAGES/python.mo deleted file mode 100644 index 9f9791235..000000000 Binary files a/lang/python/fi_FI/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/fr/LC_MESSAGES/python.mo b/lang/python/fr/LC_MESSAGES/python.mo deleted file mode 100644 index c226c213b..000000000 Binary files a/lang/python/fr/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/fr_CH/LC_MESSAGES/python.mo b/lang/python/fr_CH/LC_MESSAGES/python.mo deleted file mode 100644 index a063ac8ce..000000000 Binary files a/lang/python/fr_CH/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/gl/LC_MESSAGES/python.mo b/lang/python/gl/LC_MESSAGES/python.mo deleted file mode 100644 index d70c91133..000000000 Binary files a/lang/python/gl/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/gu/LC_MESSAGES/python.mo b/lang/python/gu/LC_MESSAGES/python.mo deleted file mode 100644 index 114bcc926..000000000 Binary files a/lang/python/gu/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/he/LC_MESSAGES/python.mo b/lang/python/he/LC_MESSAGES/python.mo deleted file mode 100644 index cdd79d657..000000000 Binary files a/lang/python/he/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/hi/LC_MESSAGES/python.mo b/lang/python/hi/LC_MESSAGES/python.mo deleted file mode 100644 index 8b12ae6dc..000000000 Binary files a/lang/python/hi/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/hr/LC_MESSAGES/python.mo b/lang/python/hr/LC_MESSAGES/python.mo deleted file mode 100644 index 0ea377107..000000000 Binary files a/lang/python/hr/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/hu/LC_MESSAGES/python.mo b/lang/python/hu/LC_MESSAGES/python.mo deleted file mode 100644 index 60592e1b5..000000000 Binary files a/lang/python/hu/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/id/LC_MESSAGES/python.mo b/lang/python/id/LC_MESSAGES/python.mo deleted file mode 100644 index 2a6c52941..000000000 Binary files a/lang/python/id/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ie/LC_MESSAGES/python.mo b/lang/python/ie/LC_MESSAGES/python.mo deleted file mode 100644 index 4dfdef0e7..000000000 Binary files a/lang/python/ie/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/is/LC_MESSAGES/python.mo b/lang/python/is/LC_MESSAGES/python.mo deleted file mode 100644 index b56cd6fbc..000000000 Binary files a/lang/python/is/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/it_IT/LC_MESSAGES/python.mo b/lang/python/it_IT/LC_MESSAGES/python.mo deleted file mode 100644 index 1936447e6..000000000 Binary files a/lang/python/it_IT/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ja/LC_MESSAGES/python.mo b/lang/python/ja/LC_MESSAGES/python.mo deleted file mode 100644 index e6b02ece7..000000000 Binary files a/lang/python/ja/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/kk/LC_MESSAGES/python.mo b/lang/python/kk/LC_MESSAGES/python.mo deleted file mode 100644 index 0678172ea..000000000 Binary files a/lang/python/kk/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/kn/LC_MESSAGES/python.mo b/lang/python/kn/LC_MESSAGES/python.mo deleted file mode 100644 index 457bfa792..000000000 Binary files a/lang/python/kn/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ko/LC_MESSAGES/python.mo b/lang/python/ko/LC_MESSAGES/python.mo deleted file mode 100644 index b15abd450..000000000 Binary files a/lang/python/ko/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/lo/LC_MESSAGES/python.mo b/lang/python/lo/LC_MESSAGES/python.mo deleted file mode 100644 index 0236d8e18..000000000 Binary files a/lang/python/lo/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/lt/LC_MESSAGES/python.mo b/lang/python/lt/LC_MESSAGES/python.mo deleted file mode 100644 index 5f976d9ce..000000000 Binary files a/lang/python/lt/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/lv/LC_MESSAGES/python.mo b/lang/python/lv/LC_MESSAGES/python.mo deleted file mode 100644 index f6651cf37..000000000 Binary files a/lang/python/lv/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/mk/LC_MESSAGES/python.mo b/lang/python/mk/LC_MESSAGES/python.mo deleted file mode 100644 index 1680c8dc1..000000000 Binary files a/lang/python/mk/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ml/LC_MESSAGES/python.mo b/lang/python/ml/LC_MESSAGES/python.mo deleted file mode 100644 index 60415346e..000000000 Binary files a/lang/python/ml/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/mr/LC_MESSAGES/python.mo b/lang/python/mr/LC_MESSAGES/python.mo deleted file mode 100644 index 99e564ec4..000000000 Binary files a/lang/python/mr/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/nb/LC_MESSAGES/python.mo b/lang/python/nb/LC_MESSAGES/python.mo deleted file mode 100644 index 93379d3b8..000000000 Binary files a/lang/python/nb/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ne_NP/LC_MESSAGES/python.mo b/lang/python/ne_NP/LC_MESSAGES/python.mo deleted file mode 100644 index 1d91bbddd..000000000 Binary files a/lang/python/ne_NP/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/nl/LC_MESSAGES/python.mo b/lang/python/nl/LC_MESSAGES/python.mo deleted file mode 100644 index 4c862621f..000000000 Binary files a/lang/python/nl/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/pl/LC_MESSAGES/python.mo b/lang/python/pl/LC_MESSAGES/python.mo deleted file mode 100644 index 7bafa3c5f..000000000 Binary files a/lang/python/pl/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/pt_BR/LC_MESSAGES/python.mo b/lang/python/pt_BR/LC_MESSAGES/python.mo deleted file mode 100644 index a27bbf671..000000000 Binary files a/lang/python/pt_BR/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/pt_PT/LC_MESSAGES/python.mo b/lang/python/pt_PT/LC_MESSAGES/python.mo deleted file mode 100644 index 3076c2a8f..000000000 Binary files a/lang/python/pt_PT/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ro/LC_MESSAGES/python.mo b/lang/python/ro/LC_MESSAGES/python.mo deleted file mode 100644 index 3844e22d8..000000000 Binary files a/lang/python/ro/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ru/LC_MESSAGES/python.mo b/lang/python/ru/LC_MESSAGES/python.mo deleted file mode 100644 index c26778b42..000000000 Binary files a/lang/python/ru/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/sk/LC_MESSAGES/python.mo b/lang/python/sk/LC_MESSAGES/python.mo deleted file mode 100644 index ce3bab491..000000000 Binary files a/lang/python/sk/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/sl/LC_MESSAGES/python.mo b/lang/python/sl/LC_MESSAGES/python.mo deleted file mode 100644 index 1943947b8..000000000 Binary files a/lang/python/sl/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/sq/LC_MESSAGES/python.mo b/lang/python/sq/LC_MESSAGES/python.mo deleted file mode 100644 index 5f245ee0c..000000000 Binary files a/lang/python/sq/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/sr/LC_MESSAGES/python.mo b/lang/python/sr/LC_MESSAGES/python.mo deleted file mode 100644 index 377bfcbaa..000000000 Binary files a/lang/python/sr/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/sr@latin/LC_MESSAGES/python.mo b/lang/python/sr@latin/LC_MESSAGES/python.mo deleted file mode 100644 index b9ce140b0..000000000 Binary files a/lang/python/sr@latin/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/sv/LC_MESSAGES/python.mo b/lang/python/sv/LC_MESSAGES/python.mo deleted file mode 100644 index 20667a99c..000000000 Binary files a/lang/python/sv/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/te/LC_MESSAGES/python.po b/lang/python/te/LC_MESSAGES/python.po new file mode 100644 index 000000000..5ab3e4924 --- /dev/null +++ b/lang/python/te/LC_MESSAGES/python.po @@ -0,0 +1,339 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-09 20:56+0200\n" +"PO-Revision-Date: 2017-08-09 10:34+0000\n" +"Language-Team: Telugu (https://www.transifex.com/calamares/teams/20061/te/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: te\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/modules/grubcfg/main.py:37 +msgid "Configure GRUB." +msgstr "" + +#: src/modules/mount/main.py:38 +msgid "Mounting partitions." +msgstr "" + +#: src/modules/mount/main.py:150 src/modules/initcpiocfg/main.py:205 +#: src/modules/initcpiocfg/main.py:209 +#: src/modules/luksopenswaphookcfg/main.py:95 +#: src/modules/luksopenswaphookcfg/main.py:99 src/modules/rawfs/main.py:173 +#: src/modules/initramfscfg/main.py:94 src/modules/initramfscfg/main.py:98 +#: src/modules/openrcdmcryptcfg/main.py:78 +#: src/modules/openrcdmcryptcfg/main.py:82 src/modules/fstab/main.py:332 +#: src/modules/fstab/main.py:338 src/modules/localecfg/main.py:144 +#: src/modules/networkcfg/main.py:48 +msgid "Configuration Error" +msgstr "" + +#: src/modules/mount/main.py:151 src/modules/initcpiocfg/main.py:206 +#: src/modules/luksopenswaphookcfg/main.py:96 src/modules/rawfs/main.py:174 +#: src/modules/initramfscfg/main.py:95 src/modules/openrcdmcryptcfg/main.py:79 +#: src/modules/fstab/main.py:333 +msgid "No partitions are defined for
{!s}
to use." +msgstr "" + +#: src/modules/services-systemd/main.py:35 +msgid "Configure systemd services" +msgstr "" + +#: src/modules/services-systemd/main.py:68 +#: src/modules/services-openrc/main.py:102 +msgid "Cannot modify service" +msgstr "" + +#: src/modules/services-systemd/main.py:69 +msgid "" +"systemctl {arg!s} call in chroot returned error code {num!s}." +msgstr "" + +#: src/modules/services-systemd/main.py:72 +#: src/modules/services-systemd/main.py:76 +msgid "Cannot enable systemd service {name!s}." +msgstr "" + +#: src/modules/services-systemd/main.py:74 +msgid "Cannot enable systemd target {name!s}." +msgstr "" + +#: src/modules/services-systemd/main.py:78 +msgid "Cannot disable systemd target {name!s}." +msgstr "" + +#: src/modules/services-systemd/main.py:80 +msgid "Cannot mask systemd unit {name!s}." +msgstr "" + +#: src/modules/services-systemd/main.py:82 +msgid "" +"Unknown systemd commands {command!s} and " +"{suffix!s} for unit {name!s}." +msgstr "" + +#: src/modules/umount/main.py:40 +msgid "Unmount file systems." +msgstr "" + +#: src/modules/unpackfs/main.py:44 +msgid "Filling up filesystems." +msgstr "" + +#: src/modules/unpackfs/main.py:257 +msgid "rsync failed with error code {}." +msgstr "" + +#: src/modules/unpackfs/main.py:302 +msgid "Unpacking image {}/{}, file {}/{}" +msgstr "" + +#: src/modules/unpackfs/main.py:317 +msgid "Starting to unpack {}" +msgstr "" + +#: src/modules/unpackfs/main.py:326 src/modules/unpackfs/main.py:448 +msgid "Failed to unpack image \"{}\"" +msgstr "" + +#: src/modules/unpackfs/main.py:415 +msgid "No mount point for root partition" +msgstr "" + +#: src/modules/unpackfs/main.py:416 +msgid "globalstorage does not contain a \"rootMountPoint\" key, doing nothing" +msgstr "" + +#: src/modules/unpackfs/main.py:421 +msgid "Bad mount point for root partition" +msgstr "" + +#: src/modules/unpackfs/main.py:422 +msgid "rootMountPoint is \"{}\", which does not exist, doing nothing" +msgstr "" + +#: src/modules/unpackfs/main.py:438 src/modules/unpackfs/main.py:442 +#: src/modules/unpackfs/main.py:462 +msgid "Bad unsquash configuration" +msgstr "" + +#: src/modules/unpackfs/main.py:439 +msgid "The filesystem for \"{}\" ({}) is not supported by your current kernel" +msgstr "" + +#: src/modules/unpackfs/main.py:443 +msgid "The source filesystem \"{}\" does not exist" +msgstr "" + +#: src/modules/unpackfs/main.py:449 +msgid "" +"Failed to find unsquashfs, make sure you have the squashfs-tools package " +"installed" +msgstr "" + +#: src/modules/unpackfs/main.py:463 +msgid "The destination \"{}\" in the target system is not a directory" +msgstr "" + +#: src/modules/displaymanager/main.py:523 +msgid "Cannot write KDM configuration file" +msgstr "" + +#: src/modules/displaymanager/main.py:524 +msgid "KDM config file {!s} does not exist" +msgstr "" + +#: src/modules/displaymanager/main.py:585 +msgid "Cannot write LXDM configuration file" +msgstr "" + +#: src/modules/displaymanager/main.py:586 +msgid "LXDM config file {!s} does not exist" +msgstr "" + +#: src/modules/displaymanager/main.py:669 +msgid "Cannot write LightDM configuration file" +msgstr "" + +#: src/modules/displaymanager/main.py:670 +msgid "LightDM config file {!s} does not exist" +msgstr "" + +#: src/modules/displaymanager/main.py:744 +msgid "Cannot configure LightDM" +msgstr "" + +#: src/modules/displaymanager/main.py:745 +msgid "No LightDM greeter installed." +msgstr "" + +#: src/modules/displaymanager/main.py:776 +msgid "Cannot write SLIM configuration file" +msgstr "" + +#: src/modules/displaymanager/main.py:777 +msgid "SLIM config file {!s} does not exist" +msgstr "" + +#: src/modules/displaymanager/main.py:903 +msgid "No display managers selected for the displaymanager module." +msgstr "" + +#: src/modules/displaymanager/main.py:904 +msgid "" +"The displaymanagers list is empty or undefined in bothglobalstorage and " +"displaymanager.conf." +msgstr "" + +#: src/modules/displaymanager/main.py:986 +msgid "Display manager configuration was incomplete" +msgstr "" + +#: src/modules/initcpiocfg/main.py:37 +msgid "Configuring mkinitcpio." +msgstr "" + +#: src/modules/initcpiocfg/main.py:210 +#: src/modules/luksopenswaphookcfg/main.py:100 +#: src/modules/initramfscfg/main.py:99 src/modules/openrcdmcryptcfg/main.py:83 +#: src/modules/fstab/main.py:339 src/modules/localecfg/main.py:145 +#: src/modules/networkcfg/main.py:49 +msgid "No root mount point is given for
{!s}
to use." +msgstr "" + +#: src/modules/luksopenswaphookcfg/main.py:35 +msgid "Configuring encrypted swap." +msgstr "" + +#: src/modules/rawfs/main.py:35 +msgid "Installing data." +msgstr "" + +#: src/modules/services-openrc/main.py:38 +msgid "Configure OpenRC services" +msgstr "" + +#: src/modules/services-openrc/main.py:66 +msgid "Cannot add service {name!s} to run-level {level!s}." +msgstr "" + +#: src/modules/services-openrc/main.py:68 +msgid "Cannot remove service {name!s} from run-level {level!s}." +msgstr "" + +#: src/modules/services-openrc/main.py:70 +msgid "" +"Unknown service-action {arg!s} for service {name!s} in run-" +"level {level!s}." +msgstr "" + +#: src/modules/services-openrc/main.py:103 +msgid "" +"rc-update {arg!s} call in chroot returned error code {num!s}." +msgstr "" + +#: src/modules/services-openrc/main.py:110 +msgid "Target runlevel does not exist" +msgstr "" + +#: src/modules/services-openrc/main.py:111 +msgid "" +"The path for runlevel {level!s} is {path!s}, which does not " +"exist." +msgstr "" + +#: src/modules/services-openrc/main.py:119 +msgid "Target service does not exist" +msgstr "" + +#: src/modules/services-openrc/main.py:120 +msgid "" +"The path for service {name!s} is {path!s}, which does not " +"exist." +msgstr "" + +#: src/modules/plymouthcfg/main.py:36 +msgid "Configure Plymouth theme" +msgstr "" + +#: src/modules/packages/main.py:59 src/modules/packages/main.py:68 +#: src/modules/packages/main.py:78 +msgid "Install packages." +msgstr "" + +#: src/modules/packages/main.py:66 +#, python-format +msgid "Processing packages (%(count)d / %(total)d)" +msgstr "" + +#: src/modules/packages/main.py:71 +#, python-format +msgid "Installing one package." +msgid_plural "Installing %(num)d packages." +msgstr[0] "" +msgstr[1] "" + +#: src/modules/packages/main.py:74 +#, python-format +msgid "Removing one package." +msgid_plural "Removing %(num)d packages." +msgstr[0] "" +msgstr[1] "" + +#: src/modules/bootloader/main.py:51 +msgid "Install bootloader." +msgstr "" + +#: src/modules/hwclock/main.py:35 +msgid "Setting hardware clock." +msgstr "" + +#: src/modules/dracut/main.py:36 +msgid "Creating initramfs with dracut." +msgstr "" + +#: src/modules/dracut/main.py:58 +msgid "Failed to run dracut on the target" +msgstr "" + +#: src/modules/dracut/main.py:59 +msgid "The exit code was {}" +msgstr "" + +#: src/modules/initramfscfg/main.py:41 +msgid "Configuring initramfs." +msgstr "" + +#: src/modules/openrcdmcryptcfg/main.py:34 +msgid "Configuring OpenRC dmcrypt service." +msgstr "" + +#: src/modules/fstab/main.py:38 +msgid "Writing fstab." +msgstr "" + +#: src/modules/dummypython/main.py:44 +msgid "Dummy python job." +msgstr "" + +#: src/modules/dummypython/main.py:46 src/modules/dummypython/main.py:102 +#: src/modules/dummypython/main.py:103 +msgid "Dummy python step {}" +msgstr "" + +#: src/modules/localecfg/main.py:39 +msgid "Configuring locales." +msgstr "" + +#: src/modules/networkcfg/main.py:37 +msgid "Saving network configuration." +msgstr "" diff --git a/lang/python/tg/LC_MESSAGES/python.mo b/lang/python/tg/LC_MESSAGES/python.mo deleted file mode 100644 index fc92ff37e..000000000 Binary files a/lang/python/tg/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/th/LC_MESSAGES/python.mo b/lang/python/th/LC_MESSAGES/python.mo deleted file mode 100644 index 3b427fbbf..000000000 Binary files a/lang/python/th/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/tr_TR/LC_MESSAGES/python.mo b/lang/python/tr_TR/LC_MESSAGES/python.mo deleted file mode 100644 index 817072661..000000000 Binary files a/lang/python/tr_TR/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/uk/LC_MESSAGES/python.mo b/lang/python/uk/LC_MESSAGES/python.mo deleted file mode 100644 index d30e896ea..000000000 Binary files a/lang/python/uk/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/ur/LC_MESSAGES/python.mo b/lang/python/ur/LC_MESSAGES/python.mo deleted file mode 100644 index 31761ef92..000000000 Binary files a/lang/python/ur/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/uz/LC_MESSAGES/python.mo b/lang/python/uz/LC_MESSAGES/python.mo deleted file mode 100644 index 3c75289ee..000000000 Binary files a/lang/python/uz/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/zh_CN/LC_MESSAGES/python.mo b/lang/python/zh_CN/LC_MESSAGES/python.mo deleted file mode 100644 index ac41fe04d..000000000 Binary files a/lang/python/zh_CN/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/python/zh_TW/LC_MESSAGES/python.mo b/lang/python/zh_TW/LC_MESSAGES/python.mo deleted file mode 100644 index 3bf723b47..000000000 Binary files a/lang/python/zh_TW/LC_MESSAGES/python.mo and /dev/null differ diff --git a/lang/txload.cpp b/lang/txload.cpp index 68a157b81..b7d14c8bf 100644 --- a/lang/txload.cpp +++ b/lang/txload.cpp @@ -1,21 +1,10 @@ -/* === This file is part of Calamares - === - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * */ /* @@ -37,29 +26,31 @@ #include static const char usage[] = "Usage: txload [ ...]\n" - "\n" - "Reads a .ts source file and zero or more .ts \n" - "files, and does a comparison between the translations. Source (English)\n" - "strings that are untranslated are flagged in each of the translation\n" - "files, while differences in the translations are themselves also shown.\n" - "\n" - "Outputs to stdout a human-readable list of differences between the\n" - "translations.\n"; + "\n" + "Reads a .ts source file and zero or more .ts \n" + "files, and does a comparison between the translations. Source (English)\n" + "strings that are untranslated are flagged in each of the translation\n" + "files, while differences in the translations are themselves also shown.\n" + "\n" + "Outputs to stdout a human-readable list of differences between the\n" + "translations.\n"; -bool load_file(const char* filename, QDomDocument& doc) +bool +load_file( const char* filename, QDomDocument& doc ) { - QFile file(filename); + QFile file( filename ); QString err; int err_line, err_column; - if (!file.open(QIODevice::ReadOnly)) + if ( !file.open( QIODevice::ReadOnly ) ) { qDebug() << "Could not open" << filename; return false; } - QByteArray ba( file.read(1024 * 1024) ); + QByteArray ba( file.read( 1024 * 1024 ) ); qDebug() << "Read" << ba.length() << "bytes from" << filename; - if (!doc.setContent(ba, &err, &err_line, &err_column)) { + if ( !doc.setContent( ba, &err, &err_line, &err_column ) ) + { qDebug() << "Could not read" << filename << ':' << err_line << ':' << err_column << ' ' << err; file.close(); return false; @@ -69,15 +60,20 @@ bool load_file(const char* filename, QDomDocument& doc) return true; } -QDomElement find_context(QDomDocument& doc, const QString& name) +QDomElement +find_context( QDomDocument& doc, const QString& name ) { QDomElement top = doc.documentElement(); QDomNode n = top.firstChild(); - while (!n.isNull()) { - if (n.isElement()) { + while ( !n.isNull() ) + { + if ( n.isElement() ) + { QDomElement e = n.toElement(); if ( ( e.tagName() == "context" ) && ( e.firstChildElement( "name" ).text() == name ) ) + { return e; + } } n = n.nextSibling(); } @@ -85,17 +81,22 @@ QDomElement find_context(QDomDocument& doc, const QString& name) return QDomElement(); } -QDomElement find_message(QDomElement& context, const QString& source) +QDomElement +find_message( QDomElement& context, const QString& source ) { QDomNode n = context.firstChild(); - while (!n.isNull()) { - if (n.isElement()) { + while ( !n.isNull() ) + { + if ( n.isElement() ) + { QDomElement e = n.toElement(); if ( e.tagName() == "message" ) { QString msource = e.firstChildElement( "source" ).text(); if ( msource == source ) + { return e; + } } } n = n.nextSibling(); @@ -103,11 +104,14 @@ QDomElement find_message(QDomElement& context, const QString& source) return QDomElement(); } -bool merge_into(QDomElement& origin, QDomElement& alternate) +bool +merge_into( QDomElement& origin, QDomElement& alternate ) { QDomNode n = alternate.firstChild(); - while (!n.isNull()) { - if (n.isElement()) { + while ( !n.isNull() ) + { + if ( n.isElement() ) + { QDomElement alternateMessage = n.toElement(); if ( alternateMessage.tagName() == "message" ) { @@ -130,7 +134,8 @@ bool merge_into(QDomElement& origin, QDomElement& alternate) } if ( !alternateTranslationText.isEmpty() && ( alternateTranslationText != originTranslationText ) ) { - qDebug() << "\n\n\nSource:" << alternateSourceText << "\nTL1:" << originTranslationText << "\nTL2:" << alternateTranslationText; + qDebug() << "\n\n\nSource:" << alternateSourceText << "\nTL1:" << originTranslationText + << "\nTL2:" << alternateTranslationText; } } } @@ -141,12 +146,14 @@ bool merge_into(QDomElement& origin, QDomElement& alternate) } - -bool merge_into(QDomDocument& originDocument, QDomElement& context) +bool +merge_into( QDomDocument& originDocument, QDomElement& context ) { QDomElement name = context.firstChildElement( "name" ); if ( name.isNull() ) + { return false; + } QString contextname = name.text(); QDomElement originContext = find_context( originDocument, contextname ); @@ -159,16 +166,21 @@ bool merge_into(QDomDocument& originDocument, QDomElement& context) return merge_into( originContext, context ); } -bool merge_into(QDomDocument& originDocument, QDomDocument& alternateDocument) +bool +merge_into( QDomDocument& originDocument, QDomDocument& alternateDocument ) { QDomElement top = alternateDocument.documentElement(); QDomNode n = top.firstChild(); - while (!n.isNull()) { - if (n.isElement()) { + while ( !n.isNull() ) + { + if ( n.isElement() ) + { QDomElement e = n.toElement(); if ( e.tagName() == "context" ) if ( !merge_into( originDocument, e ) ) + { return false; + } } n = n.nextSibling(); } @@ -176,39 +188,46 @@ bool merge_into(QDomDocument& originDocument, QDomDocument& alternateDocument) return true; } -int main(int argc, char** argv) +int +main( int argc, char** argv ) { - QCoreApplication a(argc, argv); + QCoreApplication a( argc, argv ); - if (argc < 2) + if ( argc < 2 ) { qWarning() << usage; return 1; } - QDomDocument originDocument("origin"); - if ( !load_file(argv[1], originDocument) ) - return 1; - - for (int i = 2; i < argc; ++i) + QDomDocument originDocument( "origin" ); + if ( !load_file( argv[ 1 ], originDocument ) ) { - QDomDocument alternateDocument("alternate"); - if ( !load_file(argv[i], alternateDocument) ) - return 1; - if ( !merge_into( originDocument, alternateDocument ) ) - return 1; + return 1; } - QString outfilename( argv[1] ); + for ( int i = 2; i < argc; ++i ) + { + QDomDocument alternateDocument( "alternate" ); + if ( !load_file( argv[ i ], alternateDocument ) ) + { + return 1; + } + if ( !merge_into( originDocument, alternateDocument ) ) + { + return 1; + } + } + + QString outfilename( argv[ 1 ] ); outfilename.append( ".new" ); - QFile outfile(outfilename); - if (!outfile.open(QIODevice::WriteOnly)) + QFile outfile( outfilename ); + if ( !outfile.open( QIODevice::WriteOnly ) ) { qDebug() << "Could not open" << outfilename; return 1; } - outfile.write( originDocument.toString(4).toUtf8() ); + outfile.write( originDocument.toString( 4 ).toUtf8() ); outfile.close(); return 0; diff --git a/lang/tz_en.ts b/lang/tz_en.ts index ba9b5a350..cbd037f32 100644 --- a/lang/tz_en.ts +++ b/lang/tz_en.ts @@ -1,4 +1,7 @@ + diff --git a/lang/tz_nl.ts b/lang/tz_nl.ts index e1eb8d1e5..ed501dd67 100644 --- a/lang/tz_nl.ts +++ b/lang/tz_nl.ts @@ -1,4 +1,7 @@ + diff --git a/lang/tz_sv.ts b/lang/tz_sv.ts index 98d9b83c3..c871dbac5 100644 --- a/lang/tz_sv.ts +++ b/lang/tz_sv.ts @@ -1,4 +1,8 @@ - + + + QObject diff --git a/lang/tz_tg.ts b/lang/tz_tg.ts new file mode 100644 index 000000000..77e075619 --- /dev/null +++ b/lang/tz_tg.ts @@ -0,0 +1,2620 @@ + + + + + + QObject + + + Africa + tz_regions + Африка + + + + America + tz_regions + Америка + + + + Antarctica + tz_regions + Антарктида + + + + Arctic + tz_regions + Арктика + + + + Asia + tz_regions + Осиё + + + + Atlantic + tz_regions + Уқёнуси Атлантикӣ + + + + Australia + tz_regions + Австралия + + + + Europe + tz_regions + Аврупо + + + + Indian + tz_regions + Ҳиндӣ + + + + Pacific + tz_regions + Уқёнуси Ором + + + + Abidjan + tz_names + Абиҷон + + + + Accra + tz_names + Аккра + + + + Adak + tz_names + Адак + + + + Addis Ababa + tz_names + Аддис-Абаба + + + + Adelaide + tz_names + Аделаида + + + + Aden + tz_names + Аден + + + + Algiers + tz_names + Алҷазоир + + + + Almaty + tz_names + Алмаато + + + + Amman + tz_names + Уммон + + + + Amsterdam + tz_names + Амстердам + + + + Anadyr + tz_names + Анадир + + + + Anchorage + tz_names + Анкориҷ + + + + Andorra + tz_names + Андорра + + + + Anguilla + tz_names + Ангвелла + + + + Antananarivo + tz_names + Антананариву + + + + Antigua + tz_names + Антигуа + + + + Apia + tz_names + Апиа + + + + Aqtau + tz_names + Актау + + + + Aqtobe + tz_names + Актобе + + + + Araguaina + tz_names + Арагуаина + + + + Argentina/Buenos Aires + tz_names + Аргентина/Буэнос-Айрес + + + + Argentina/Catamarca + tz_names + Аргентина/Катамарка + + + + Argentina/Cordoba + tz_names + Аргентина/Кордоба + + + + Argentina/Jujuy + tz_names + Аргентина/Ҷуҷуй + + + + Argentina/La Rioja + tz_names + Аргентина/Ла Риоха + + + + Argentina/Mendoza + tz_names + Аргентина/Мендоза + + + + Argentina/Rio Gallegos + tz_names + Аргентина/Рио Галегос + + + + Argentina/Salta + tz_names + Аргентина/Салта + + + + Argentina/San Juan + tz_names + Аргентина/Сан Ҷуан + + + + Argentina/San Luis + tz_names + Аргентина/Сан Луис + + + + Argentina/Tucuman + tz_names + Аргентина/Тукуман + + + + Argentina/Ushuaia + tz_names + Аргентина/Ушуайя + + + + Aruba + tz_names + Аруба + + + + Ashgabat + tz_names + Ашқобод + + + + Asmara + tz_names + Асмэра + + + + Astrakhan + tz_names + Астрахан + + + + Asuncion + tz_names + Асунсон + + + + Athens + tz_names + Афина + + + + Atikokan + tz_names + Атикокак + + + + Atyrau + tz_names + Атирау + + + + Auckland + tz_names + Окленд + + + + Azores + tz_names + Азор + + + + Baghdad + tz_names + Бағдод + + + + Bahia + tz_names + Баҳя + + + + Bahia Banderas + tz_names + Баҳя Бандерас + + + + Bahrain + tz_names + Баҳрайн + + + + Baku + tz_names + Боку + + + + Bamako + tz_names + Бомако + + + + Bangkok + tz_names + Бангкок + + + + Bangui + tz_names + Банги + + + + Banjul + tz_names + Банжул + + + + Barbados + tz_names + Барбадос + + + + Barnaul + tz_names + Барнаул + + + + Beirut + tz_names + Бейрут + + + + Belem + tz_names + Белем + + + + Belgrade + tz_names + Белград + + + + Belize + tz_names + Белиз + + + + Berlin + tz_names + Берлин + + + + Bermuda + tz_names + Бермуда + + + + Bishkek + tz_names + Бишкек + + + + Bissau + tz_names + Бисау + + + + Blanc-Sablon + tz_names + Бланк-Саблон + + + + Blantyre + tz_names + Блантайр + + + + Boa Vista + tz_names + Боа-Виста + + + + Bogota + tz_names + Богота + + + + Boise + tz_names + Бойсе + + + + Bougainville + tz_names + Бугенвил + + + + Bratislava + tz_names + Братислава + + + + Brazzaville + tz_names + Браззавил + + + + Brisbane + tz_names + Брисбен + + + + Broken Hill + tz_names + Брокен-Хилл + + + + Brunei + tz_names + Бруней + + + + Brussels + tz_names + Брюссел + + + + Bucharest + tz_names + Бухарест + + + + Budapest + tz_names + Будапешт + + + + Bujumbura + tz_names + Буҷумбура + + + + Busingen + tz_names + Бусинген + + + + Cairo + tz_names + Қоҳира + + + + Cambridge Bay + tz_names + Кеймбриҷ-Бей + + + + Campo Grande + tz_names + Кампо-Граде + + + + Canary + tz_names + Канарӣ + + + + Cancun + tz_names + Канкун + + + + Cape Verde + tz_names + Кабо-Верде + + + + Caracas + tz_names + Каракас + + + + Casablanca + tz_names + Касабланка + + + + Casey + tz_names + Кейси + + + + Cayenne + tz_names + Кайенна + + + + Cayman + tz_names + Кайман + + + + Ceuta + tz_names + Сеута + + + + Chagos + tz_names + Чагос + + + + Chatham + tz_names + Чатам + + + + Chicago + tz_names + Чикаго + + + + Chihuahua + tz_names + Чихуахуа + + + + Chisinau + tz_names + Кишинев + + + + Chita + tz_names + Чита + + + + Choibalsan + tz_names + Чойбалсан + + + + Christmas + tz_names + Крисмас + + + + Chuuk + tz_names + Чуук + + + + Cocos + tz_names + Кокос + + + + Colombo + tz_names + Коломбо + + + + Comoro + tz_names + Коморо + + + + Conakry + tz_names + Конакри + + + + Copenhagen + tz_names + Копенгаген + + + + Costa Rica + tz_names + Коста-Рика + + + + Creston + tz_names + Крестон + + + + Cuiaba + tz_names + Куяба + + + + Curacao + tz_names + Кюрасао + + + + Currie + tz_names + Керри + + + + Dakar + tz_names + Дакар + + + + Damascus + tz_names + Димишқ + + + + Danmarkshavn + tz_names + Данмарксҳавн + + + + Dar es Salaam + tz_names + Даруссалам + + + + Darwin + tz_names + Дарвин + + + + Davis + tz_names + Дейвис + + + + Dawson + tz_names + Доусон + + + + Dawson Creek + tz_names + Доусон-Крик + + + + Denver + tz_names + Денвер + + + + Detroit + tz_names + Детройт + + + + Dhaka + tz_names + Дакка + + + + Dili + tz_names + Дили + + + + Djibouti + tz_names + Ҷибути + + + + Dominica + tz_names + Доминика + + + + Douala + tz_names + Доуала + + + + Dubai + tz_names + Дубай + + + + Dublin + tz_names + Дублин + + + + DumontDUrville + tz_names + Дюмон д’Юрвил + + + + Dushanbe + tz_names + Душанбе + + + + Easter + tz_names + Писҳо + + + + Edmonton + tz_names + Эдмонтон + + + + Efate + tz_names + Эфате + + + + Eirunepe + tz_names + Эйрунепе + + + + El Aaiun + tz_names + Эл-Аюн + + + + El Salvador + tz_names + Ал-Салвадор + + + + Enderbury + tz_names + Эндербери + + + + Eucla + tz_names + Юкла + + + + Fakaofo + tz_names + Факаофо + + + + Famagusta + tz_names + Фамагуста + + + + Faroe + tz_names + Фарер + + + + Fiji + tz_names + Фиҷи + + + + Fort Nelson + tz_names + Форт Нелсон + + + + Fortaleza + tz_names + Форталеза + + + + Freetown + tz_names + Фритаун + + + + Funafuti + tz_names + Фунафути + + + + Gaborone + tz_names + Габороне + + + + Galapagos + tz_names + Галапагос + + + + Gambier + tz_names + Гамбир + + + + Gaza + tz_names + Газа + + + + Gibraltar + tz_names + Гибралтар + + + + Glace Bay + tz_names + Глас Бэй + + + + Godthab + tz_names + Готхоб + + + + Goose Bay + tz_names + Гус-Бэй + + + + Grand Turk + tz_names + Гранд Турк + + + + Grenada + tz_names + Гренада + + + + Guadalcanal + tz_names + Гуадалканал + + + + Guadeloupe + tz_names + Гваделупа + + + + Guam + tz_names + Гуам + + + + Guatemala + tz_names + Гватемала + + + + Guayaquil + tz_names + Гуаякил + + + + Guernsey + tz_names + Гернси + + + + Guyana + tz_names + Гайана + + + + Halifax + tz_names + Галифакс + + + + Harare + tz_names + Хараре + + + + Havana + tz_names + Гавана + + + + Hebron + tz_names + Ҳеврон + + + + Helsinki + tz_names + Ҳелсинки + + + + Hermosillo + tz_names + Ҳермосилло + + + + Ho Chi Minh + tz_names + Ҳошимин + + + + Hobart + tz_names + Ҳобарт + + + + Hong Kong + tz_names + Ҳонгконг + + + + Honolulu + tz_names + Гонолулу + + + + Hovd + tz_names + Ҳовд + + + + Indiana/Indianapolis + tz_names + Индиана/Индианаполис + + + + Indiana/Knox + tz_names + Индиана/Кнокс + + + + Indiana/Marengo + tz_names + Индиана/Маренго + + + + Indiana/Petersburg + tz_names + Индиана/Питерсберг + + + + Indiana/Tell City + tz_names + Индиана/Телл Сити + + + + Indiana/Vevay + tz_names + Индиана/Вивэй + + + + Indiana/Vincennes + tz_names + Индиана/Винсенс + + + + Indiana/Winamac + tz_names + Индиана/Винамак + + + + Inuvik + tz_names + Инувик + + + + Iqaluit + tz_names + Икалуит + + + + Irkutsk + tz_names + Иркутск + + + + Isle of Man + tz_names + Ҷазираи Мэн + + + + Istanbul + tz_names + Стамбул + + + + Jakarta + tz_names + Ҷакарта + + + + Jamaica + tz_names + Ҷомайка + + + + Jayapura + tz_names + Ҷайапура + + + + Jersey + tz_names + Ҷерси + + + + Jerusalem + tz_names + Байтулмуқаддас + + + + Johannesburg + tz_names + Йоханнесбург + + + + Juba + tz_names + Ҷуба + + + + Juneau + tz_names + Ҷуно + + + + Kabul + tz_names + Кобул + + + + Kaliningrad + tz_names + Калининград + + + + Kamchatka + tz_names + Камчатка + + + + Kampala + tz_names + Кампала + + + + Karachi + tz_names + Қарочӣ + + + + Kathmandu + tz_names + Катманду + + + + Kentucky/Louisville + tz_names + Кентуки/Луисвилл + + + + Kentucky/Monticello + tz_names + Кентуки/Монтиселло + + + + Kerguelen + tz_names + Кергелен + + + + Khandyga + tz_names + Хандига + + + + Khartoum + tz_names + Хартум + + + + Kiev + tz_names + Киев + + + + Kigali + tz_names + Кигали + + + + Kinshasa + tz_names + Киншаса + + + + Kiritimati + tz_names + Киритимати + + + + Kirov + tz_names + Киров + + + + Kolkata + tz_names + Калкута + + + + Kosrae + tz_names + Косра + + + + Kralendijk + tz_names + Кралендейк + + + + Krasnoyarsk + tz_names + Красноярск + + + + Kuala Lumpur + tz_names + Куала-Лумпур + + + + Kuching + tz_names + Кучинг + + + + Kuwait + tz_names + Қувайт + + + + Kwajalein + tz_names + Кваҷалейн + + + + La Paz + tz_names + Ла-Пас + + + + Lagos + tz_names + Лагос + + + + Libreville + tz_names + Либревил + + + + Lima + tz_names + Лима + + + + Lindeman + tz_names + Линдерман + + + + Lisbon + tz_names + Лиссабон + + + + Ljubljana + tz_names + Любляна + + + + Lome + tz_names + Ломе + + + + London + tz_names + Лондон + + + + Longyearbyen + tz_names + Лонгйир + + + + Lord Howe + tz_names + Лорд-Хау + + + + Los Angeles + tz_names + Лос-Анҷелес + + + + Lower Princes + tz_names + Лоуэр-Принс + + + + Luanda + tz_names + Луанда + + + + Lubumbashi + tz_names + Лубумбаши + + + + Lusaka + tz_names + Лусака + + + + Luxembourg + tz_names + Люксембург + + + + Macau + tz_names + Макау + + + + Maceio + tz_names + Масейо + + + + Macquarie + tz_names + Макгвайр + + + + Madeira + tz_names + Мадейра + + + + Madrid + tz_names + Мадрид + + + + Magadan + tz_names + Магадан + + + + Mahe + tz_names + Маэ + + + + Majuro + tz_names + Маҷуро + + + + Makassar + tz_names + Макассар + + + + Malabo + tz_names + Малабо + + + + Maldives + tz_names + Малдив + + + + Malta + tz_names + Малта + + + + Managua + tz_names + Манагуа + + + + Manaus + tz_names + Манаус + + + + Manila + tz_names + Манила + + + + Maputo + tz_names + Мапуту + + + + Mariehamn + tz_names + Мариехамн + + + + Marigot + tz_names + Маригот + + + + Marquesas + tz_names + Маркизас + + + + Martinique + tz_names + Мартиника + + + + Maseru + tz_names + Масеру + + + + Matamoros + tz_names + Матаморос + + + + Mauritius + tz_names + Маврикий + + + + Mawson + tz_names + Маусон + + + + Mayotte + tz_names + Майотта + + + + Mazatlan + tz_names + Масатлан + + + + Mbabane + tz_names + Мбабане + + + + McMurdo + tz_names + Мак-Мердо + + + + Melbourne + tz_names + Мелбурн + + + + Menominee + tz_names + Меномини + + + + Merida + tz_names + Мерида + + + + Metlakatla + tz_names + Метлакатла + + + + Mexico City + tz_names + Мехико + + + + Midway + tz_names + Мидуэй + + + + Minsk + tz_names + Минск + + + + Miquelon + tz_names + Микелон + + + + Mogadishu + tz_names + Могадишо + + + + Monaco + tz_names + Монако + + + + Moncton + tz_names + Монктон + + + + Monrovia + tz_names + Монровия + + + + Monterrey + tz_names + Монтеррей + + + + Montevideo + tz_names + Монтевидео + + + + Montserrat + tz_names + Монтсеррат + + + + Moscow + tz_names + Москав + + + + Muscat + tz_names + Масқат + + + + Nairobi + tz_names + Найроби + + + + Nassau + tz_names + Нассау + + + + Nauru + tz_names + Новурӯ + + + + Ndjamena + tz_names + Нҷамена + + + + New York + tz_names + Штати Ню-Йорк + + + + Niamey + tz_names + Ниамей + + + + Nicosia + tz_names + Никосия + + + + Nipigon + tz_names + Нипигон + + + + Niue + tz_names + Нива + + + + Nome + tz_names + Ном + + + + Norfolk + tz_names + Норфолк + + + + Noronha + tz_names + Нороня + + + + North Dakota/Beulah + tz_names + Дакотаи Шимолӣ/Бойла + + + + North Dakota/Center + tz_names + Дакотаи Шимолӣ/Марказ + + + + North Dakota/New Salem + tz_names + Дакотаи Шимолӣ/Ню Сейлем + + + + Nouakchott + tz_names + Нуакшот + + + + Noumea + tz_names + Нумеа + + + + Novokuznetsk + tz_names + Новокузнетск + + + + Novosibirsk + tz_names + Новосибирск + + + + Ojinaga + tz_names + Оҷинага + + + + Omsk + tz_names + Омск + + + + Oral + tz_names + Орал + + + + Oslo + tz_names + Осло + + + + Ouagadougou + tz_names + Уагадугу + + + + Pago Pago + tz_names + Паго-Паго + + + + Palau + tz_names + Палаув + + + + Palmer + tz_names + Палмер + + + + Panama + tz_names + Панама + + + + Pangnirtung + tz_names + Пангниртунг + + + + Paramaribo + tz_names + Парамарибо + + + + Paris + tz_names + Париж + + + + Perth + tz_names + Перт + + + + Phnom Penh + tz_names + Пномпен + + + + Phoenix + tz_names + Феникс + + + + Pitcairn + tz_names + Питкоирн + + + + Podgorica + tz_names + Подгоритса + + + + Pohnpei + tz_names + Понпеи + + + + Pontianak + tz_names + Понтианак + + + + Port Moresby + tz_names + Порт-Морсби + + + + Port of Spain + tz_names + Порт-оф-Спейн + + + + Port-au-Prince + tz_names + Порт-о-Пренс + + + + Porto Velho + tz_names + Порту-Велю + + + + Porto-Novo + tz_names + Порто-Ново + + + + Prague + tz_names + Прага + + + + Puerto Rico + tz_names + Пуэрто-Рико + + + + Punta Arenas + tz_names + Пунта Аренас + + + + Pyongyang + tz_names + Пхенян + + + + Qatar + tz_names + Қатар + + + + Qostanay + tz_names + Костанай + + + + Qyzylorda + tz_names + Қизилорда + + + + Rainy River + tz_names + Рейни Ривер + + + + Rankin Inlet + tz_names + Ранкин-Инлет + + + + Rarotonga + tz_names + Раротонга + + + + Recife + tz_names + Ресиф + + + + Regina + tz_names + Регина + + + + Resolute + tz_names + Резолют + + + + Reunion + tz_names + Реюнон + + + + Reykjavik + tz_names + Рейкявик + + + + Riga + tz_names + Рига + + + + Rio Branco + tz_names + Риу-Бранку + + + + Riyadh + tz_names + Арриёз + + + + Rome + tz_names + Рим + + + + Rothera + tz_names + Ротера + + + + Saipan + tz_names + Сайпан + + + + Sakhalin + tz_names + Сахалин + + + + Samara + tz_names + Самара + + + + Samarkand + tz_names + Самарқанд + + + + San Marino + tz_names + Сан-Марино + + + + Santarem + tz_names + Сантарем + + + + Santiago + tz_names + Сантяго + + + + Santo Domingo + tz_names + Санто-Доминго + + + + Sao Paulo + tz_names + Сан-Паулу + + + + Sao Tome + tz_names + Сан-Томе + + + + Sarajevo + tz_names + Сараево + + + + Saratov + tz_names + Саратов + + + + Scoresbysund + tz_names + Скорсбисунд + + + + Seoul + tz_names + Сеул + + + + Shanghai + tz_names + Шанхай + + + + Simferopol + tz_names + Симферопол + + + + Singapore + tz_names + Сингапур + + + + Sitka + tz_names + Ситка + + + + Skopje + tz_names + Скопе + + + + Sofia + tz_names + София + + + + South Georgia + tz_names + Ҷорҷияи Ҷанубӣ + + + + Srednekolymsk + tz_names + Среднеколимск + + + + St Barthelemy + tz_names + Сент-Бартелми + + + + St Helena + tz_names + Сент-Ҳелена + + + + St Johns + tz_names + Сент-Ҷонс + + + + St Kitts + tz_names + Сент-Китс + + + + St Lucia + tz_names + Сент-Люсиа + + + + St Thomas + tz_names + Сент-Томас + + + + St Vincent + tz_names + Сент-Винсент + + + + Stanley + tz_names + Стэнли + + + + Stockholm + tz_names + Стокголм + + + + Swift Current + tz_names + Свифт Каррент + + + + Sydney + tz_names + Сидней + + + + Syowa + tz_names + Сева + + + + Tahiti + tz_names + Таити + + + + Taipei + tz_names + Тайбэй + + + + Tallinn + tz_names + Таллин + + + + Tarawa + tz_names + Тарава + + + + Tashkent + tz_names + Тошкент + + + + Tbilisi + tz_names + Тбилиси + + + + Tegucigalpa + tz_names + Тегусигалпа + + + + Tehran + tz_names + Теҳрон + + + + Thimphu + tz_names + Тхимпху + + + + Thule + tz_names + Фула + + + + Thunder Bay + tz_names + Тандер-Бей + + + + Tijuana + tz_names + Тихуана + + + + Tirane + tz_names + Тирана + + + + Tokyo + tz_names + Токио + + + + Tomsk + tz_names + Томск + + + + Tongatapu + tz_names + Тонгатапу + + + + Toronto + tz_names + Торонто + + + + Tortola + tz_names + Тортола + + + + Tripoli + tz_names + Триполи + + + + Troll + tz_names + Тролл + + + + Tunis + tz_names + Тунис + + + + Ulaanbaatar + tz_names + Улон-Ботур + + + + Ulyanovsk + tz_names + Уляновск + + + + Urumqi + tz_names + Урумчи + + + + Ust-Nera + tz_names + Уст-Нера + + + + Uzhgorod + tz_names + Ужгород + + + + Vaduz + tz_names + Вадуз + + + + Vancouver + tz_names + Ванкувер + + + + Vatican + tz_names + Ватикан + + + + Vienna + tz_names + Вена + + + + Vientiane + tz_names + Вентян + + + + Vilnius + tz_names + Вилнюс + + + + Vladivostok + tz_names + Владивосток + + + + Volgograd + tz_names + Волгоград + + + + Vostok + tz_names + Восток + + + + Wake + tz_names + Вэйк + + + + Wallis + tz_names + Уоллис + + + + Warsaw + tz_names + Варшава + + + + Whitehorse + tz_names + Уайтхорс + + + + Windhoek + tz_names + Виндхук + + + + Winnipeg + tz_names + Виннипег + + + + Yakutat + tz_names + Якутат + + + + Yakutsk + tz_names + Якутск + + + + Yangon + tz_names + Янгон + + + + Yekaterinburg + tz_names + Екатеринбург + + + + Yellowknife + tz_names + Йеллоунайф + + + + Yerevan + tz_names + Ереван + + + + Zagreb + tz_names + Загреб + + + + Zaporozhye + tz_names + Запорожие + + + + Zurich + tz_names + Тсурих + + + diff --git a/lang/tz_uk.ts b/lang/tz_uk.ts index 6059079ca..ced3e5b80 100644 --- a/lang/tz_uk.ts +++ b/lang/tz_uk.ts @@ -1,4 +1,7 @@ + diff --git a/settings.conf b/settings.conf index 469e8efa2..84dec9f4d 100644 --- a/settings.conf +++ b/settings.conf @@ -1,5 +1,14 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration file for Calamares -# Syntax is YAML 1.2 +# +# This is the top-level configuration file for Calamares. +# It specifies what modules will be used, as well as some +# overall characteristics -- is this a setup program, or +# an installer. More specific configuration is devolved +# to the branding file (for the UI) and the individual +# module configuration files (for functionality). --- # Modules can be job modules (with different interfaces) and QtWidgets view # modules. They could all be placed in a number of different paths. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1445b18f3..5ce5349fb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,8 +1,14 @@ -include( CalamaresAddPlugin ) -include( CalamaresAddModuleSubdirectory ) -include( CalamaresAddLibrary ) +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# include( CalamaresAddBrandingSubdirectory ) +include( CalamaresAddLibrary ) +include( CalamaresAddModuleSubdirectory ) +include( CalamaresAddPlugin ) include( CalamaresAddTest ) +include( CalamaresAddTranslations ) # library add_subdirectory( libcalamares ) @@ -10,7 +16,7 @@ add_subdirectory( libcalamares ) add_subdirectory( libcalamaresui ) # all things qml -add_subdirectory( qml ) +add_subdirectory( qml/calamares ) # application add_subdirectory( calamares ) diff --git a/src/branding/CMakeLists.txt b/src/branding/CMakeLists.txt index 981da1468..09d60118e 100644 --- a/src/branding/CMakeLists.txt +++ b/src/branding/CMakeLists.txt @@ -1 +1,10 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + +# Add branding components. Since there is only one, called "default", +# add that one. For examples of other branding components, see +# the calamares-extensions repository. calamares_add_branding_subdirectory( default ) diff --git a/src/branding/README.md b/src/branding/README.md index 099163836..234b2a9b1 100644 --- a/src/branding/README.md +++ b/src/branding/README.md @@ -1,5 +1,10 @@ # Branding directory + + Branding components can go here, or they can be installed separately. A branding component is a subdirectory with a `branding.desc` descriptor @@ -66,7 +71,7 @@ The setting *slideshowAPI* in `branding.desc` indicates which one to use for a given branding slideshow. Which API to use is really a function of the QML. Expect the version 1 API to be deprecated in the course of Calamares 3.3. -In Calamares 3.2.13 support for activation notification to the QML +In Calamares 3.2.13 support for activation notification to the QML parts is improved: - If the root object has a property *activatedInCalamares* (the examples do), then that property is set to *true* when the slideshow becomes visible diff --git a/src/branding/default/banner.png.license b/src/branding/default/banner.png.license new file mode 100644 index 000000000..38aa3617e --- /dev/null +++ b/src/branding/default/banner.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2020 Adriaan de Groot +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/branding/default/branding.desc b/src/branding/default/branding.desc index fc0a16f7e..c3ef2df72 100644 --- a/src/branding/default/branding.desc +++ b/src/branding/default/branding.desc @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Product branding information. This influences some global # user-visible aspects of Calamares, such as the product # name, window behavior, and the slideshow during installation. diff --git a/src/branding/default/languages.png.license b/src/branding/default/languages.png.license new file mode 100644 index 000000000..ea8264571 --- /dev/null +++ b/src/branding/default/languages.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2015 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/branding/default/show.qml b/src/branding/default/show.qml index dcb0f9257..f4c50e629 100644 --- a/src/branding/default/show.qml +++ b/src/branding/default/show.qml @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ import QtQuick 2.0; @@ -78,7 +69,7 @@ Presentation console.log("QML Component (default slideshow) activated"); presentation.currentSlide = 0; } - + function onLeave() { console.log("QML Component (default slideshow) deactivated"); } diff --git a/src/branding/default/squid.png.license b/src/branding/default/squid.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/src/branding/default/squid.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/branding/default/stylesheet.qss b/src/branding/default/stylesheet.qss index 72dd91ba4..5c3673847 100644 --- a/src/branding/default/stylesheet.qss +++ b/src/branding/default/stylesheet.qss @@ -1,5 +1,9 @@ /* + * SPDX-FileCopyrightText: no + * SPDX-License-Identifier: CC0-1.0 + */ +/* A branding component can ship a stylesheet (like this one) which is applied to parts of the Calamares user-interface. In principle, all parts can be styled through CSS. diff --git a/src/calamares/CMakeLists.txt b/src/calamares/CMakeLists.txt index 5480dd1f8..ff7c90bcc 100644 --- a/src/calamares/CMakeLists.txt +++ b/src/calamares/CMakeLists.txt @@ -1,3 +1,9 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + set( calamaresSources main.cpp CalamaresApplication.cpp @@ -28,10 +34,44 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) -# Translations -include( CalamaresAddTranslations ) -add_calamares_translations( ${CALAMARES_TRANSLATION_LANGUAGES} ) +### TRANSLATIONS +# +# +set( TS_FILES "" ) +set( calamares_i18n_qrc_content "" ) +# calamares and qt language files +foreach( lang ${CALAMARES_LANGUAGES} ) + foreach( tlsource "calamares_${lang}" "tz_${lang}" ) + if( EXISTS "${CMAKE_SOURCE_DIR}/lang/${tlsource}.ts" ) + set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}${tlsource}.qm\n" ) + list( APPEND TS_FILES "${CMAKE_SOURCE_DIR}/lang/${tlsource}.ts" ) + endif() + endforeach() +endforeach() + +set( trans_file calamares_i18n ) +set( trans_infile ${CMAKE_CURRENT_BINARY_DIR}/${trans_file}.qrc ) +set( trans_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${trans_file}.cxx ) + +configure_file( ${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in ${trans_infile} @ONLY ) + +qt5_add_translation(QM_FILES ${TS_FILES}) + +# Run the resource compiler (rcc_options should already be set) +add_custom_command( + OUTPUT ${trans_outfile} + COMMAND "${Qt5Core_RCC_EXECUTABLE}" + ARGS ${rcc_options} --format-version 1 -name ${trans_file} -o ${trans_outfile} ${trans_infile} + MAIN_DEPENDENCY ${trans_infile} + DEPENDS ${QM_FILES} +) + +### EXECUTABLE +# +# "calamares_bin" is the main application, not to be confused with +# the target "calamares" which is the non-GUI library part. +# add_executable( calamares_bin ${calamaresSources} calamares.qrc ${trans_outfile} ) target_include_directories( calamares_bin PRIVATE ${CMAKE_SOURCE_DIR} ) set_target_properties(calamares_bin @@ -74,6 +114,9 @@ install( FILES ${CMAKE_SOURCE_DIR}/data/images/squid.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps ) +### TESTS +# +# if( BUILD_TESTING ) # Don't install, these are just for enable_testing add_executable( loadmodule testmain.cpp ) diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index d337f774c..164b3ed5c 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CalamaresApplication.h" @@ -76,7 +67,8 @@ CalamaresApplication::init() { Logger::setupLogfile(); cDebug() << "Calamares version:" << CALAMARES_VERSION; - cDebug() << Logger::SubEntry << " languages:" << QString( CALAMARES_TRANSLATION_LANGUAGES ).replace( ";", ", " ); + cDebug() << Logger::SubEntry + << " languages:" << QString( CALAMARES_TRANSLATION_LANGUAGES ).replace( ";", ", " ); if ( !Calamares::Settings::instance() ) { diff --git a/src/calamares/CalamaresApplication.h b/src/calamares/CalamaresApplication.h index f42c21b56..e7dea4c61 100644 --- a/src/calamares/CalamaresApplication.h +++ b/src/calamares/CalamaresApplication.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018-2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARESAPPLICATION_H diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index 28b9df626..0960da10a 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot - * Copyright 2018, Raul Rodrigo Segura (raurodse) - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Raul Rodrigo Segura (raurodse) + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CalamaresWindow.h" diff --git a/src/calamares/CalamaresWindow.h b/src/calamares/CalamaresWindow.h index e6c27fd3f..b6e63aa6b 100644 --- a/src/calamares/CalamaresWindow.h +++ b/src/calamares/CalamaresWindow.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARESWINDOW_H @@ -37,7 +28,7 @@ class CalamaresWindow : public QWidget Q_OBJECT public: CalamaresWindow( QWidget* parent = nullptr ); - virtual ~CalamaresWindow() override { } + virtual ~CalamaresWindow() override {} public slots: /** diff --git a/src/calamares/DebugWindow.cpp b/src/calamares/DebugWindow.cpp index 9e2bdc501..4a68d4ae2 100644 --- a/src/calamares/DebugWindow.cpp +++ b/src/calamares/DebugWindow.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015-2016, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "DebugWindow.h" @@ -102,14 +93,8 @@ DebugWindow::DebugWindow() // JobQueue page m_ui->jobQueueText->setReadOnly( true ); - connect( JobQueue::instance(), &JobQueue::queueChanged, this, [this]( const JobList& jobs ) { - QStringList text; - for ( const auto& job : jobs ) - { - text.append( job->prettyName() ); - } - - m_ui->jobQueueText->setText( text.join( '\n' ) ); + connect( JobQueue::instance(), &JobQueue::queueChanged, this, [this]( const QStringList& jobs ) { + m_ui->jobQueueText->setText( jobs.join( '\n' ) ); } ); // Modules page @@ -193,7 +178,8 @@ DebugWindow::DebugWindow() #endif ] { QString moduleName = m_ui->modulesListView->currentIndex().data().toString(); - Module* module = ModuleManager::instance()->moduleInstance( ModuleSystem::InstanceKey::fromString( moduleName ) ); + Module* module + = ModuleManager::instance()->moduleInstance( ModuleSystem::InstanceKey::fromString( moduleName ) ); if ( module ) { m_module = module->configurationMap(); diff --git a/src/calamares/DebugWindow.h b/src/calamares/DebugWindow.h index 764a141c2..a07487b4c 100644 --- a/src/calamares/DebugWindow.h +++ b/src/calamares/DebugWindow.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARES_DEBUGWINDOW_H diff --git a/src/calamares/DebugWindow.ui b/src/calamares/DebugWindow.ui index 63a6a840a..014d4837e 100644 --- a/src/calamares/DebugWindow.ui +++ b/src/calamares/DebugWindow.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + Calamares::DebugWindow @@ -52,7 +56,7 @@ - + Type: @@ -66,7 +70,7 @@ - + Interface: diff --git a/src/calamares/VariantModel.cpp b/src/calamares/VariantModel.cpp index 2d8313665..8b0378f03 100644 --- a/src/calamares/VariantModel.cpp +++ b/src/calamares/VariantModel.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "VariantModel.h" diff --git a/src/calamares/VariantModel.h b/src/calamares/VariantModel.h index bdf6da866..3b0b594b7 100644 --- a/src/calamares/VariantModel.h +++ b/src/calamares/VariantModel.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef VARIANTMODEL_H diff --git a/src/calamares/calamares-navigation.qml b/src/calamares/calamares-navigation.qml index 6b356218d..131926175 100644 --- a/src/calamares/calamares-navigation.qml +++ b/src/calamares/calamares-navigation.qml @@ -1,3 +1,13 @@ +/* Sample of QML navigation. + + SPDX-FileCopyrightText: 2020 Adriaan de Groot + SPDX-License-Identifier: GPL-3.0-or-later + + + The navigation panel is generally "horizontal" in layout, with + buttons for next and previous; this particular one copies + the layout and size of the widgets panel. +*/ import io.calamares.ui 1.0 import io.calamares.core 1.0 diff --git a/src/calamares/calamares-sidebar.qml b/src/calamares/calamares-sidebar.qml index 85d1d506d..c12dd6e34 100644 --- a/src/calamares/calamares-sidebar.qml +++ b/src/calamares/calamares-sidebar.qml @@ -1,3 +1,15 @@ +/* Sample of QML progress tree. + + SPDX-FileCopyrightText: 2020 Adriaan de Groot + SPDX-License-Identifier: GPL-3.0-or-later + + + The progress tree (actually a list) is generally "vertical" in layout, + with the steps going "down", but it could also be a more compact + horizontal layout with suitable branding settings. + + This example emulates the layout and size of the widgets progress tree. +*/ import io.calamares.ui 1.0 import io.calamares.core 1.0 diff --git a/src/calamares/calamares.qrc b/src/calamares/calamares.qrc index 17db2e08a..5733ea065 100644 --- a/src/calamares/calamares.qrc +++ b/src/calamares/calamares.qrc @@ -1,6 +1,10 @@ - - - calamares-sidebar.qml - calamares-navigation.qml - + + + + + calamares-sidebar.qml + calamares-navigation.qml + diff --git a/src/calamares/main.cpp b/src/calamares/main.cpp index 4ca089102..d60108215 100644 --- a/src/calamares/main.cpp +++ b/src/calamares/main.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ diff --git a/src/calamares/progresstree/ProgressTreeDelegate.cpp b/src/calamares/progresstree/ProgressTreeDelegate.cpp index 7b7101f5d..48b5b4328 100644 --- a/src/calamares/progresstree/ProgressTreeDelegate.cpp +++ b/src/calamares/progresstree/ProgressTreeDelegate.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ProgressTreeDelegate.h" diff --git a/src/calamares/progresstree/ProgressTreeDelegate.h b/src/calamares/progresstree/ProgressTreeDelegate.h index d36bd4d14..55dcf7ac4 100644 --- a/src/calamares/progresstree/ProgressTreeDelegate.h +++ b/src/calamares/progresstree/ProgressTreeDelegate.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PROGRESSTREEDELEGATE_H diff --git a/src/calamares/progresstree/ProgressTreeView.cpp b/src/calamares/progresstree/ProgressTreeView.cpp index 22b11bfc6..b953db64d 100644 --- a/src/calamares/progresstree/ProgressTreeView.cpp +++ b/src/calamares/progresstree/ProgressTreeView.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ProgressTreeView.h" diff --git a/src/calamares/progresstree/ProgressTreeView.h b/src/calamares/progresstree/ProgressTreeView.h index 4a1bf9f2d..98bbe10b4 100644 --- a/src/calamares/progresstree/ProgressTreeView.h +++ b/src/calamares/progresstree/ProgressTreeView.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PROGRESSTREEVIEW_H diff --git a/src/calamares/test_conf.cpp b/src/calamares/test_conf.cpp index 06247bfed..73b19aa26 100644 --- a/src/calamares/test_conf.cpp +++ b/src/calamares/test_conf.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /** @@ -23,26 +14,29 @@ #include "utils/Yaml.h" -#include #include +#include #include -#include #include +#include using std::cerr; static const char usage[] = "Usage: test_conf [-v] [-b] ...\n"; -int main(int argc, char** argv) +int +main( int argc, char** argv ) { bool verbose = false; bool bytes = false; int opt; - while ((opt = getopt(argc, argv, "vb")) != -1) { - switch (opt) { + while ( ( opt = getopt( argc, argv, "vb" ) ) != -1 ) + { + switch ( opt ) + { case 'v': verbose = true; break; @@ -61,7 +55,7 @@ int main(int argc, char** argv) return 1; } - const char* filename = argv[optind]; + const char* filename = argv[ optind ]; try { YAML::Node doc; @@ -69,10 +63,14 @@ int main(int argc, char** argv) { QFile f( filename ); if ( f.open( QFile::ReadOnly | QFile::Text ) ) + { doc = YAML::Load( f.readAll().constData() ); + } } else + { doc = YAML::LoadFile( filename ); + } if ( doc.IsNull() ) { @@ -95,12 +93,14 @@ int main(int argc, char** argv) { cerr << "Keys:\n"; for ( auto i = doc.begin(); i != doc.end(); ++i ) - cerr << i->first.as() << '\n'; + { + cerr << i->first.as< std::string >() << '\n'; + } } } catch ( YAML::Exception& e ) { - cerr << "WARNING:" << filename << '\n'; + cerr << "WARNING:" << filename << '\n'; cerr << "WARNING: YAML parser error " << e.what() << '\n'; return 1; } diff --git a/src/calamares/testmain.cpp b/src/calamares/testmain.cpp index d70ee70b5..c9d6f7195 100644 --- a/src/calamares/testmain.cpp +++ b/src/calamares/testmain.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /* @@ -201,7 +192,7 @@ ExecViewModule::ExecViewModule() // We don't have one, so build one -- this gives us "x@x". QVariantMap m; m.insert( "name", "x" ); - Calamares::Module::initFrom( Calamares::ModuleSystem::Descriptor::fromDescriptorData(m), "x" ); + Calamares::Module::initFrom( Calamares::ModuleSystem::Descriptor::fromDescriptorData( m ), "x" ); } ExecViewModule::~ExecViewModule() {} @@ -332,7 +323,8 @@ load_module( const ModuleConfig& moduleConfig ) cDebug() << "Module" << moduleName << "job-configuration:" << configFile; - Calamares::Module* module = Calamares::moduleFromDescriptor( Calamares::ModuleSystem::Descriptor::fromDescriptorData( descriptor ), name, configFile, moduleDirectory ); + Calamares::Module* module = Calamares::moduleFromDescriptor( + Calamares::ModuleSystem::Descriptor::fromDescriptorData( descriptor ), name, configFile, moduleDirectory ); return module; } diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index 284acd1d2..849896446 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -1,20 +1,7 @@ -# === This file is part of Calamares - === +# === This file is part of Calamares - === # # SPDX-FileCopyrightText: 2020 Adriaan de Groot -# SPDX-License-Identifier: GPL-3.0-or-later -# -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . +# SPDX-License-Identifier: BSD-2-Clause # # diff --git a/src/libcalamares/CalamaresConfig.h.in b/src/libcalamares/CalamaresConfig.h.in index c081b158f..3d551b8e8 100644 --- a/src/libcalamares/CalamaresConfig.h.in +++ b/src/libcalamares/CalamaresConfig.h.in @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ #ifndef CALAMARESCONFIG_H diff --git a/src/libcalamares/CalamaresVersion.h.in b/src/libcalamares/CalamaresVersion.h.in index 54a44888a..09ef9ae2c 100644 --- a/src/libcalamares/CalamaresVersion.h.in +++ b/src/libcalamares/CalamaresVersion.h.in @@ -1,3 +1,5 @@ +// SPDX-FileCopyrightText: no +// SPDX-License-Identifier: CC0-1.0 #ifndef CALAMARES_VERSION_H #define CALAMARES_VERSION_H diff --git a/src/libcalamares/CalamaresVersionX.h.in b/src/libcalamares/CalamaresVersionX.h.in index 75b124c11..be3a9ae21 100644 --- a/src/libcalamares/CalamaresVersionX.h.in +++ b/src/libcalamares/CalamaresVersionX.h.in @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: no +// SPDX-License-Identifier: CC0-1.0 +// // Same as CalamaresVersion.h, but with a full-git-extended VERSION // rather than the short (vM.m.p) semantic version. #ifndef CALAMARES_VERSION_H diff --git a/src/libcalamares/CppJob.cpp b/src/libcalamares/CppJob.cpp index a2647463a..45a321cc2 100644 --- a/src/libcalamares/CppJob.cpp +++ b/src/libcalamares/CppJob.cpp @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2016 Kevin Kofler - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/CppJob.h b/src/libcalamares/CppJob.h index ee093675a..7569debe9 100644 --- a/src/libcalamares/CppJob.h +++ b/src/libcalamares/CppJob.h @@ -1,24 +1,11 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2016 Kevin Kofler * SPDX-FileCopyrightText: 2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/DllMacro.h b/src/libcalamares/DllMacro.h index 5677e928b..662ace44d 100644 --- a/src/libcalamares/DllMacro.h +++ b/src/libcalamares/DllMacro.h @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/GlobalStorage.cpp b/src/libcalamares/GlobalStorage.cpp index 253a4d6ad..6cae46eeb 100644 --- a/src/libcalamares/GlobalStorage.cpp +++ b/src/libcalamares/GlobalStorage.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h index a12d78978..9d8e3849b 100644 --- a/src/libcalamares/GlobalStorage.h +++ b/src/libcalamares/GlobalStorage.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/Job.cpp b/src/libcalamares/Job.cpp index a7e67b5f6..902bb2b64 100644 --- a/src/libcalamares/Job.cpp +++ b/src/libcalamares/Job.cpp @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/Job.h b/src/libcalamares/Job.h index dd13f8608..ed349ab30 100644 --- a/src/libcalamares/Job.h +++ b/src/libcalamares/Job.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ #ifndef CALAMARES_JOB_H diff --git a/src/libcalamares/JobExample.cpp b/src/libcalamares/JobExample.cpp index ba085be6e..4852d3ae4 100644 --- a/src/libcalamares/JobExample.cpp +++ b/src/libcalamares/JobExample.cpp @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ #include "JobExample.h" diff --git a/src/libcalamares/JobExample.h b/src/libcalamares/JobExample.h index e0307f64a..5c527af6d 100644 --- a/src/libcalamares/JobExample.h +++ b/src/libcalamares/JobExample.h @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp index b39b43759..172d59714 100644 --- a/src/libcalamares/JobQueue.cpp +++ b/src/libcalamares/JobQueue.cpp @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ @@ -151,6 +138,24 @@ public: QMetaObject::invokeMethod( m_queue, "finish", Qt::QueuedConnection ); } + /** @brief The names of the queued (not running!) jobs. + */ + QStringList queuedJobs() const + { + QMutexLocker qlock( &m_enqueMutex ); + QStringList l; + l.reserve( m_queuedJobs->count() ); + for ( const auto& j : *m_queuedJobs ) + { + l << j.job->prettyName(); + } + return l; + } + +private: + /* This is called **only** from run(), while m_runMutex is + * already locked, so we can use the m_runningJobs member safely. + */ void emitProgress( qreal percentage ) const { percentage = qBound( 0.0, percentage, 1.0 ); @@ -172,10 +177,8 @@ public: m_queue, "progress", Qt::QueuedConnection, Q_ARG( qreal, progress ), Q_ARG( QString, message ) ); } - -private: - QMutex m_runMutex; - QMutex m_enqueMutex; + mutable QMutex m_runMutex; + mutable QMutex m_enqueMutex; std::unique_ptr< WeightedJobList > m_runningJobs = std::make_unique< WeightedJobList >(); std::unique_ptr< WeightedJobList > m_queuedJobs = std::make_unique< WeightedJobList >(); @@ -242,7 +245,7 @@ JobQueue::enqueue( int moduleWeight, const JobList& jobs ) { Q_ASSERT( !m_thread->isRunning() ); m_thread->enqueue( moduleWeight, jobs ); - emit queueChanged( jobs ); // FIXME: bogus + emit queueChanged( m_thread->queuedJobs() ); } void @@ -250,6 +253,7 @@ JobQueue::finish() { m_finished = true; emit finished(); + emit queueChanged( m_thread->queuedJobs() ); } GlobalStorage* diff --git a/src/libcalamares/JobQueue.h b/src/libcalamares/JobQueue.h index 31b5407ef..518217000 100644 --- a/src/libcalamares/JobQueue.h +++ b/src/libcalamares/JobQueue.h @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ @@ -50,20 +37,49 @@ public: * of the module. */ void enqueue( int moduleWeight, const JobList& jobs ); + /** @brief Starts all the jobs that are enqueued. + * + * After this, isRunning() returns @c true until + * finished() is emitted. + */ void start(); bool isRunning() const { return !m_finished; } -public slots: - void finish(); - signals: - void queueChanged( const JobList& jobs ); + /** @brief Report progress of the whole queue, with a status message + * + * The @p percent is a value between 0.0 and 1.0 (100%) of the + * overall queue progress (not of the current job), while + * @p prettyName is the status message from the job -- often + * just the name of the job, but some jobs include more information. + */ void progress( qreal percent, const QString& prettyName ); + /** @brief Indicate that the queue is empty, after calling start() + * + * Emitted when the queue empties. The queue may also emit + * failed(), if something went wrong, but finished() is always + * the last one. + */ void finished(); + /** @brief A job in the queue failed. + * + * Contains the (already-translated) text from the job describing + * the failure. + */ void failed( const QString& message, const QString& details ); + /** @brief Reports the names of jobs in the queue. + * + * When jobs are added via enqueue(), or when the queue otherwise + * changes, the **names** of the jobs are reported. This is + * primarily for debugging purposes. + */ + void queueChanged( const QStringList& jobNames ); + private: + void finish(); + static JobQueue* s_instance; JobThread* m_thread; diff --git a/src/libcalamares/ProcessJob.cpp b/src/libcalamares/ProcessJob.cpp index c6cb94359..f7404438a 100644 --- a/src/libcalamares/ProcessJob.cpp +++ b/src/libcalamares/ProcessJob.cpp @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/ProcessJob.h b/src/libcalamares/ProcessJob.h index 75ef6f6e3..126eab1f9 100644 --- a/src/libcalamares/ProcessJob.h +++ b/src/libcalamares/ProcessJob.h @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/PythonHelper.cpp b/src/libcalamares/PythonHelper.cpp index 2f5418888..f13f5979f 100644 --- a/src/libcalamares/PythonHelper.cpp +++ b/src/libcalamares/PythonHelper.cpp @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/PythonHelper.h b/src/libcalamares/PythonHelper.h index 7acea5832..c439f4619 100644 --- a/src/libcalamares/PythonHelper.h +++ b/src/libcalamares/PythonHelper.h @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2018-2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index c1cfbbc1c..1f4680017 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018-2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ #include "PythonJob.h" diff --git a/src/libcalamares/PythonJob.h b/src/libcalamares/PythonJob.h index b34b40b0b..5b5cfb7cc 100644 --- a/src/libcalamares/PythonJob.h +++ b/src/libcalamares/PythonJob.h @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/PythonJobApi.cpp b/src/libcalamares/PythonJobApi.cpp index 2f8818738..41fb82151 100644 --- a/src/libcalamares/PythonJobApi.cpp +++ b/src/libcalamares/PythonJobApi.cpp @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/PythonJobApi.h b/src/libcalamares/PythonJobApi.h index 6fd162912..3c7977c4f 100644 --- a/src/libcalamares/PythonJobApi.h +++ b/src/libcalamares/PythonJobApi.h @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/Settings.cpp b/src/libcalamares/Settings.cpp index 592ffd02d..dcb5c70b0 100644 --- a/src/libcalamares/Settings.cpp +++ b/src/libcalamares/Settings.cpp @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2019 Gabriel Craciunescu @@ -6,18 +6,8 @@ * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/Settings.h b/src/libcalamares/Settings.h index 1cff4b34a..0abf3b866 100644 --- a/src/libcalamares/Settings.h +++ b/src/libcalamares/Settings.h @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2019 Gabriel Craciunescu @@ -6,18 +6,8 @@ * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/Tests.cpp b/src/libcalamares/Tests.cpp index 68e1112c6..c7f1d6028 100644 --- a/src/libcalamares/Tests.cpp +++ b/src/libcalamares/Tests.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/geoip/GeoIPFixed.cpp b/src/libcalamares/geoip/GeoIPFixed.cpp index 69d5d3a4e..7e5efbd6c 100644 --- a/src/libcalamares/geoip/GeoIPFixed.cpp +++ b/src/libcalamares/geoip/GeoIPFixed.cpp @@ -1,22 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * */ #include "GeoIPFixed.h" diff --git a/src/libcalamares/geoip/GeoIPFixed.h b/src/libcalamares/geoip/GeoIPFixed.h index 5d6fca266..d6e9b0e41 100644 --- a/src/libcalamares/geoip/GeoIPFixed.h +++ b/src/libcalamares/geoip/GeoIPFixed.h @@ -1,22 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * */ #ifndef GEOIP_GEOIPFIXED_H diff --git a/src/libcalamares/geoip/GeoIPJSON.cpp b/src/libcalamares/geoip/GeoIPJSON.cpp index 6522ca085..9869d7a25 100644 --- a/src/libcalamares/geoip/GeoIPJSON.cpp +++ b/src/libcalamares/geoip/GeoIPJSON.cpp @@ -1,23 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/geoip/GeoIPJSON.h b/src/libcalamares/geoip/GeoIPJSON.h index 246556c74..e9be14102 100644 --- a/src/libcalamares/geoip/GeoIPJSON.h +++ b/src/libcalamares/geoip/GeoIPJSON.h @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/geoip/GeoIPTests.cpp b/src/libcalamares/geoip/GeoIPTests.cpp index 9650cfe2d..6af857b36 100644 --- a/src/libcalamares/geoip/GeoIPTests.cpp +++ b/src/libcalamares/geoip/GeoIPTests.cpp @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2018 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/geoip/GeoIPTests.h b/src/libcalamares/geoip/GeoIPTests.h index 746a83eca..4d36edbb0 100644 --- a/src/libcalamares/geoip/GeoIPTests.h +++ b/src/libcalamares/geoip/GeoIPTests.h @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2018 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/geoip/GeoIPXML.cpp b/src/libcalamares/geoip/GeoIPXML.cpp index 125614032..7f2c30090 100644 --- a/src/libcalamares/geoip/GeoIPXML.cpp +++ b/src/libcalamares/geoip/GeoIPXML.cpp @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2018 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/geoip/GeoIPXML.h b/src/libcalamares/geoip/GeoIPXML.h index d686928db..fb3167b24 100644 --- a/src/libcalamares/geoip/GeoIPXML.h +++ b/src/libcalamares/geoip/GeoIPXML.h @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/geoip/Handler.cpp b/src/libcalamares/geoip/Handler.cpp index c76b86492..d954b8fc0 100644 --- a/src/libcalamares/geoip/Handler.cpp +++ b/src/libcalamares/geoip/Handler.cpp @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ @@ -80,7 +67,8 @@ Handler::Handler( const QString& implementation, const QString& url, const QStri { cWarning() << "GeoIP style *none* does not do anything."; } - else if ( m_type == Type::Fixed && Calamares::Settings::instance() && !Calamares::Settings::instance()->debugMode() ) + else if ( m_type == Type::Fixed && Calamares::Settings::instance() + && !Calamares::Settings::instance()->debugMode() ) { cWarning() << "GeoIP style *fixed* is not recommended for production."; } diff --git a/src/libcalamares/geoip/Handler.h b/src/libcalamares/geoip/Handler.h index a44162576..e13198b94 100644 --- a/src/libcalamares/geoip/Handler.h +++ b/src/libcalamares/geoip/Handler.h @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ @@ -47,10 +34,10 @@ class DLLEXPORT Handler public: enum class Type { - None, // No lookup, returns empty string - JSON, // JSON-formatted data, returns extracted field + None, // No lookup, returns empty string + JSON, // JSON-formatted data, returns extracted field XML, // XML-formatted data, returns extracted field - Fixed // Returns selector string verbatim + Fixed // Returns selector string verbatim }; /** @brief An unconfigured handler; this always returns errors. */ diff --git a/src/libcalamares/geoip/Interface.cpp b/src/libcalamares/geoip/Interface.cpp index 47c826e1a..8ebe65208 100644 --- a/src/libcalamares/geoip/Interface.cpp +++ b/src/libcalamares/geoip/Interface.cpp @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/geoip/Interface.h b/src/libcalamares/geoip/Interface.h index 1afcc911b..2edf62155 100644 --- a/src/libcalamares/geoip/Interface.h +++ b/src/libcalamares/geoip/Interface.h @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/geoip/test_geoip.cpp b/src/libcalamares/geoip/test_geoip.cpp index a2aff929e..0c475b9c0 100644 --- a/src/libcalamares/geoip/test_geoip.cpp +++ b/src/libcalamares/geoip/test_geoip.cpp @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2018 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/locale/CountryData_p.cpp b/src/libcalamares/locale/CountryData_p.cpp index 722ee2ba9..932a1996d 100644 --- a/src/libcalamares/locale/CountryData_p.cpp +++ b/src/libcalamares/locale/CountryData_p.cpp @@ -1,10 +1,10 @@ /* GENERATED FILE DO NOT EDIT * -* === This file is part of Calamares - === +* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 1991-2019 Unicode, Inc. * SPDX-FileCopyrightText: 2019 Adriaan de Groot -* SPDX-License-Identifier: CC0 +* SPDX-License-Identifier: CC0-1.0 * * This file is derived from CLDR data from Unicode, Inc. Applicable terms * are listed at http://unicode.org/copyright.html , of which the most diff --git a/src/libcalamares/locale/Label.cpp b/src/libcalamares/locale/Label.cpp index 9b16bc757..b4ec8180c 100644 --- a/src/libcalamares/locale/Label.cpp +++ b/src/libcalamares/locale/Label.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/Label.h b/src/libcalamares/locale/Label.h index f52e401e3..58b2a3773 100644 --- a/src/libcalamares/locale/Label.h +++ b/src/libcalamares/locale/Label.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/LabelModel.cpp b/src/libcalamares/locale/LabelModel.cpp index 26adacfb8..9a9be9905 100644 --- a/src/libcalamares/locale/LabelModel.cpp +++ b/src/libcalamares/locale/LabelModel.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Camilo Higuita * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/LabelModel.h b/src/libcalamares/locale/LabelModel.h index 36596c6c4..8648dc71c 100644 --- a/src/libcalamares/locale/LabelModel.h +++ b/src/libcalamares/locale/LabelModel.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Camilo Higuita * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/Lookup.cpp b/src/libcalamares/locale/Lookup.cpp index b4ebe8f67..f792f08ed 100644 --- a/src/libcalamares/locale/Lookup.cpp +++ b/src/libcalamares/locale/Lookup.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/Lookup.h b/src/libcalamares/locale/Lookup.h index 4eae7c6b6..4095fd097 100644 --- a/src/libcalamares/locale/Lookup.h +++ b/src/libcalamares/locale/Lookup.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/Tests.cpp b/src/libcalamares/locale/Tests.cpp index 6414e2ebf..6e0140e79 100644 --- a/src/libcalamares/locale/Tests.cpp +++ b/src/libcalamares/locale/Tests.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/TimeZone.cpp b/src/libcalamares/locale/TimeZone.cpp index 7535bbc5c..b9dbac5ee 100644 --- a/src/libcalamares/locale/TimeZone.cpp +++ b/src/libcalamares/locale/TimeZone.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ @@ -368,7 +358,9 @@ ZonesModel::find( const QString& region, const QString& zone ) const } STATICTEST const TimeZoneData* -find( double startingDistance, const ZoneVector& zones, const std::function< double( const TimeZoneData* ) >& distanceFunc ) +find( double startingDistance, + const ZoneVector& zones, + const std::function< double( const TimeZoneData* ) >& distanceFunc ) { double smallestDistance = startingDistance; const TimeZoneData* closest = nullptr; @@ -389,7 +381,8 @@ const TimeZoneData* ZonesModel::find( const std::function< double( const TimeZoneData* ) >& distanceFunc ) const { const auto* officialZone = CalamaresUtils::Locale::find( 1000000.0, m_private->m_zones, distanceFunc ); - const auto* altZone = CalamaresUtils::Locale::find( distanceFunc( officialZone ), m_private->m_altZones, distanceFunc ); + const auto* altZone + = CalamaresUtils::Locale::find( distanceFunc( officialZone ), m_private->m_altZones, distanceFunc ); // If nothing was closer than the official zone already was, altZone is // nullptr; but if there is a spot-patch, then we need to re-find diff --git a/src/libcalamares/locale/TimeZone.h b/src/libcalamares/locale/TimeZone.h index e14f33e36..8c16517c7 100644 --- a/src/libcalamares/locale/TimeZone.h +++ b/src/libcalamares/locale/TimeZone.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/TranslatableConfiguration.cpp b/src/libcalamares/locale/TranslatableConfiguration.cpp index 618ecfa4f..1f0811c9d 100644 --- a/src/libcalamares/locale/TranslatableConfiguration.cpp +++ b/src/libcalamares/locale/TranslatableConfiguration.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/TranslatableConfiguration.h b/src/libcalamares/locale/TranslatableConfiguration.h index a47f70eee..c45c8f523 100644 --- a/src/libcalamares/locale/TranslatableConfiguration.h +++ b/src/libcalamares/locale/TranslatableConfiguration.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/locale/TranslatableString.cpp b/src/libcalamares/locale/TranslatableString.cpp index 9200c8d65..8f42a4e41 100644 --- a/src/libcalamares/locale/TranslatableString.cpp +++ b/src/libcalamares/locale/TranslatableString.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ #include "TranslatableString.h" diff --git a/src/libcalamares/locale/TranslatableString.h b/src/libcalamares/locale/TranslatableString.h index 8347488f1..663f6a2c2 100644 --- a/src/libcalamares/locale/TranslatableString.h +++ b/src/libcalamares/locale/TranslatableString.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ #ifndef LOCALE_TRANSLATABLESTRING_H diff --git a/src/libcalamares/locale/ZoneData_p.cxxtr b/src/libcalamares/locale/ZoneData_p.cxxtr index 7bbcdf7f6..c59c60dbb 100644 --- a/src/libcalamares/locale/ZoneData_p.cxxtr +++ b/src/libcalamares/locale/ZoneData_p.cxxtr @@ -2,7 +2,7 @@ * * SPDX-FileCopyrightText: 2009 Arthur David Olson * SPDX-FileCopyrightText: 2019 Adriaan de Groot -* SPDX-License-Identifier: CC0 +* SPDX-License-Identifier: CC0-1.0 * * This file is derived from zone.tab, which has its own copyright statement: * diff --git a/src/libcalamares/locale/cldr-extractor.py b/src/libcalamares/locale/cldr-extractor.py index 0291abf7d..7aff85be1 100644 --- a/src/libcalamares/locale/cldr-extractor.py +++ b/src/libcalamares/locale/cldr-extractor.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # # SPDX-FileCopyrightText: 2019 Adriaan de Groot # SPDX-License-Identifier: BSD-2-Clause @@ -186,7 +186,7 @@ def read_subtags_file(): cpp_header_comment = """/* GENERATED FILE DO NOT EDIT * -* === This file is part of Calamares - === +* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 1991-2019 Unicode, Inc. * SPDX-FileCopyrightText: 2019 Adriaan de Groot diff --git a/src/libcalamares/locale/zone-extractor.py b/src/libcalamares/locale/zone-extractor.py index 3f08df9d8..b3d9e196d 100644 --- a/src/libcalamares/locale/zone-extractor.py +++ b/src/libcalamares/locale/zone-extractor.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # # SPDX-FileCopyrightText: 2019 Adriaan de Groot # SPDX-License-Identifier: BSD-2-Clause @@ -44,11 +44,11 @@ def write_set(file, label, set): cpp_header_comment = """/* GENERATED FILE DO NOT EDIT * -* === This file is part of Calamares - === +* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2009 Arthur David Olson * SPDX-FileCopyrightText: 2019 Adriaan de Groot -* SPDX-License-Identifier: CC0 +* SPDX-License-Identifier: CC0-1.0 * * This file is derived from zone.tab, which has its own copyright statement: * diff --git a/src/libcalamares/modulesystem/Actions.h b/src/libcalamares/modulesystem/Actions.h index 4376733a1..f4bbe7e09 100644 --- a/src/libcalamares/modulesystem/Actions.h +++ b/src/libcalamares/modulesystem/Actions.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/modulesystem/Descriptor.cpp b/src/libcalamares/modulesystem/Descriptor.cpp index 9b3e48b6e..71b50d867 100644 --- a/src/libcalamares/modulesystem/Descriptor.cpp +++ b/src/libcalamares/modulesystem/Descriptor.cpp @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/libcalamares/modulesystem/Descriptor.h b/src/libcalamares/modulesystem/Descriptor.h index a94c0574d..614d5f15a 100644 --- a/src/libcalamares/modulesystem/Descriptor.h +++ b/src/libcalamares/modulesystem/Descriptor.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/modulesystem/InstanceKey.cpp b/src/libcalamares/modulesystem/InstanceKey.cpp index 982b5f532..948716f69 100644 --- a/src/libcalamares/modulesystem/InstanceKey.cpp +++ b/src/libcalamares/modulesystem/InstanceKey.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ #include "InstanceKey.h" diff --git a/src/libcalamares/modulesystem/InstanceKey.h b/src/libcalamares/modulesystem/InstanceKey.h index 074743bf3..e85aa18a4 100644 --- a/src/libcalamares/modulesystem/InstanceKey.h +++ b/src/libcalamares/modulesystem/InstanceKey.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ #ifndef MODULESYSTEM_INSTANCEKEY_H diff --git a/src/libcalamares/modulesystem/Module.cpp b/src/libcalamares/modulesystem/Module.cpp index 18c33bde8..94888f240 100644 --- a/src/libcalamares/modulesystem/Module.cpp +++ b/src/libcalamares/modulesystem/Module.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ @@ -96,8 +86,7 @@ moduleConfigurationCandidates( bool assumeBuildDir, const QString& moduleName, c return paths; } -void -Module::loadConfigurationFile( const QString& configFileName ) //throws YAML::Exception +void Module::loadConfigurationFile( const QString& configFileName ) //throws YAML::Exception { QStringList configCandidates = moduleConfigurationCandidates( Settings::instance()->debugMode(), name(), configFileName ); diff --git a/src/libcalamares/modulesystem/Module.h b/src/libcalamares/modulesystem/Module.h index e9719d756..88632cbf5 100644 --- a/src/libcalamares/modulesystem/Module.h +++ b/src/libcalamares/modulesystem/Module.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/modulesystem/Requirement.h b/src/libcalamares/modulesystem/Requirement.h index 02e0a009a..dc9fe1d77 100644 --- a/src/libcalamares/modulesystem/Requirement.h +++ b/src/libcalamares/modulesystem/Requirement.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2017 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ #ifndef CALAMARES_REQUIREMENT_H diff --git a/src/libcalamares/modulesystem/RequirementsChecker.cpp b/src/libcalamares/modulesystem/RequirementsChecker.cpp index 3256c460d..a12a4f681 100644 --- a/src/libcalamares/modulesystem/RequirementsChecker.cpp +++ b/src/libcalamares/modulesystem/RequirementsChecker.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/modulesystem/RequirementsChecker.h b/src/libcalamares/modulesystem/RequirementsChecker.h index 523bc2bc7..3577b5397 100644 --- a/src/libcalamares/modulesystem/RequirementsChecker.h +++ b/src/libcalamares/modulesystem/RequirementsChecker.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ #ifndef CALAMARES_REQUIREMENTSCHECKER_H diff --git a/src/libcalamares/modulesystem/RequirementsModel.cpp b/src/libcalamares/modulesystem/RequirementsModel.cpp index 2ff184f3b..9dfab0c8f 100644 --- a/src/libcalamares/modulesystem/RequirementsModel.cpp +++ b/src/libcalamares/modulesystem/RequirementsModel.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ @@ -99,9 +89,8 @@ RequirementsModel::describe() const int count = 0; for ( const auto& r : m_requirements ) { - cDebug() << Logger::SubEntry << "requirement" << count << r.name - << "satisfied?" << r.satisfied - << "mandatory?" << r.mandatory; + cDebug() << Logger::SubEntry << "requirement" << count << r.name << "satisfied?" << r.satisfied << "mandatory?" + << r.mandatory; if ( r.mandatory && !r.satisfied ) { acceptable = false; diff --git a/src/libcalamares/modulesystem/RequirementsModel.h b/src/libcalamares/modulesystem/RequirementsModel.h index 904e0b84e..5f3e13cbb 100644 --- a/src/libcalamares/modulesystem/RequirementsModel.h +++ b/src/libcalamares/modulesystem/RequirementsModel.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/modulesystem/Tests.cpp b/src/libcalamares/modulesystem/Tests.cpp index 2fcd5353d..78d3b5077 100644 --- a/src/libcalamares/modulesystem/Tests.cpp +++ b/src/libcalamares/modulesystem/Tests.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/network/Manager.cpp b/src/libcalamares/network/Manager.cpp index 9d7534e99..57faae28c 100644 --- a/src/libcalamares/network/Manager.cpp +++ b/src/libcalamares/network/Manager.cpp @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ @@ -162,18 +149,23 @@ Manager::hasInternet() bool Manager::checkHasInternet() { - bool hasInternet = d->nam()->networkAccessible() == QNetworkAccessManager::Accessible; - if ( !hasInternet && ( d->nam()->networkAccessible() == QNetworkAccessManager::UnknownAccessibility ) ) + d->m_hasInternet = synchronousPing( d->m_hasInternetUrl ); + +// For earlier Qt versions (< 5.15.0), set the accessibility flag to +// NotAccessible if synchronous ping has failed, so that any module +// using Qt's networkAccessible method to determine whether or not +// internet connection is actually avaialable won't get confused over +// virtualization technologies. +#if ( QT_VERSION < QT_VERSION_CHECK( 5, 15, 0 ) ) + if ( !d->m_hasInternet ) { - hasInternet = synchronousPing( d->m_hasInternetUrl ); + d->nam()->setNetworkAccessible( QNetworkAccessManager::NotAccessible ); } - if ( hasInternet != d->m_hasInternet ) - { - d->m_hasInternet = hasInternet; - emit hasInternetChanged( hasInternet ); - } - return hasInternet; +#endif + + emit hasInternetChanged( d->m_hasInternet ); + return d->m_hasInternet; } void diff --git a/src/libcalamares/network/Manager.h b/src/libcalamares/network/Manager.h index 8673d340b..b3a1e23e7 100644 --- a/src/libcalamares/network/Manager.h +++ b/src/libcalamares/network/Manager.h @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/network/Tests.cpp b/src/libcalamares/network/Tests.cpp index 6841a3061..d42a74115 100644 --- a/src/libcalamares/network/Tests.cpp +++ b/src/libcalamares/network/Tests.cpp @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/network/Tests.h b/src/libcalamares/network/Tests.h index 2d785672e..6000e227a 100644 --- a/src/libcalamares/network/Tests.h +++ b/src/libcalamares/network/Tests.h @@ -1,22 +1,9 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. * */ diff --git a/src/libcalamares/partition/FileSystem.cpp b/src/libcalamares/partition/FileSystem.cpp index 6fda6b41a..ad4df31ed 100644 --- a/src/libcalamares/partition/FileSystem.cpp +++ b/src/libcalamares/partition/FileSystem.cpp @@ -1,24 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Aurélien Gâteau * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/FileSystem.h b/src/libcalamares/partition/FileSystem.h index 03f6ff3bc..6696f0df9 100644 --- a/src/libcalamares/partition/FileSystem.h +++ b/src/libcalamares/partition/FileSystem.h @@ -1,22 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Aurélien Gâteau * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/partition/KPMManager.cpp b/src/libcalamares/partition/KPMManager.cpp index 00b4a6491..60a129951 100644 --- a/src/libcalamares/partition/KPMManager.cpp +++ b/src/libcalamares/partition/KPMManager.cpp @@ -1,22 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ @@ -74,7 +62,8 @@ InternalManager::InternalManager() else { auto* backend_p = CoreBackendManager::self()->backend(); - cDebug() << Logger::SubEntry << "Backend" << Logger::Pointer(backend_p) << backend_p->id() << backend_p->version(); + cDebug() << Logger::SubEntry << "Backend" << Logger::Pointer( backend_p ) << backend_p->id() + << backend_p->version(); s_kpm_loaded = true; } } diff --git a/src/libcalamares/partition/KPMManager.h b/src/libcalamares/partition/KPMManager.h index be5ae00c0..871deb866 100644 --- a/src/libcalamares/partition/KPMManager.h +++ b/src/libcalamares/partition/KPMManager.h @@ -1,22 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/KPMTests.cpp b/src/libcalamares/partition/KPMTests.cpp index d702c8a01..3834b7913 100644 --- a/src/libcalamares/partition/KPMTests.cpp +++ b/src/libcalamares/partition/KPMTests.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/partition/Mount.cpp b/src/libcalamares/partition/Mount.cpp index f9a45fafd..0fd204df4 100644 --- a/src/libcalamares/partition/Mount.cpp +++ b/src/libcalamares/partition/Mount.cpp @@ -1,23 +1,11 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/Mount.h b/src/libcalamares/partition/Mount.h index c08d5ac75..6a2ef9f8b 100644 --- a/src/libcalamares/partition/Mount.h +++ b/src/libcalamares/partition/Mount.h @@ -1,23 +1,11 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/PartitionIterator.cpp b/src/libcalamares/partition/PartitionIterator.cpp index f4e57fbad..7c68e6170 100644 --- a/src/libcalamares/partition/PartitionIterator.cpp +++ b/src/libcalamares/partition/PartitionIterator.cpp @@ -1,24 +1,12 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Aurélien Gâteau * SPDX-FileCopyrightText: 2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/PartitionIterator.h b/src/libcalamares/partition/PartitionIterator.h index 03a03faba..b6207f943 100644 --- a/src/libcalamares/partition/PartitionIterator.h +++ b/src/libcalamares/partition/PartitionIterator.h @@ -1,24 +1,12 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Aurélien Gâteau * SPDX-FileCopyrightText: 2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/PartitionQuery.cpp b/src/libcalamares/partition/PartitionQuery.cpp index 0aba728b3..beba6b9bc 100644 --- a/src/libcalamares/partition/PartitionQuery.cpp +++ b/src/libcalamares/partition/PartitionQuery.cpp @@ -1,24 +1,12 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Aurélien Gâteau * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/PartitionQuery.h b/src/libcalamares/partition/PartitionQuery.h index 595d82c0f..817966d35 100644 --- a/src/libcalamares/partition/PartitionQuery.h +++ b/src/libcalamares/partition/PartitionQuery.h @@ -1,24 +1,12 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2014 Aurélien Gâteau * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/PartitionSize.cpp b/src/libcalamares/partition/PartitionSize.cpp index d84fd81c6..d09cc6064 100644 --- a/src/libcalamares/partition/PartitionSize.cpp +++ b/src/libcalamares/partition/PartitionSize.cpp @@ -1,23 +1,11 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Collabora Ltd * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/PartitionSize.h b/src/libcalamares/partition/PartitionSize.h index f70aa3c89..b4808e36e 100644 --- a/src/libcalamares/partition/PartitionSize.h +++ b/src/libcalamares/partition/PartitionSize.h @@ -1,23 +1,11 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Collabora Ltd * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/Sync.cpp b/src/libcalamares/partition/Sync.cpp index d1f6378cd..bcdf0cd7f 100644 --- a/src/libcalamares/partition/Sync.cpp +++ b/src/libcalamares/partition/Sync.cpp @@ -1,22 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/Sync.h b/src/libcalamares/partition/Sync.h index a291058e7..8bb516214 100644 --- a/src/libcalamares/partition/Sync.h +++ b/src/libcalamares/partition/Sync.h @@ -1,22 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/Tests.cpp b/src/libcalamares/partition/Tests.cpp index e52b8edf1..cd2922ee2 100644 --- a/src/libcalamares/partition/Tests.cpp +++ b/src/libcalamares/partition/Tests.cpp @@ -1,22 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/partition/Tests.h b/src/libcalamares/partition/Tests.h index c495fa0fd..0d6f77a76 100644 --- a/src/libcalamares/partition/Tests.h +++ b/src/libcalamares/partition/Tests.h @@ -1,22 +1,10 @@ -/* === This file is part of Calamares - === - * +/* === This file is part of Calamares - === + * * SPDX-FileCopyrightText: 2019 Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - * * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE + * + * Calamares is Free Software: see the License-Identifier above. + * * */ diff --git a/src/libcalamares/testdata/yaml-list.conf b/src/libcalamares/testdata/yaml-list.conf index d6992b1fb..d8d2178d1 100644 --- a/src/libcalamares/testdata/yaml-list.conf +++ b/src/libcalamares/testdata/yaml-list.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # YAML dump --- "cow": "moo" diff --git a/src/libcalamares/utils/BoostPython.h b/src/libcalamares/utils/BoostPython.h index 055ad590f..f39abe7cf 100644 --- a/src/libcalamares/utils/BoostPython.h +++ b/src/libcalamares/utils/BoostPython.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index 324f2cba1..8be7a16f9 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ @@ -197,7 +187,8 @@ System::runCommand( System::RunLocation location, ? ( static_cast< int >( std::chrono::milliseconds( timeoutSec ).count() ) ) : -1 ) ) { - cWarning() << "Process" << args.first() << "timed out after" << timeoutSec.count() << "s. Output so far:\n" << Logger::NoQuote{} << process.readAllStandardOutput(); + cWarning() << "Process" << args.first() << "timed out after" << timeoutSec.count() << "s. Output so far:\n" + << Logger::NoQuote {} << process.readAllStandardOutput(); return ProcessResult::Code::TimedOut; } @@ -205,7 +196,7 @@ System::runCommand( System::RunLocation location, if ( process.exitStatus() == QProcess::CrashExit ) { - cWarning() << "Process" << args.first() << "crashed. Output so far:\n" << Logger::NoQuote{} << output; + cWarning() << "Process" << args.first() << "crashed. Output so far:\n" << Logger::NoQuote {} << output; return ProcessResult::Code::Crashed; } @@ -214,7 +205,8 @@ System::runCommand( System::RunLocation location, bool showDebug = ( !Calamares::Settings::instance() ) || ( Calamares::Settings::instance()->debugMode() ); if ( ( r != 0 ) || showDebug ) { - cDebug() << Logger::SubEntry << "Target cmd:" << RedactedList( args ) << "output:\n" << Logger::NoQuote{} << output; + cDebug() << Logger::SubEntry << "Target cmd:" << RedactedList( args ) << "output:\n" + << Logger::NoQuote {} << output; } return ProcessResult( r, output ); } diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.h b/src/libcalamares/utils/CalamaresUtilsSystem.h index 63cacca96..61aebc58d 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.h +++ b/src/libcalamares/utils/CalamaresUtilsSystem.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ #ifndef UTILS_CALAMARESUTILSSYSTEM_H diff --git a/src/libcalamares/utils/CommandList.cpp b/src/libcalamares/utils/CommandList.cpp index 2a23d51b0..4652dcc5a 100644 --- a/src/libcalamares/utils/CommandList.cpp +++ b/src/libcalamares/utils/CommandList.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/CommandList.h b/src/libcalamares/utils/CommandList.h index 8eb4dfdab..432020a96 100644 --- a/src/libcalamares/utils/CommandList.h +++ b/src/libcalamares/utils/CommandList.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Dirs.cpp b/src/libcalamares/utils/Dirs.cpp index 2e0eec4d5..f333d6e64 100644 --- a/src/libcalamares/utils/Dirs.cpp +++ b/src/libcalamares/utils/Dirs.cpp @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2013-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot @@ -9,18 +9,8 @@ * SPDX-FileCopyrightText: 2010-2011 Leo Franchi * SPDX-FileCopyrightText: 2010-2012 Jeff Mitchell * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Dirs.h b/src/libcalamares/utils/Dirs.h index 8a321e4dc..445cbe1f1 100644 --- a/src/libcalamares/utils/Dirs.h +++ b/src/libcalamares/utils/Dirs.h @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2013-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot @@ -9,18 +9,8 @@ * SPDX-FileCopyrightText: 2010-2011 Leo Franchi * SPDX-FileCopyrightText: 2010-2012 Jeff Mitchell * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Entropy.cpp b/src/libcalamares/utils/Entropy.cpp index d574da70a..d28230a85 100644 --- a/src/libcalamares/utils/Entropy.cpp +++ b/src/libcalamares/utils/Entropy.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Entropy.h b/src/libcalamares/utils/Entropy.h index 38d1dae8a..1ca40a68f 100644 --- a/src/libcalamares/utils/Entropy.h +++ b/src/libcalamares/utils/Entropy.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp index d132a2e3e..0a7dcefd0 100644 --- a/src/libcalamares/utils/Logger.cpp +++ b/src/libcalamares/utils/Logger.cpp @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2010-2011 Christian Muehlhaeuser * SPDX-FileCopyrightText: 2014 Teo Mrnjavac @@ -6,18 +6,8 @@ * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Logger.h b/src/libcalamares/utils/Logger.h index 990f35606..58603c82d 100644 --- a/src/libcalamares/utils/Logger.h +++ b/src/libcalamares/utils/Logger.h @@ -1,22 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2010-2011 Christian Muehlhaeuser * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/NamedEnum.h b/src/libcalamares/utils/NamedEnum.h index d962b3c76..cf56a26f2 100644 --- a/src/libcalamares/utils/NamedEnum.h +++ b/src/libcalamares/utils/NamedEnum.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Collabora Ltd * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/NamedSuffix.h b/src/libcalamares/utils/NamedSuffix.h index b717e0471..84094e90c 100644 --- a/src/libcalamares/utils/NamedSuffix.h +++ b/src/libcalamares/utils/NamedSuffix.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Permissions.cpp b/src/libcalamares/utils/Permissions.cpp index a73ffe77d..777b3c463 100644 --- a/src/libcalamares/utils/Permissions.cpp +++ b/src/libcalamares/utils/Permissions.cpp @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018 Scott Harvey * SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/libcalamares/utils/Permissions.h b/src/libcalamares/utils/Permissions.h index 9e0357b57..11d1d4bab 100644 --- a/src/libcalamares/utils/Permissions.h +++ b/src/libcalamares/utils/Permissions.h @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018 Scott Harvey * SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/libcalamares/utils/PluginFactory.cpp b/src/libcalamares/utils/PluginFactory.cpp index 74c94a878..9f26a8a1c 100644 --- a/src/libcalamares/utils/PluginFactory.cpp +++ b/src/libcalamares/utils/PluginFactory.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/PluginFactory.h b/src/libcalamares/utils/PluginFactory.h index 594363fd9..891e3c1cd 100644 --- a/src/libcalamares/utils/PluginFactory.h +++ b/src/libcalamares/utils/PluginFactory.h @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot @@ -8,18 +8,8 @@ * SPDX-FileCopyrightText: 2007 Matthias Kretz * SPDX-FileCopyrightText: 2007 Bernhard Loos * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/RAII.h b/src/libcalamares/utils/RAII.h index 0f1f3f96e..d6f8fe94d 100644 --- a/src/libcalamares/utils/RAII.h +++ b/src/libcalamares/utils/RAII.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Retranslator.cpp b/src/libcalamares/utils/Retranslator.cpp index 149626804..a03ae9a3b 100644 --- a/src/libcalamares/utils/Retranslator.cpp +++ b/src/libcalamares/utils/Retranslator.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Retranslator.h b/src/libcalamares/utils/Retranslator.h index c88aad777..476c0b184 100644 --- a/src/libcalamares/utils/Retranslator.h +++ b/src/libcalamares/utils/Retranslator.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/String.cpp b/src/libcalamares/utils/String.cpp index 870c8ba49..34a7038e3 100644 --- a/src/libcalamares/utils/String.cpp +++ b/src/libcalamares/utils/String.cpp @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2013-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot @@ -9,18 +9,8 @@ * SPDX-FileCopyrightText: 2010-2011 Leo Franchi * SPDX-FileCopyrightText: 2010-2012 Jeff Mitchell * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/String.h b/src/libcalamares/utils/String.h index ea585188b..48bb17aac 100644 --- a/src/libcalamares/utils/String.h +++ b/src/libcalamares/utils/String.h @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2013-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot @@ -9,18 +9,8 @@ * SPDX-FileCopyrightText: 2010-2011 Leo Franchi * SPDX-FileCopyrightText: 2010-2012 Jeff Mitchell * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/TestPaths.cpp b/src/libcalamares/utils/TestPaths.cpp index 0a5fb9302..f00349c8f 100644 --- a/src/libcalamares/utils/TestPaths.cpp +++ b/src/libcalamares/utils/TestPaths.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Tests.cpp b/src/libcalamares/utils/Tests.cpp index 706844f70..0d9892d76 100644 --- a/src/libcalamares/utils/Tests.cpp +++ b/src/libcalamares/utils/Tests.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ @@ -422,7 +412,8 @@ LibCalamaresTests::testVariantStringListCode() m.insert( key, 17 ); QCOMPARE( getStringList( m, key ), QStringList {} ); m.insert( key, QString( "more strings" ) ); - QCOMPARE( getStringList( m, key ), QStringList { "more strings" } ); // A single string **can** be considered a stringlist! + QCOMPARE( getStringList( m, key ), + QStringList { "more strings" } ); // A single string **can** be considered a stringlist! m.insert( key, QVariant {} ); QCOMPARE( getStringList( m, key ), QStringList {} ); } diff --git a/src/libcalamares/utils/Traits.h b/src/libcalamares/utils/Traits.h index d957633d5..8d7eda4a9 100644 --- a/src/libcalamares/utils/Traits.h +++ b/src/libcalamares/utils/Traits.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ @@ -59,17 +49,30 @@ namespace CalamaresUtils */ namespace Traits { -template< class > struct sfinae_true : std::true_type{}; -} -} +template < class > +struct sfinae_true : std::true_type +{ +}; +} // namespace Traits +} // namespace CalamaresUtils -#define DECLARE_HAS_METHOD(m) \ - namespace CalamaresUtils { namespace Traits { \ - struct has_ ## m { \ - template< class T > static auto f(int) -> sfinae_true; \ - template< class T > static auto f(long) -> std::false_type; \ - template< class T > using t = decltype( f (0) ); \ - }; } } \ - template< class T > using has_ ## m = CalamaresUtils::Traits:: has_ ## m ::t; +#define DECLARE_HAS_METHOD( m ) \ + namespace CalamaresUtils \ + { \ + namespace Traits \ + { \ + struct has_##m \ + { \ + template < class T > \ + static auto f( int ) -> sfinae_true< decltype( &T::m ) >; \ + template < class T > \ + static auto f( long ) -> std::false_type; \ + template < class T > \ + using t = decltype( f< T >( 0 ) ); \ + }; \ + } \ + } \ + template < class T > \ + using has_##m = CalamaresUtils::Traits::has_##m ::t< T >; #endif diff --git a/src/libcalamares/utils/UMask.cpp b/src/libcalamares/utils/UMask.cpp index 861c635e9..3dd7e84f0 100644 --- a/src/libcalamares/utils/UMask.cpp +++ b/src/libcalamares/utils/UMask.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/UMask.h b/src/libcalamares/utils/UMask.h index 451ee23b2..aea79fbc3 100644 --- a/src/libcalamares/utils/UMask.h +++ b/src/libcalamares/utils/UMask.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ #ifndef UTILS_UMASK_H diff --git a/src/libcalamares/utils/Units.h b/src/libcalamares/utils/Units.h index 49a3ff795..abccacb0d 100644 --- a/src/libcalamares/utils/Units.h +++ b/src/libcalamares/utils/Units.h @@ -1,22 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2017 Adriaan de Groot * SPDX-FileCopyrightText: 2019 Collabora Ltd * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Variant.cpp b/src/libcalamares/utils/Variant.cpp index a6aad74ce..a484ac8f7 100644 --- a/src/libcalamares/utils/Variant.cpp +++ b/src/libcalamares/utils/Variant.cpp @@ -1,4 +1,4 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2013-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot @@ -9,18 +9,8 @@ * SPDX-FileCopyrightText: 2010-2011 Leo Franchi * SPDX-FileCopyrightText: 2010-2012 Jeff Mitchell * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamares/utils/Variant.h b/src/libcalamares/utils/Variant.h index ebf3ff8b6..e1261f877 100644 --- a/src/libcalamares/utils/Variant.h +++ b/src/libcalamares/utils/Variant.h @@ -1,22 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2013-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ @@ -48,7 +38,7 @@ DLLEXPORT QStringList getStringList( const QVariantMap& map, const QString& key, /** * Get an integer value from a mapping with a given key; returns @p d if no value. */ -DLLEXPORT qint64 getInteger( const QVariantMap& map, const QString& key, qint64 d = 0); +DLLEXPORT qint64 getInteger( const QVariantMap& map, const QString& key, qint64 d = 0 ); /** * Get an unsigned integer value from a mapping with a given key; returns @p d if no value. @@ -68,7 +58,10 @@ DLLEXPORT double getDouble( const QVariantMap& map, const QString& key, double d * Returns @p d if there is no such key or it is not a map-value. * (e.g. if @p success is false). */ -DLLEXPORT QVariantMap getSubMap( const QVariantMap& map, const QString& key, bool& success, const QVariantMap& d = QVariantMap() ); +DLLEXPORT QVariantMap getSubMap( const QVariantMap& map, + const QString& key, + bool& success, + const QVariantMap& d = QVariantMap() ); } // namespace CalamaresUtils #endif diff --git a/src/libcalamares/utils/Yaml.cpp b/src/libcalamares/utils/Yaml.cpp index af73e2825..b787589c6 100644 --- a/src/libcalamares/utils/Yaml.cpp +++ b/src/libcalamares/utils/Yaml.cpp @@ -1,22 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * * */ diff --git a/src/libcalamares/utils/Yaml.h b/src/libcalamares/utils/Yaml.h index 0f9631fa2..3922484ce 100644 --- a/src/libcalamares/utils/Yaml.h +++ b/src/libcalamares/utils/Yaml.h @@ -1,22 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * * */ diff --git a/src/libcalamares/utils/moc-warnings.h b/src/libcalamares/utils/moc-warnings.h index fed12a604..2f44438c1 100644 --- a/src/libcalamares/utils/moc-warnings.h +++ b/src/libcalamares/utils/moc-warnings.h @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . * */ diff --git a/src/libcalamaresui/Branding.cpp b/src/libcalamaresui/Branding.cpp index 4cfe7ea40..8145ad57c 100644 --- a/src/libcalamaresui/Branding.cpp +++ b/src/libcalamaresui/Branding.cpp @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2019, Adriaan de Groot - * Copyright 2018, Raul Rodrigo Segura (raurodse) - * Copyright 2019, Camilo Higuita + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Raul Rodrigo Segura (raurodse) + * SPDX-FileCopyrightText: 2019 Camilo Higuita + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Branding.h" diff --git a/src/libcalamaresui/Branding.h b/src/libcalamaresui/Branding.h index 764845fec..b03df3acd 100644 --- a/src/libcalamaresui/Branding.h +++ b/src/libcalamaresui/Branding.h @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot - * Copyright 2018, Raul Rodrigo Segura (raurodse) - * Copyright 2019, Camilo Higuita + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Raul Rodrigo Segura (raurodse) + * SPDX-FileCopyrightText: 2019 Camilo Higuita + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef BRANDING_H diff --git a/src/libcalamaresui/CMakeLists.txt b/src/libcalamaresui/CMakeLists.txt index 773fdf617..f48008c2d 100644 --- a/src/libcalamaresui/CMakeLists.txt +++ b/src/libcalamaresui/CMakeLists.txt @@ -1,3 +1,9 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + # libcalamaresui is the GUI part of Calamares, which includes handling # view modules, view steps, widgets, and branding. diff --git a/src/libcalamaresui/ViewManager.cpp b/src/libcalamaresui/ViewManager.cpp index a39fc141f..8094e5223 100644 --- a/src/libcalamaresui/ViewManager.cpp +++ b/src/libcalamaresui/ViewManager.cpp @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Dominic Hayes - * Copyright 2019, Gabriel Craciunescu - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Dominic Hayes + * SPDX-FileCopyrightText: 2019 Gabriel Craciunescu + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ViewManager.h" @@ -189,7 +180,7 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail msgBox->show(); cDebug() << "Calamares will quit when the dialog closes."; - connect( msgBox, &QMessageBox::buttonClicked, [ msgBox ]( QAbstractButton* button ) { + connect( msgBox, &QMessageBox::buttonClicked, [msgBox]( QAbstractButton* button ) { if ( msgBox->buttonRole( button ) == QMessageBox::ButtonRole::YesRole ) { // TODO: host and port should be configurable diff --git a/src/libcalamaresui/ViewManager.h b/src/libcalamaresui/ViewManager.h index 683b335d1..947503eaa 100644 --- a/src/libcalamaresui/ViewManager.h +++ b/src/libcalamaresui/ViewManager.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef VIEWMANAGER_H diff --git a/src/libcalamaresui/libcalamaresui.qrc b/src/libcalamaresui/libcalamaresui.qrc index eeb3fc490..62a7df271 100644 --- a/src/libcalamaresui/libcalamaresui.qrc +++ b/src/libcalamaresui/libcalamaresui.qrc @@ -1,4 +1,8 @@ - + + + ../../data/images/yes.svgz ../../data/images/no.svgz diff --git a/src/libcalamaresui/modulesystem/CppJobModule.cpp b/src/libcalamaresui/modulesystem/CppJobModule.cpp index 6050c6955..c2110061c 100644 --- a/src/libcalamaresui/modulesystem/CppJobModule.cpp +++ b/src/libcalamaresui/modulesystem/CppJobModule.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2016, Kevin Kofler + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Kevin Kofler + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CppJobModule.h" diff --git a/src/libcalamaresui/modulesystem/CppJobModule.h b/src/libcalamaresui/modulesystem/CppJobModule.h index 8774a67e5..288f674f4 100644 --- a/src/libcalamaresui/modulesystem/CppJobModule.h +++ b/src/libcalamaresui/modulesystem/CppJobModule.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2016, Kevin Kofler - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Kevin Kofler + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARES_CPPJOBMODULE_H diff --git a/src/libcalamaresui/modulesystem/ModuleFactory.cpp b/src/libcalamaresui/modulesystem/ModuleFactory.cpp index 050854613..a7193d3f5 100644 --- a/src/libcalamaresui/modulesystem/ModuleFactory.cpp +++ b/src/libcalamaresui/modulesystem/ModuleFactory.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ModuleFactory.h" @@ -57,7 +48,8 @@ moduleFromDescriptor( const Calamares::ModuleSystem::Descriptor& moduleDescripto std::unique_ptr< Module > m; - if ( !moduleDescriptor.isValid() ) { + if ( !moduleDescriptor.isValid() ) + { cError() << "Bad module descriptor format" << instanceId; return nullptr; } @@ -77,7 +69,9 @@ moduleFromDescriptor( const Calamares::ModuleSystem::Descriptor& moduleDescripto } else { - cError() << "Bad interface" << Calamares::ModuleSystem::interfaceNames().find( moduleDescriptor.interface() ) << "for module type" << Calamares::ModuleSystem::typeNames().find( moduleDescriptor.type() ); + cError() << "Bad interface" + << Calamares::ModuleSystem::interfaceNames().find( moduleDescriptor.interface() ) + << "for module type" << Calamares::ModuleSystem::typeNames().find( moduleDescriptor.type() ); } } else if ( moduleDescriptor.type() == Type::Job ) @@ -100,7 +94,9 @@ moduleFromDescriptor( const Calamares::ModuleSystem::Descriptor& moduleDescripto } else { - cError() << "Bad interface" << Calamares::ModuleSystem::interfaceNames().find( moduleDescriptor.interface() ) << "for module type" << Calamares::ModuleSystem::typeNames().find( moduleDescriptor.type() ); + cError() << "Bad interface" + << Calamares::ModuleSystem::interfaceNames().find( moduleDescriptor.interface() ) + << "for module type" << Calamares::ModuleSystem::typeNames().find( moduleDescriptor.type() ); } } else @@ -110,7 +106,9 @@ moduleFromDescriptor( const Calamares::ModuleSystem::Descriptor& moduleDescripto if ( !m ) { - cError() << "Bad module type (" << Calamares::ModuleSystem::typeNames().find( moduleDescriptor.type() ) << ") or interface string (" << Calamares::ModuleSystem::interfaceNames().find( moduleDescriptor.interface() ) << ") for module " + cError() << "Bad module type (" << Calamares::ModuleSystem::typeNames().find( moduleDescriptor.type() ) + << ") or interface string (" + << Calamares::ModuleSystem::interfaceNames().find( moduleDescriptor.interface() ) << ") for module " << instanceId; return nullptr; } diff --git a/src/libcalamaresui/modulesystem/ModuleFactory.h b/src/libcalamaresui/modulesystem/ModuleFactory.h index 8184967d2..170e27e8e 100644 --- a/src/libcalamaresui/modulesystem/ModuleFactory.h +++ b/src/libcalamaresui/modulesystem/ModuleFactory.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARES_MODULEFACTORY_H diff --git a/src/libcalamaresui/modulesystem/ModuleManager.cpp b/src/libcalamaresui/modulesystem/ModuleManager.cpp index 283ea8b5f..8c0f21f58 100644 --- a/src/libcalamaresui/modulesystem/ModuleManager.cpp +++ b/src/libcalamaresui/modulesystem/ModuleManager.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ModuleManager.h" @@ -114,8 +104,9 @@ ModuleManager::doInit() if ( ok && !moduleName.isEmpty() && ( moduleName == currentDir.dirName() ) && !m_availableDescriptorsByModuleName.contains( moduleName ) ) { - auto descriptor = Calamares::ModuleSystem::Descriptor::fromDescriptorData( moduleDescriptorMap ); - descriptor.setDirectory(descriptorFileInfo.absoluteDir().absolutePath() ); + auto descriptor + = Calamares::ModuleSystem::Descriptor::fromDescriptorData( moduleDescriptorMap ); + descriptor.setDirectory( descriptorFileInfo.absoluteDir().absolutePath() ); m_availableDescriptorsByModuleName.insert( moduleName, descriptor ); } } @@ -253,11 +244,8 @@ ModuleManager::loadModules() } else { - thisModule - = Calamares::moduleFromDescriptor( descriptor, - instanceKey.id(), - configFileName, - descriptor.directory() ); + thisModule = Calamares::moduleFromDescriptor( + descriptor, instanceKey.id(), configFileName, descriptor.directory() ); if ( !thisModule ) { cError() << "Module" << instanceKey.toString() << "cannot be created from descriptor" @@ -385,8 +373,7 @@ ModuleManager::checkDependencies() for ( auto it = m_availableDescriptorsByModuleName.begin(); it != m_availableDescriptorsByModuleName.end(); ++it ) { - QStringList unmet = missingRequiredModules( it->requiredModules(), - m_availableDescriptorsByModuleName ); + QStringList unmet = missingRequiredModules( it->requiredModules(), m_availableDescriptorsByModuleName ); if ( unmet.count() > 0 ) { @@ -413,8 +400,7 @@ ModuleManager::checkModuleDependencies( const Module& m ) } bool allRequirementsFound = true; - QStringList requiredModules - = m_availableDescriptorsByModuleName[ m.name() ].requiredModules(); + QStringList requiredModules = m_availableDescriptorsByModuleName[ m.name() ].requiredModules(); for ( const QString& required : requiredModules ) { diff --git a/src/libcalamaresui/modulesystem/ModuleManager.h b/src/libcalamaresui/modulesystem/ModuleManager.h index eb7d086c1..d2beedf2e 100644 --- a/src/libcalamaresui/modulesystem/ModuleManager.h +++ b/src/libcalamaresui/modulesystem/ModuleManager.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef MODULELOADER_H diff --git a/src/libcalamaresui/modulesystem/ProcessJobModule.cpp b/src/libcalamaresui/modulesystem/ProcessJobModule.cpp index b5eed6e43..2671d0899 100644 --- a/src/libcalamaresui/modulesystem/ProcessJobModule.cpp +++ b/src/libcalamaresui/modulesystem/ProcessJobModule.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ProcessJobModule.h" @@ -80,7 +71,7 @@ ProcessJobModule::ProcessJobModule() } -ProcessJobModule::~ProcessJobModule() { } +ProcessJobModule::~ProcessJobModule() {} } // namespace Calamares diff --git a/src/libcalamaresui/modulesystem/ProcessJobModule.h b/src/libcalamaresui/modulesystem/ProcessJobModule.h index b59539a04..0e00f5545 100644 --- a/src/libcalamaresui/modulesystem/ProcessJobModule.h +++ b/src/libcalamaresui/modulesystem/ProcessJobModule.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARES_PROCESSJOBMODULE_H diff --git a/src/libcalamaresui/modulesystem/PythonJobModule.cpp b/src/libcalamaresui/modulesystem/PythonJobModule.cpp index 72ca116fb..20f8215d2 100644 --- a/src/libcalamaresui/modulesystem/PythonJobModule.cpp +++ b/src/libcalamaresui/modulesystem/PythonJobModule.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PythonJobModule.h" @@ -76,7 +67,7 @@ PythonJobModule::PythonJobModule() } -PythonJobModule::~PythonJobModule() { } +PythonJobModule::~PythonJobModule() {} } // namespace Calamares diff --git a/src/libcalamaresui/modulesystem/PythonJobModule.h b/src/libcalamaresui/modulesystem/PythonJobModule.h index db5554b9b..37634d6be 100644 --- a/src/libcalamaresui/modulesystem/PythonJobModule.h +++ b/src/libcalamaresui/modulesystem/PythonJobModule.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARES_PYTHONJOBMODULE_H diff --git a/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp b/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp index b94414d4a..ae2b2915f 100644 --- a/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp +++ b/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot - * Copyright 2018, Raul Rodrigo Segura + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Raul Rodrigo Segura + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PythonQtViewModule.h" @@ -188,6 +179,6 @@ PythonQtViewModule::PythonQtViewModule() { } -PythonQtViewModule::~PythonQtViewModule() { } +PythonQtViewModule::~PythonQtViewModule() {} } // namespace Calamares diff --git a/src/libcalamaresui/modulesystem/PythonQtViewModule.h b/src/libcalamaresui/modulesystem/PythonQtViewModule.h index 64cc0f8a9..8267dd2cb 100644 --- a/src/libcalamaresui/modulesystem/PythonQtViewModule.h +++ b/src/libcalamaresui/modulesystem/PythonQtViewModule.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARES_PYTHONQTVIEWMODULE_H diff --git a/src/libcalamaresui/modulesystem/ViewModule.cpp b/src/libcalamaresui/modulesystem/ViewModule.cpp index 8f3b9a340..32c05bdba 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.cpp +++ b/src/libcalamaresui/modulesystem/ViewModule.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ViewModule.h" diff --git a/src/libcalamaresui/modulesystem/ViewModule.h b/src/libcalamaresui/modulesystem/ViewModule.h index ac56e7607..8e5eb44b4 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.h +++ b/src/libcalamaresui/modulesystem/ViewModule.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARES_VIEWMODULE_H diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp index 680673a22..e16763a70 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CalamaresUtilsGui.h" diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.h b/src/libcalamaresui/utils/CalamaresUtilsGui.h index 251741fad..aa7aff79b 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.h +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CALAMARESUTILSGUI_H diff --git a/src/libcalamaresui/utils/ImageRegistry.cpp b/src/libcalamaresui/utils/ImageRegistry.cpp index ebe6858dd..ffc65300e 100644 --- a/src/libcalamaresui/utils/ImageRegistry.cpp +++ b/src/libcalamaresui/utils/ImageRegistry.cpp @@ -1,28 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * + * SPDX-FileCopyrightText: 2012 Christian Muehlhaeuser + * SPDX-FileCopyrightText: 2019, Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSES/GPLv3+-ImageRegistry * - * Copyright 2019, Adriaan de Groot */ -/* - * Copyright 2012, Christian Muehlhaeuser - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - #include "ImageRegistry.h" #include @@ -40,7 +23,7 @@ ImageRegistry::instance() } -ImageRegistry::ImageRegistry() { } +ImageRegistry::ImageRegistry() {} QIcon diff --git a/src/libcalamaresui/utils/ImageRegistry.h b/src/libcalamaresui/utils/ImageRegistry.h index 5378d71e7..80bc25ff6 100644 --- a/src/libcalamaresui/utils/ImageRegistry.h +++ b/src/libcalamaresui/utils/ImageRegistry.h @@ -1,28 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * + * SPDX-FileCopyrightText: 2012 Christian Muehlhaeuser + * SPDX-FileCopyrightText: 2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSES/GPLv3+-ImageRegistry * - * Copyright 2019, Adriaan de Groot */ -/* - * Copyright 2012, Christian Muehlhaeuser - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - #ifndef IMAGE_REGISTRY_H #define IMAGE_REGISTRY_H diff --git a/src/libcalamaresui/utils/Paste.cpp b/src/libcalamaresui/utils/Paste.cpp index 1b9ad4dfe..8099d9024 100644 --- a/src/libcalamaresui/utils/Paste.cpp +++ b/src/libcalamaresui/utils/Paste.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Bill Auger + * SPDX-FileCopyrightText: 2019 Bill Auger + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Paste.h" diff --git a/src/libcalamaresui/utils/Paste.h b/src/libcalamaresui/utils/Paste.h index fd088882c..f802dfe2e 100644 --- a/src/libcalamaresui/utils/Paste.h +++ b/src/libcalamaresui/utils/Paste.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Bill Auger + * SPDX-FileCopyrightText: 2019 Bill Auger + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef UTILS_PASTE_H diff --git a/src/libcalamaresui/utils/PythonQtUtils.cpp b/src/libcalamaresui/utils/PythonQtUtils.cpp index 3a60839a4..bc4e034f0 100644 --- a/src/libcalamaresui/utils/PythonQtUtils.cpp +++ b/src/libcalamaresui/utils/PythonQtUtils.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PythonQtUtils.h" diff --git a/src/libcalamaresui/utils/PythonQtUtils.h b/src/libcalamaresui/utils/PythonQtUtils.h index dc889b2d0..49f3bb1c4 100644 --- a/src/libcalamaresui/utils/PythonQtUtils.h +++ b/src/libcalamaresui/utils/PythonQtUtils.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PYTHONQTUTILS_H diff --git a/src/libcalamaresui/utils/Qml.cpp b/src/libcalamaresui/utils/Qml.cpp index 1f1152fa2..2cb13c803 100644 --- a/src/libcalamaresui/utils/Qml.cpp +++ b/src/libcalamaresui/utils/Qml.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Qml.h" diff --git a/src/libcalamaresui/utils/Qml.h b/src/libcalamaresui/utils/Qml.h index a3fc6d114..2d6655e9e 100644 --- a/src/libcalamaresui/utils/Qml.h +++ b/src/libcalamaresui/utils/Qml.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef UTILS_QML_H diff --git a/src/libcalamaresui/viewpages/BlankViewStep.cpp b/src/libcalamaresui/viewpages/BlankViewStep.cpp index 68eba5385..ea51e3f02 100644 --- a/src/libcalamaresui/viewpages/BlankViewStep.cpp +++ b/src/libcalamaresui/viewpages/BlankViewStep.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "BlankViewStep.h" @@ -62,7 +53,7 @@ BlankViewStep::BlankViewStep( const QString& title, m_widget->setLayout( layout ); } -BlankViewStep::~BlankViewStep() { } +BlankViewStep::~BlankViewStep() {} QString BlankViewStep::prettyName() const diff --git a/src/libcalamaresui/viewpages/BlankViewStep.h b/src/libcalamaresui/viewpages/BlankViewStep.h index ab44205ac..793241647 100644 --- a/src/libcalamaresui/viewpages/BlankViewStep.h +++ b/src/libcalamaresui/viewpages/BlankViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef BLANKVIEWSTEP_H diff --git a/src/libcalamaresui/viewpages/ExecutionViewStep.cpp b/src/libcalamaresui/viewpages/ExecutionViewStep.cpp index 6f3983dc4..fe90e1ec3 100644 --- a/src/libcalamaresui/viewpages/ExecutionViewStep.cpp +++ b/src/libcalamaresui/viewpages/ExecutionViewStep.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ExecutionViewStep.h" diff --git a/src/libcalamaresui/viewpages/ExecutionViewStep.h b/src/libcalamaresui/viewpages/ExecutionViewStep.h index 0edb965a1..26618c77f 100644 --- a/src/libcalamaresui/viewpages/ExecutionViewStep.h +++ b/src/libcalamaresui/viewpages/ExecutionViewStep.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef EXECUTIONVIEWSTEP_H diff --git a/src/libcalamaresui/viewpages/PythonQtGlobalStorageWrapper.cpp b/src/libcalamaresui/viewpages/PythonQtGlobalStorageWrapper.cpp index ba7657b09..0d667a097 100644 --- a/src/libcalamaresui/viewpages/PythonQtGlobalStorageWrapper.cpp +++ b/src/libcalamaresui/viewpages/PythonQtGlobalStorageWrapper.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PythonQtGlobalStorageWrapper.h" diff --git a/src/libcalamaresui/viewpages/PythonQtGlobalStorageWrapper.h b/src/libcalamaresui/viewpages/PythonQtGlobalStorageWrapper.h index 5ccc4e21d..5d1282d0f 100644 --- a/src/libcalamaresui/viewpages/PythonQtGlobalStorageWrapper.h +++ b/src/libcalamaresui/viewpages/PythonQtGlobalStorageWrapper.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PYTHONQTGLOBALSTORAGEWRAPPER_H @@ -40,7 +31,7 @@ class GlobalStorage : public QObject Q_OBJECT public: explicit GlobalStorage( Calamares::GlobalStorage* gs ); - virtual ~GlobalStorage() { } + virtual ~GlobalStorage() {} public slots: bool contains( const QString& key ) const; diff --git a/src/libcalamaresui/viewpages/PythonQtJob.cpp b/src/libcalamaresui/viewpages/PythonQtJob.cpp index 0718df95d..d41c70f1f 100644 --- a/src/libcalamaresui/viewpages/PythonQtJob.cpp +++ b/src/libcalamaresui/viewpages/PythonQtJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PythonQtJob.h" diff --git a/src/libcalamaresui/viewpages/PythonQtJob.h b/src/libcalamaresui/viewpages/PythonQtJob.h index bab073430..4d48921e1 100644 --- a/src/libcalamaresui/viewpages/PythonQtJob.h +++ b/src/libcalamaresui/viewpages/PythonQtJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PYTHONQTJOB_H @@ -44,7 +35,7 @@ class PythonQtJob : public Calamares::Job { Q_OBJECT public: - virtual ~PythonQtJob() { } + virtual ~PythonQtJob() {} QString prettyName() const override; QString prettyDescription() const override; diff --git a/src/libcalamaresui/viewpages/PythonQtUtilsWrapper.cpp b/src/libcalamaresui/viewpages/PythonQtUtilsWrapper.cpp index d16bd56f8..4cd72f8c0 100644 --- a/src/libcalamaresui/viewpages/PythonQtUtilsWrapper.cpp +++ b/src/libcalamaresui/viewpages/PythonQtUtilsWrapper.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PythonQtUtilsWrapper.h" diff --git a/src/libcalamaresui/viewpages/PythonQtUtilsWrapper.h b/src/libcalamaresui/viewpages/PythonQtUtilsWrapper.h index 96de6fe9c..e39249185 100644 --- a/src/libcalamaresui/viewpages/PythonQtUtilsWrapper.h +++ b/src/libcalamaresui/viewpages/PythonQtUtilsWrapper.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PYTHONQTUTILSWRAPPER_H @@ -33,7 +24,7 @@ class Utils : public QObject Q_OBJECT public: explicit Utils( QObject* parent = nullptr ); - virtual ~Utils() { } + virtual ~Utils() {} public slots: void debug( const QString& s ) const; diff --git a/src/libcalamaresui/viewpages/PythonQtViewStep.cpp b/src/libcalamaresui/viewpages/PythonQtViewStep.cpp index 5e313ff98..29c65472f 100644 --- a/src/libcalamaresui/viewpages/PythonQtViewStep.cpp +++ b/src/libcalamaresui/viewpages/PythonQtViewStep.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PythonQtViewStep.h" diff --git a/src/libcalamaresui/viewpages/PythonQtViewStep.h b/src/libcalamaresui/viewpages/PythonQtViewStep.h index 5358bc824..b23a540b9 100644 --- a/src/libcalamaresui/viewpages/PythonQtViewStep.h +++ b/src/libcalamaresui/viewpages/PythonQtViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PYTHONQTVIEWSTEP_H diff --git a/src/libcalamaresui/viewpages/QmlViewStep.cpp b/src/libcalamaresui/viewpages/QmlViewStep.cpp index 6318e47d8..17a1ea79c 100644 --- a/src/libcalamaresui/viewpages/QmlViewStep.cpp +++ b/src/libcalamaresui/viewpages/QmlViewStep.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "QmlViewStep.h" @@ -88,7 +79,7 @@ QmlViewStep::QmlViewStep( QObject* parent ) // QML Loading starts when the configuration for the module is set. } -QmlViewStep::~QmlViewStep() { } +QmlViewStep::~QmlViewStep() {} QString QmlViewStep::prettyName() const diff --git a/src/libcalamaresui/viewpages/QmlViewStep.h b/src/libcalamaresui/viewpages/QmlViewStep.h index dc2af650d..7f04bea81 100644 --- a/src/libcalamaresui/viewpages/QmlViewStep.h +++ b/src/libcalamaresui/viewpages/QmlViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef QMLVIEWSTEP_H diff --git a/src/libcalamaresui/viewpages/Slideshow.cpp b/src/libcalamaresui/viewpages/Slideshow.cpp index 0c75dc390..13f0a3e51 100644 --- a/src/libcalamaresui/viewpages/Slideshow.cpp +++ b/src/libcalamaresui/viewpages/Slideshow.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Slideshow.h" diff --git a/src/libcalamaresui/viewpages/Slideshow.h b/src/libcalamaresui/viewpages/Slideshow.h index f338d44e2..732734755 100644 --- a/src/libcalamaresui/viewpages/Slideshow.h +++ b/src/libcalamaresui/viewpages/Slideshow.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LIBCALAMARESUI_SLIDESHOW_H diff --git a/src/libcalamaresui/viewpages/ViewStep.cpp b/src/libcalamaresui/viewpages/ViewStep.cpp index ad86d06a4..26c7ee778 100644 --- a/src/libcalamaresui/viewpages/ViewStep.cpp +++ b/src/libcalamaresui/viewpages/ViewStep.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ViewStep.h" @@ -31,7 +22,7 @@ ViewStep::ViewStep( QObject* parent ) } -ViewStep::~ViewStep() { } +ViewStep::~ViewStep() {} QString diff --git a/src/libcalamaresui/viewpages/ViewStep.h b/src/libcalamaresui/viewpages/ViewStep.h index 59f307af2..156975fc5 100644 --- a/src/libcalamaresui/viewpages/ViewStep.h +++ b/src/libcalamaresui/viewpages/ViewStep.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef VIEWSTEP_H diff --git a/src/libcalamaresui/widgets/ClickableLabel.cpp b/src/libcalamaresui/widgets/ClickableLabel.cpp index 8f2323fa4..be7b142f1 100644 --- a/src/libcalamaresui/widgets/ClickableLabel.cpp +++ b/src/libcalamaresui/widgets/ClickableLabel.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ClickableLabel.h" @@ -36,7 +27,7 @@ ClickableLabel::ClickableLabel( const QString& text, QWidget* parent ) } -ClickableLabel::~ClickableLabel() { } +ClickableLabel::~ClickableLabel() {} void diff --git a/src/libcalamaresui/widgets/ClickableLabel.h b/src/libcalamaresui/widgets/ClickableLabel.h index f60a247ca..83ddb3d86 100644 --- a/src/libcalamaresui/widgets/ClickableLabel.h +++ b/src/libcalamaresui/widgets/ClickableLabel.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LIBCALAMARESUI_CLICKABLELABEL_H diff --git a/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp b/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp index cf72c9924..195aad67e 100644 --- a/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp +++ b/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "FixedAspectRatioLabel.h" @@ -26,7 +17,7 @@ FixedAspectRatioLabel::FixedAspectRatioLabel( QWidget* parent ) } -FixedAspectRatioLabel::~FixedAspectRatioLabel() { } +FixedAspectRatioLabel::~FixedAspectRatioLabel() {} void diff --git a/src/libcalamaresui/widgets/FixedAspectRatioLabel.h b/src/libcalamaresui/widgets/FixedAspectRatioLabel.h index 9466fcd15..ded7ba602 100644 --- a/src/libcalamaresui/widgets/FixedAspectRatioLabel.h +++ b/src/libcalamaresui/widgets/FixedAspectRatioLabel.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef FIXEDASPECTRATIOLABEL_H diff --git a/src/libcalamaresui/widgets/PrettyRadioButton.cpp b/src/libcalamaresui/widgets/PrettyRadioButton.cpp index 1cf348315..b79f93a25 100644 --- a/src/libcalamaresui/widgets/PrettyRadioButton.cpp +++ b/src/libcalamaresui/widgets/PrettyRadioButton.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PrettyRadioButton.h" diff --git a/src/libcalamaresui/widgets/PrettyRadioButton.h b/src/libcalamaresui/widgets/PrettyRadioButton.h index 9c7139526..6b158f353 100644 --- a/src/libcalamaresui/widgets/PrettyRadioButton.h +++ b/src/libcalamaresui/widgets/PrettyRadioButton.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LIBCALAMARESUI_PRETTYRADIOBUTTON_H @@ -47,7 +38,7 @@ class UIDLLEXPORT PrettyRadioButton : public QWidget Q_OBJECT public: explicit PrettyRadioButton( QWidget* parent = nullptr ); - virtual ~PrettyRadioButton() { } + virtual ~PrettyRadioButton() {} /// @brief Passes @p text on to the ClickableLabel void setText( const QString& text ); diff --git a/src/libcalamaresui/widgets/WaitingWidget.cpp b/src/libcalamaresui/widgets/WaitingWidget.cpp index 1a658b35b..aef5aecf5 100644 --- a/src/libcalamaresui/widgets/WaitingWidget.cpp +++ b/src/libcalamaresui/widgets/WaitingWidget.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "WaitingWidget.h" diff --git a/src/libcalamaresui/widgets/WaitingWidget.h b/src/libcalamaresui/widgets/WaitingWidget.h index 0d8b6fd5b..850b81ca9 100644 --- a/src/libcalamaresui/widgets/WaitingWidget.h +++ b/src/libcalamaresui/widgets/WaitingWidget.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef WAITINGWIDGET_H diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index d49a4c0c0..8e8c67848 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -1,3 +1,9 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + # The variable SKIP_MODULES can be set to skip particular modules; # individual modules can also decide they must be skipped (e.g. OS-specific # modules, or ones with unmet dependencies). Collect the skipped modules @@ -67,9 +73,6 @@ foreach( _category ${_use_categories} ) endif() endforeach() -include( CalamaresAddTranslations ) -add_calamares_python_translations( ${CALAMARES_TRANSLATION_LANGUAGES} ) - # TODO:3.3: Use FindPython3 if ( BUILD_TESTING AND BUILD_SCHEMA_TESTING AND PYTHONINTERP_FOUND AND PYTHON_EXECUTABLE ) # The tests for each config file are independent of whether the diff --git a/src/modules/README.md b/src/modules/README.md index bf74506ee..89085e54e 100644 --- a/src/modules/README.md +++ b/src/modules/README.md @@ -1,5 +1,10 @@ # Calamares modules + + Calamares modules are plugins that provide features like installer pages, batch jobs, etc. An installer page (visible to the user) is called a "view", while other modules are "jobs". diff --git a/src/modules/bootloader/bootloader.conf b/src/modules/bootloader/bootloader.conf index 51337de9d..9f9ad84aa 100644 --- a/src/modules/bootloader/bootloader.conf +++ b/src/modules/bootloader/bootloader.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Bootloader configuration. The bootloader is installed to allow # the system to start (and pick one of the installed operating # systems to run). diff --git a/src/modules/bootloader/bootloader.schema.yaml b/src/modules/bootloader/bootloader.schema.yaml index 4670ea3db..152d3ab72 100644 --- a/src/modules/bootloader/bootloader.schema.yaml +++ b/src/modules/bootloader/bootloader.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/bootloader diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index 87288b583..ec9a6f2e6 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -1,32 +1,23 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Aurélien Gâteau -# Copyright 2014, Anke Boersma -# Copyright 2014, Daniel Hillenbrand -# Copyright 2014, Benjamin Vaudour -# Copyright 2014-2019, Kevin Kofler -# Copyright 2015-2018, Philip Mueller -# Copyright 2016-2017, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2017-2019, Adriaan de Groot -# Copyright 2017, Gabriel Craciunescu -# Copyright 2017, Ben Green +# SPDX-FileCopyrightText: 2014 Aurélien Gâteau +# SPDX-FileCopyrightText: 2014 Anke Boersma +# SPDX-FileCopyrightText: 2014 Daniel Hillenbrand +# SPDX-FileCopyrightText: 2014 Benjamin Vaudour +# SPDX-FileCopyrightText: 2014-2019 Kevin Kofler +# SPDX-FileCopyrightText: 2015-2018 Philip Mueller +# SPDX-FileCopyrightText: 2016-2017 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot +# SPDX-FileCopyrightText: 2017 Gabriel Craciunescu +# SPDX-FileCopyrightText: 2017 Ben Green +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import os import shutil diff --git a/src/modules/bootloader/module.desc b/src/modules/bootloader/module.desc index 083e1f4b5..44a1c0ee5 100644 --- a/src/modules/bootloader/module.desc +++ b/src/modules/bootloader/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" interface: "python" diff --git a/src/modules/bootloader/test.yaml b/src/modules/bootloader/test.yaml index 1cd6c418f..4623b55f7 100644 --- a/src/modules/bootloader/test.yaml +++ b/src/modules/bootloader/test.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 rootMountPoint: /tmp/mount bootLoader: installPath: /dev/sdb diff --git a/src/modules/contextualprocess/Binding.h b/src/modules/contextualprocess/Binding.h index 25b5c7547..fc9f65557 100644 --- a/src/modules/contextualprocess/Binding.h +++ b/src/modules/contextualprocess/Binding.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /* This file isn't public API, but is used to express the API that diff --git a/src/modules/contextualprocess/CMakeLists.txt b/src/modules/contextualprocess/CMakeLists.txt index 2df4cfe37..113b504db 100644 --- a/src/modules/contextualprocess/CMakeLists.txt +++ b/src/modules/contextualprocess/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( contextualprocess TYPE job EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/contextualprocess/ContextualProcessJob.cpp b/src/modules/contextualprocess/ContextualProcessJob.cpp index 1173a3071..8bc011127 100644 --- a/src/modules/contextualprocess/ContextualProcessJob.cpp +++ b/src/modules/contextualprocess/ContextualProcessJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ContextualProcessJob.h" @@ -77,7 +68,7 @@ fetch( QString& value, QStringList& selector, int index, const QVariant& v ) } const QVariantMap map = v.toMap(); const QString& key = selector.at( index ); - if ( index == selector.length() - 1) + if ( index == selector.length() - 1 ) { value = map.value( key ).toString(); return map.contains( key ); diff --git a/src/modules/contextualprocess/ContextualProcessJob.h b/src/modules/contextualprocess/ContextualProcessJob.h index 5ab4b935e..f84afb5f1 100644 --- a/src/modules/contextualprocess/ContextualProcessJob.h +++ b/src/modules/contextualprocess/ContextualProcessJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CONTEXTUALPROCESSJOB_H diff --git a/src/modules/contextualprocess/Tests.cpp b/src/modules/contextualprocess/Tests.cpp index 50ce9f400..aa51e1192 100644 --- a/src/modules/contextualprocess/Tests.cpp +++ b/src/modules/contextualprocess/Tests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Tests.h" diff --git a/src/modules/contextualprocess/Tests.h b/src/modules/contextualprocess/Tests.h index fd705a103..0aed1f4a5 100644 --- a/src/modules/contextualprocess/Tests.h +++ b/src/modules/contextualprocess/Tests.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TESTS_H diff --git a/src/modules/contextualprocess/contextualprocess.conf b/src/modules/contextualprocess/contextualprocess.conf index 0f5972d04..b86fd922c 100644 --- a/src/modules/contextualprocess/contextualprocess.conf +++ b/src/modules/contextualprocess/contextualprocess.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the contextual process job. # # Contextual processes are based on **global** configuration values. diff --git a/src/modules/displaymanager/displaymanager.conf b/src/modules/displaymanager/displaymanager.conf index f6b5a397f..7175c112d 100644 --- a/src/modules/displaymanager/displaymanager.conf +++ b/src/modules/displaymanager/displaymanager.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configure one or more display managers (e.g. SDDM) # with a "best effort" approach. # diff --git a/src/modules/displaymanager/displaymanager.schema.yaml b/src/modules/displaymanager/displaymanager.schema.yaml index 08923f726..fc28fd66d 100644 --- a/src/modules/displaymanager/displaymanager.schema.yaml +++ b/src/modules/displaymanager/displaymanager.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/displaymanager diff --git a/src/modules/displaymanager/main.py b/src/modules/displaymanager/main.py index 1529aab17..a803e0d7a 100644 --- a/src/modules/displaymanager/main.py +++ b/src/modules/displaymanager/main.py @@ -1,28 +1,19 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014-2018, Philip Müller -# Copyright 2014-2015, Teo Mrnjavac -# Copyright 2014, Kevin Kofler -# Copyright 2017, Alf Gaida -# Copyright 2017, Bernhard Landauer -# Copyright 2017, 2019, Adriaan de Groot -# Copyright 2019, Dominic Hayes +# SPDX-FileCopyrightText: 2014-2018 Philip Müller +# SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac +# SPDX-FileCopyrightText: 2014 Kevin Kofler +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2017 Bernhard Landauer +# SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2019 Dominic Hayes +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import abc import os diff --git a/src/modules/displaymanager/module.desc b/src/modules/displaymanager/module.desc index 56d3fcb07..a58941879 100644 --- a/src/modules/displaymanager/module.desc +++ b/src/modules/displaymanager/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "displaymanager" diff --git a/src/modules/dracut/main.py b/src/modules/dracut/main.py index a929ac70b..392dd8a51 100644 --- a/src/modules/dracut/main.py +++ b/src/modules/dracut/main.py @@ -1,25 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014-2015, Philip Müller -# Copyright 2014, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2014-2015 Philip Müller +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares from libcalamares.utils import target_env_call diff --git a/src/modules/dracut/module.desc b/src/modules/dracut/module.desc index 6d808ac88..9029bf66b 100644 --- a/src/modules/dracut/module.desc +++ b/src/modules/dracut/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "dracut" diff --git a/src/modules/dracutlukscfg/CMakeLists.txt b/src/modules/dracutlukscfg/CMakeLists.txt index 1a07b042d..dd9faf9d4 100644 --- a/src/modules/dracutlukscfg/CMakeLists.txt +++ b/src/modules/dracutlukscfg/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( dracutlukscfg TYPE job EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/dracutlukscfg/DracutLuksCfgJob.cpp b/src/modules/dracutlukscfg/DracutLuksCfgJob.cpp index e151acc0c..edd9b2948 100644 --- a/src/modules/dracutlukscfg/DracutLuksCfgJob.cpp +++ b/src/modules/dracutlukscfg/DracutLuksCfgJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Kevin Kofler + * SPDX-FileCopyrightText: 2016 Kevin Kofler + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "DracutLuksCfgJob.h" diff --git a/src/modules/dracutlukscfg/DracutLuksCfgJob.h b/src/modules/dracutlukscfg/DracutLuksCfgJob.h index 52b290d1c..eb517b21d 100644 --- a/src/modules/dracutlukscfg/DracutLuksCfgJob.h +++ b/src/modules/dracutlukscfg/DracutLuksCfgJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Kevin Kofler - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Kevin Kofler + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef DRACUTLUKSCFGJOB_H diff --git a/src/modules/dummycpp/CMakeLists.txt b/src/modules/dummycpp/CMakeLists.txt index 0841eaa2b..e199d5027 100644 --- a/src/modules/dummycpp/CMakeLists.txt +++ b/src/modules/dummycpp/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( dummycpp TYPE job EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/dummycpp/DummyCppJob.cpp b/src/modules/dummycpp/DummyCppJob.cpp index 5a2ca1803..5b2deffd1 100644 --- a/src/modules/dummycpp/DummyCppJob.cpp +++ b/src/modules/dummycpp/DummyCppJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac (original dummypython code) - * Copyright 2016, Kevin Kofler - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac (original dummypython code) + * SPDX-FileCopyrightText: 2016 Kevin Kofler + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "DummyCppJob.h" diff --git a/src/modules/dummycpp/DummyCppJob.h b/src/modules/dummycpp/DummyCppJob.h index bf8625950..2f267d511 100644 --- a/src/modules/dummycpp/DummyCppJob.h +++ b/src/modules/dummycpp/DummyCppJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Kevin Kofler - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Kevin Kofler + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef DUMMYCPPJOB_H diff --git a/src/modules/dummycpp/dummycpp.conf b/src/modules/dummycpp/dummycpp.conf index 1f2e1daee..b00a42825 100644 --- a/src/modules/dummycpp/dummycpp.conf +++ b/src/modules/dummycpp/dummycpp.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # This is a dummy (example) module for C++ Jobs. # # The code is the documentation for the configuration file. diff --git a/src/modules/dummycpp/module.desc b/src/modules/dummycpp/module.desc index 11b9c500c..bc768a17a 100644 --- a/src/modules/dummycpp/module.desc +++ b/src/modules/dummycpp/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # Module metadata file for dummycpp job # # The metadata for C++ (qtplugin) plugins is almost never interesting: diff --git a/src/modules/dummyprocess/module.desc b/src/modules/dummyprocess/module.desc index 55d11cfab..a329b7725 100644 --- a/src/modules/dummyprocess/module.desc +++ b/src/modules/dummyprocess/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # Module metadata file for dummy process jobmodule # Syntax is YAML 1.2 --- diff --git a/src/modules/dummypython/dummypython.conf b/src/modules/dummypython/dummypython.conf index c700120e7..6ea50c5d1 100644 --- a/src/modules/dummypython/dummypython.conf +++ b/src/modules/dummypython/dummypython.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # This is a dummy (example) module for a Python Job Module. # # The code is the documentation for the configuration file. diff --git a/src/modules/dummypython/main.py b/src/modules/dummypython/main.py index 96de6030f..aa748006d 100644 --- a/src/modules/dummypython/main.py +++ b/src/modules/dummypython/main.py @@ -1,24 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2017, Adriaan de Groot +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2017 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . """ === Example Python jobmodule. diff --git a/src/modules/dummypython/module.desc b/src/modules/dummypython/module.desc index ebe81af1a..52c1d09d2 100644 --- a/src/modules/dummypython/module.desc +++ b/src/modules/dummypython/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # Module metadata file for dummy python jobmodule # Syntax is YAML 1.2 --- diff --git a/src/modules/dummypythonqt/dummypythonqt.conf b/src/modules/dummypythonqt/dummypythonqt.conf index 5bc64abfa..6caf9cc18 100644 --- a/src/modules/dummypythonqt/dummypythonqt.conf +++ b/src/modules/dummypythonqt/dummypythonqt.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # This is a dummy (example) module for PythonQt. # # The code is the documentation for the configuration file. diff --git a/src/modules/dummypythonqt/lang/ar/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ar/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 96b7a6c53..000000000 Binary files a/src/modules/dummypythonqt/lang/ar/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/as/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/as/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 8192eb723..000000000 Binary files a/src/modules/dummypythonqt/lang/as/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ast/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ast/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index bbe53ce95..000000000 Binary files a/src/modules/dummypythonqt/lang/ast/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/be/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/be/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 2a7ecc372..000000000 Binary files a/src/modules/dummypythonqt/lang/be/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index cbd832bc7..000000000 Binary files a/src/modules/dummypythonqt/lang/bg/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/bn/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/bn/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index a8045f8df..000000000 Binary files a/src/modules/dummypythonqt/lang/bn/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ca/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ca/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 988a78d7e..000000000 Binary files a/src/modules/dummypythonqt/lang/ca/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ca@valencia/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ca@valencia/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index b22984ed7..000000000 Binary files a/src/modules/dummypythonqt/lang/ca@valencia/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/cs_CZ/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/cs_CZ/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index c83734ac0..000000000 Binary files a/src/modules/dummypythonqt/lang/cs_CZ/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/da/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/da/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 1e836027f..000000000 Binary files a/src/modules/dummypythonqt/lang/da/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/de/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/de/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 9af7a6614..000000000 Binary files a/src/modules/dummypythonqt/lang/de/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/el/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/el/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 6f98c92cc..000000000 Binary files a/src/modules/dummypythonqt/lang/el/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/en_GB/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/en_GB/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 283b865e9..000000000 Binary files a/src/modules/dummypythonqt/lang/en_GB/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/eo/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/eo/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index ad243b6ea..000000000 Binary files a/src/modules/dummypythonqt/lang/eo/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/es/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/es/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 5fcc8a7de..000000000 Binary files a/src/modules/dummypythonqt/lang/es/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/es_MX/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/es_MX/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 54ca84802..000000000 Binary files a/src/modules/dummypythonqt/lang/es_MX/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/es_PR/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/es_PR/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index db7159023..000000000 Binary files a/src/modules/dummypythonqt/lang/es_PR/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/et/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/et/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index cdb2466fa..000000000 Binary files a/src/modules/dummypythonqt/lang/et/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/eu/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/eu/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 43448bf58..000000000 Binary files a/src/modules/dummypythonqt/lang/eu/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/fa/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/fa/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 19f444cdd..000000000 Binary files a/src/modules/dummypythonqt/lang/fa/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/fi_FI/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/fi_FI/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index fcc562306..000000000 Binary files a/src/modules/dummypythonqt/lang/fi_FI/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/fr/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/fr/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index b8d951621..000000000 Binary files a/src/modules/dummypythonqt/lang/fr/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/fr_CH/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/fr_CH/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 17561fc31..000000000 Binary files a/src/modules/dummypythonqt/lang/fr_CH/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/gl/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/gl/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 33cbe602c..000000000 Binary files a/src/modules/dummypythonqt/lang/gl/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/gu/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/gu/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index bd8794f5a..000000000 Binary files a/src/modules/dummypythonqt/lang/gu/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/he/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/he/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index e6061d7c4..000000000 Binary files a/src/modules/dummypythonqt/lang/he/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/hi/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/hi/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 9c22e2c82..000000000 Binary files a/src/modules/dummypythonqt/lang/hi/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/hr/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/hr/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 6d12c7ddc..000000000 Binary files a/src/modules/dummypythonqt/lang/hr/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/hu/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/hu/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index afc284949..000000000 Binary files a/src/modules/dummypythonqt/lang/hu/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/id/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/id/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index faf378083..000000000 Binary files a/src/modules/dummypythonqt/lang/id/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/is/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/is/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index b2f98c8d3..000000000 Binary files a/src/modules/dummypythonqt/lang/is/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/it_IT/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/it_IT/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index c1989cc8f..000000000 Binary files a/src/modules/dummypythonqt/lang/it_IT/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ja/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ja/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 4d131a0f8..000000000 Binary files a/src/modules/dummypythonqt/lang/ja/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/kk/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/kk/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index bd70c8130..000000000 Binary files a/src/modules/dummypythonqt/lang/kk/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/kn/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/kn/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index fa0c9819a..000000000 Binary files a/src/modules/dummypythonqt/lang/kn/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ko/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ko/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 9f6a1c4e6..000000000 Binary files a/src/modules/dummypythonqt/lang/ko/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/lo/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/lo/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 61b880bb7..000000000 Binary files a/src/modules/dummypythonqt/lang/lo/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/lt/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/lt/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index c42841514..000000000 Binary files a/src/modules/dummypythonqt/lang/lt/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/lv/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/lv/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index cdb444be0..000000000 Binary files a/src/modules/dummypythonqt/lang/lv/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/mk/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/mk/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index bad77684e..000000000 Binary files a/src/modules/dummypythonqt/lang/mk/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ml/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ml/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 258ea94f6..000000000 Binary files a/src/modules/dummypythonqt/lang/ml/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/mr/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/mr/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 48aca7e96..000000000 Binary files a/src/modules/dummypythonqt/lang/mr/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/nb/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/nb/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 549cfa6b5..000000000 Binary files a/src/modules/dummypythonqt/lang/nb/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ne_NP/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ne_NP/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 020b2e549..000000000 Binary files a/src/modules/dummypythonqt/lang/ne_NP/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/nl/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/nl/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 95b99b007..000000000 Binary files a/src/modules/dummypythonqt/lang/nl/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/pl/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/pl/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index a0bf42817..000000000 Binary files a/src/modules/dummypythonqt/lang/pl/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/pt_BR/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/pt_BR/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 5ef78795b..000000000 Binary files a/src/modules/dummypythonqt/lang/pt_BR/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/pt_PT/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/pt_PT/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 3845d3070..000000000 Binary files a/src/modules/dummypythonqt/lang/pt_PT/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ro/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ro/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index b07421664..000000000 Binary files a/src/modules/dummypythonqt/lang/ro/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ru/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ru/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 931086b0d..000000000 Binary files a/src/modules/dummypythonqt/lang/ru/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/sk/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/sk/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index db7fccbbf..000000000 Binary files a/src/modules/dummypythonqt/lang/sk/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/sl/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/sl/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 763803202..000000000 Binary files a/src/modules/dummypythonqt/lang/sl/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/sq/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/sq/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index b7daa29f5..000000000 Binary files a/src/modules/dummypythonqt/lang/sq/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/sr/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/sr/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 5c8099cd4..000000000 Binary files a/src/modules/dummypythonqt/lang/sr/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/sr@latin/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/sr@latin/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 9f59500bd..000000000 Binary files a/src/modules/dummypythonqt/lang/sr@latin/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/sv/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/sv/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index eb7d7d69d..000000000 Binary files a/src/modules/dummypythonqt/lang/sv/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/th/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/th/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 502e4d130..000000000 Binary files a/src/modules/dummypythonqt/lang/th/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 9e62f7154..000000000 Binary files a/src/modules/dummypythonqt/lang/tr_TR/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/uk/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/uk/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 6b860e05c..000000000 Binary files a/src/modules/dummypythonqt/lang/uk/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/ur/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/ur/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index e7588670d..000000000 Binary files a/src/modules/dummypythonqt/lang/ur/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/uz/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/uz/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 4e1a2c34a..000000000 Binary files a/src/modules/dummypythonqt/lang/uz/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/zh_CN/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/zh_CN/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index 61ec39334..000000000 Binary files a/src/modules/dummypythonqt/lang/zh_CN/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/lang/zh_TW/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/zh_TW/LC_MESSAGES/dummypythonqt.mo deleted file mode 100644 index f13ff2d5f..000000000 Binary files a/src/modules/dummypythonqt/lang/zh_TW/LC_MESSAGES/dummypythonqt.mo and /dev/null differ diff --git a/src/modules/dummypythonqt/main.py b/src/modules/dummypythonqt/main.py index f830caf30..e33c20e6f 100644 --- a/src/modules/dummypythonqt/main.py +++ b/src/modules/dummypythonqt/main.py @@ -1,23 +1,14 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2016-2017, Teo Mrnjavac -# Copyright 2017, Alf Gaida +# SPDX-FileCopyrightText: 2016-2017 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import platform diff --git a/src/modules/dummypythonqt/module.desc b/src/modules/dummypythonqt/module.desc index 46633a6db..a747daeaa 100644 --- a/src/modules/dummypythonqt/module.desc +++ b/src/modules/dummypythonqt/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # Module metadata file for dummy pythonqt jobmodule # Syntax is YAML 1.2 --- diff --git a/src/modules/finished/CMakeLists.txt b/src/modules/finished/CMakeLists.txt index 6482fb2cd..21eb1ad18 100644 --- a/src/modules/finished/CMakeLists.txt +++ b/src/modules/finished/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED DBus Network ) include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) diff --git a/src/modules/finished/FinishedPage.cpp b/src/modules/finished/FinishedPage.cpp index e2ad4a24f..23f09df99 100644 --- a/src/modules/finished/FinishedPage.cpp +++ b/src/modules/finished/FinishedPage.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "FinishedPage.h" @@ -100,7 +91,7 @@ FinishedPage::setUpRestart() cDebug() << "FinishedPage::setUpRestart(), Quit button" << "setup=" << FinishedViewStep::modeName( m_mode ) << "command=" << m_restartNowCommand; - connect( qApp, &QApplication::aboutToQuit, [ this ]() { + connect( qApp, &QApplication::aboutToQuit, [this]() { if ( ui->restartCheckBox->isVisible() && ui->restartCheckBox->isChecked() ) { cDebug() << "Running restart command" << m_restartNowCommand; diff --git a/src/modules/finished/FinishedPage.h b/src/modules/finished/FinishedPage.h index 40f437e07..1df022f58 100644 --- a/src/modules/finished/FinishedPage.h +++ b/src/modules/finished/FinishedPage.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef FINISHEDPAGE_H diff --git a/src/modules/finished/FinishedPage.ui b/src/modules/finished/FinishedPage.ui index a5b4a9280..c02952b63 100644 --- a/src/modules/finished/FinishedPage.ui +++ b/src/modules/finished/FinishedPage.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + FinishedPage diff --git a/src/modules/finished/FinishedViewStep.cpp b/src/modules/finished/FinishedViewStep.cpp index 7e4cf1c6b..525108dc7 100644 --- a/src/modules/finished/FinishedViewStep.cpp +++ b/src/modules/finished/FinishedViewStep.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, 2019, Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "FinishedViewStep.h" diff --git a/src/modules/finished/FinishedViewStep.h b/src/modules/finished/FinishedViewStep.h index 8f57d0210..97d38b267 100644 --- a/src/modules/finished/FinishedViewStep.h +++ b/src/modules/finished/FinishedViewStep.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef FINISHEDVIEWSTEP_H diff --git a/src/modules/finished/finished.conf b/src/modules/finished/finished.conf index 3b6dd9dd1..7abfb36f1 100644 --- a/src/modules/finished/finished.conf +++ b/src/modules/finished/finished.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the "finished" page, which is usually shown only at # the end of the installation (successful or not). --- diff --git a/src/modules/finished/finished.schema.yaml b/src/modules/finished/finished.schema.yaml index 53189c7fa..380292d1b 100644 --- a/src/modules/finished/finished.schema.yaml +++ b/src/modules/finished/finished.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/finished diff --git a/src/modules/fsresizer/CMakeLists.txt b/src/modules/fsresizer/CMakeLists.txt index 6808f1bea..7fdea1ff2 100644 --- a/src/modules/fsresizer/CMakeLists.txt +++ b/src/modules/fsresizer/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# find_package( KPMcore 3.3 ) find_package( KF5Config CONFIG ) find_package( KF5I18n CONFIG ) diff --git a/src/modules/fsresizer/ResizeFSJob.cpp b/src/modules/fsresizer/ResizeFSJob.cpp index 217f1315e..9f2b440b8 100644 --- a/src/modules/fsresizer/ResizeFSJob.cpp +++ b/src/modules/fsresizer/ResizeFSJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ResizeFSJob.h" @@ -26,8 +17,8 @@ #include "utils/Units.h" #include "utils/Variant.h" -#include #include +#include #include #include @@ -46,9 +37,7 @@ ResizeFSJob::ResizeFSJob( QObject* parent ) } -ResizeFSJob::~ResizeFSJob() -{ -} +ResizeFSJob::~ResizeFSJob() {} QString @@ -62,7 +51,8 @@ ResizeFSJob::findPartition() { using DeviceList = QList< Device* >; #if defined( WITH_KPMCORE4API ) - DeviceList devices = m_kpmcore.backend()->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) ); + DeviceList devices + = m_kpmcore.backend()->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag( 0 ) ); #else DeviceList devices = m_kpmcore.backend()->scanDevices( /* excludeReadOnly */ true ); #endif @@ -70,14 +60,17 @@ ResizeFSJob::findPartition() cDebug() << "ResizeFSJob found" << devices.count() << "devices."; for ( DeviceList::iterator dev_it = devices.begin(); dev_it != devices.end(); ++dev_it ) { - if ( ! ( *dev_it ) ) - continue; - cDebug() << "ResizeFSJob found" << ( *dev_it )->deviceNode(); - for ( auto part_it = PartitionIterator::begin( *dev_it ); part_it != PartitionIterator::end( *dev_it ); ++part_it ) + if ( !( *dev_it ) ) { - cDebug() << Logger::SubEntry << ( *part_it )->mountPoint() << "on" << ( *part_it )->deviceNode(); - if ( ( !m_fsname.isEmpty() && ( *part_it )->mountPoint() == m_fsname ) || - ( !m_devicename.isEmpty() && ( *part_it )->deviceNode() == m_devicename ) ) + continue; + } + cDebug() << "ResizeFSJob found" << ( *dev_it )->deviceNode(); + for ( auto part_it = PartitionIterator::begin( *dev_it ); part_it != PartitionIterator::end( *dev_it ); + ++part_it ) + { + cDebug() << Logger::SubEntry << ( *part_it )->mountPoint() << "on" << ( *part_it )->deviceNode(); + if ( ( !m_fsname.isEmpty() && ( *part_it )->mountPoint() == m_fsname ) + || ( !m_devicename.isEmpty() && ( *part_it )->deviceNode() == m_devicename ) ) { cDebug() << Logger::SubEntry << "matched configuration dev=" << m_devicename << "fs=" << m_fsname; return PartitionMatch( *dev_it, *part_it ); @@ -101,11 +94,17 @@ qint64 ResizeFSJob::findGrownEnd( ResizeFSJob::PartitionMatch m ) { if ( !m.first || !m.second ) + { return -1; // Missing device data + } if ( !ResizeOperation::canGrow( m.second ) ) + { return -1; // Operation is doomed + } if ( !m_size.isValid() ) + { return -1; // Must have a grow-size + } cDebug() << "Containing device size" << m.first->totalLogical(); qint64 last_available = m.first->totalLogical() - 1; // Numbered from 0 @@ -170,12 +169,11 @@ ResizeFSJob::exec() tr( "Invalid configuration" ), tr( "The file-system resize job has an invalid configuration and will not run." ) ); - if ( !m_kpmcore) + if ( !m_kpmcore ) { cWarning() << "Could not load KPMCore backend (2)."; - return Calamares::JobResult::error( - tr( "KPMCore not Available" ), - tr( "Calamares cannot start KPMCore for the file-system resize job." ) ); + return Calamares::JobResult::error( tr( "KPMCore not Available" ), + tr( "Calamares cannot start KPMCore for the file-system resize job." ) ); } m_kpmcore.backend()->initFSSupport(); // Might not be enough, see below @@ -184,34 +182,32 @@ ResizeFSJob::exec() if ( !m.first || !m.second ) return Calamares::JobResult::error( tr( "Resize Failed" ), - !m_fsname.isEmpty() ? tr( "The filesystem %1 could not be found in this system, and cannot be resized." ).arg( m_fsname ) - : tr( "The device %1 could not be found in this system, and cannot be resized." ).arg( m_devicename ) ); + !m_fsname.isEmpty() + ? tr( "The filesystem %1 could not be found in this system, and cannot be resized." ).arg( m_fsname ) + : tr( "The device %1 could not be found in this system, and cannot be resized." ).arg( m_devicename ) ); m.second->fileSystem().init(); // Initialize support for specific FS if ( !ResizeOperation::canGrow( m.second ) ) { cDebug() << "canGrow() returned false."; - return Calamares::JobResult::error( - tr( "Resize Failed" ), - !m_fsname.isEmpty() ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname ) - : tr( "The device %1 cannot be resized." ).arg( m_devicename ) ); + return Calamares::JobResult::error( tr( "Resize Failed" ), + !m_fsname.isEmpty() + ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname ) + : tr( "The device %1 cannot be resized." ).arg( m_devicename ) ); } qint64 new_end = findGrownEnd( m ); - cDebug() << "Resize from" - << m.second->firstSector() << '-' << m.second->lastSector() - << '(' << m.second->length() << ')' - << "to -" << new_end; + cDebug() << "Resize from" << m.second->firstSector() << '-' << m.second->lastSector() << '(' << m.second->length() + << ')' << "to -" << new_end; if ( new_end < 0 ) - return Calamares::JobResult::error( - tr( "Resize Failed" ), - !m_fsname.isEmpty() ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname ) - : tr( "The device %1 cannot be resized." ).arg( m_devicename ) ); + return Calamares::JobResult::error( tr( "Resize Failed" ), + !m_fsname.isEmpty() + ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname ) + : tr( "The device %1 cannot be resized." ).arg( m_devicename ) ); if ( new_end == 0 ) { - cWarning() << "Resize operation on" << m_fsname << m_devicename - << "skipped as not-useful."; + cWarning() << "Resize operation on" << m_fsname << m_devicename << "skipped as not-useful."; if ( m_required ) return Calamares::JobResult::error( tr( "Resize Failed" ), @@ -226,13 +222,13 @@ ResizeFSJob::exec() ResizeOperation op( *m.first, *m.second, m.second->firstSector(), new_end ); Report op_report( nullptr ); if ( op.execute( op_report ) ) + { cDebug() << "Resize operation OK."; + } else { cDebug() << "Resize failed." << op_report.output(); - return Calamares::JobResult::error( - tr( "Resize Failed" ), - op_report.toText() ); + return Calamares::JobResult::error( tr( "Resize Failed" ), op_report.toText() ); } } @@ -243,8 +239,8 @@ ResizeFSJob::exec() void ResizeFSJob::setConfigurationMap( const QVariantMap& configurationMap ) { - m_fsname = configurationMap["fs"].toString(); - m_devicename = configurationMap["dev"].toString(); + m_fsname = configurationMap[ "fs" ].toString(); + m_devicename = configurationMap[ "dev" ].toString(); if ( m_fsname.isEmpty() && m_devicename.isEmpty() ) { @@ -252,10 +248,10 @@ ResizeFSJob::setConfigurationMap( const QVariantMap& configurationMap ) return; } - m_size = PartitionSize( configurationMap["size"].toString() ); - m_atleast = PartitionSize( configurationMap["atleast"].toString() ); + m_size = PartitionSize( configurationMap[ "size" ].toString() ); + m_atleast = PartitionSize( configurationMap[ "atleast" ].toString() ); m_required = CalamaresUtils::getBool( configurationMap, "required", false ); } -CALAMARES_PLUGIN_FACTORY_DEFINITION( ResizeFSJobFactory, registerPlugin(); ) +CALAMARES_PLUGIN_FACTORY_DEFINITION( ResizeFSJobFactory, registerPlugin< ResizeFSJob >(); ) diff --git a/src/modules/fsresizer/ResizeFSJob.h b/src/modules/fsresizer/ResizeFSJob.h index f7ff676cd..5c9c961a5 100644 --- a/src/modules/fsresizer/ResizeFSJob.h +++ b/src/modules/fsresizer/ResizeFSJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef RESIZEFSJOB_H @@ -51,26 +42,13 @@ public: void setConfigurationMap( const QVariantMap& configurationMap ) override; /** @brief Is the configuration of this job valid? */ - bool isValid() const - { - return ( !m_fsname.isEmpty() || !m_devicename.isEmpty() ) && - m_size.isValid(); - } + bool isValid() const { return ( !m_fsname.isEmpty() || !m_devicename.isEmpty() ) && m_size.isValid(); } - QString name() const - { - return m_fsname.isEmpty() ? m_devicename : m_fsname; - } + QString name() const { return m_fsname.isEmpty() ? m_devicename : m_fsname; } - PartitionSize size() const - { - return m_size; - } + PartitionSize size() const { return m_size; } - PartitionSize minimumSize() const - { - return m_atleast; - } + PartitionSize minimumSize() const { return m_atleast; } private: CalamaresUtils::Partition::KPMManager m_kpmcore; @@ -80,7 +58,7 @@ private: QString m_devicename; bool m_required; - using PartitionMatch = QPair; + using PartitionMatch = QPair< Device*, Partition* >; /** @brief Find the configured FS */ PartitionMatch findPartition(); @@ -90,4 +68,4 @@ private: CALAMARES_PLUGIN_FACTORY_DECLARATION( ResizeFSJobFactory ) -#endif // RESIZEFSJOB_H +#endif // RESIZEFSJOB_H diff --git a/src/modules/fsresizer/Tests.cpp b/src/modules/fsresizer/Tests.cpp index 42d587631..7cd60ee9e 100644 --- a/src/modules/fsresizer/Tests.cpp +++ b/src/modules/fsresizer/Tests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Tests.h" @@ -36,20 +27,17 @@ using SizeUnit = CalamaresUtils::Partition::SizeUnit; QTEST_GUILESS_MAIN( FSResizerTests ) -FSResizerTests::FSResizerTests() -{ -} +FSResizerTests::FSResizerTests() {} -FSResizerTests::~FSResizerTests() -{ -} +FSResizerTests::~FSResizerTests() {} void FSResizerTests::initTestCase() { } -void FSResizerTests::testConfigurationRobust() +void +FSResizerTests::testConfigurationRobust() { ResizeFSJob j; @@ -72,7 +60,8 @@ atleast: 600MiB QCOMPARE( j.minimumSize().value(), 0 ); } -void FSResizerTests::testConfigurationValues() +void +FSResizerTests::testConfigurationValues() { ResizeFSJob j; @@ -84,7 +73,7 @@ atleast: 600MiB )" ); j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) ); QVERIFY( !j.name().isEmpty() ); - QCOMPARE( j.name(), QString("/") ); + QCOMPARE( j.name(), QString( "/" ) ); QCOMPARE( j.size().unit(), SizeUnit::Percent ); QCOMPARE( j.minimumSize().unit(), SizeUnit::MiB ); QCOMPARE( j.size().value(), 100 ); @@ -99,7 +88,7 @@ atleast: 127 % )" ); j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) ); QVERIFY( !j.name().isEmpty() ); - QCOMPARE( j.name(), QString("/") ); + QCOMPARE( j.name(), QString( "/" ) ); QCOMPARE( j.size().unit(), SizeUnit::MiB ); QCOMPARE( j.minimumSize().unit(), SizeUnit::None ); QCOMPARE( j.size().value(), 72 ); @@ -113,7 +102,7 @@ atleast: 127 % )" ); j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) ); QVERIFY( !j.name().isEmpty() ); - QCOMPARE( j.name(), QString("/dev/m00") ); + QCOMPARE( j.name(), QString( "/dev/m00" ) ); QCOMPARE( j.size().unit(), SizeUnit::MiB ); QCOMPARE( j.minimumSize().unit(), SizeUnit::None ); QCOMPARE( j.size().value(), 72 ); @@ -128,7 +117,7 @@ size: 71MiB )" ); j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) ); QVERIFY( !j.name().isEmpty() ); - QCOMPARE( j.name(), QString("/") ); + QCOMPARE( j.name(), QString( "/" ) ); QCOMPARE( j.size().unit(), SizeUnit::MiB ); QCOMPARE( j.minimumSize().unit(), SizeUnit::None ); QCOMPARE( j.size().value(), 71 ); diff --git a/src/modules/fsresizer/Tests.h b/src/modules/fsresizer/Tests.h index 958c0e655..f3d2308ec 100644 --- a/src/modules/fsresizer/Tests.h +++ b/src/modules/fsresizer/Tests.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TESTS_H diff --git a/src/modules/fsresizer/fsresizer.conf b/src/modules/fsresizer/fsresizer.conf index 33329248d..e58c39822 100644 --- a/src/modules/fsresizer/fsresizer.conf +++ b/src/modules/fsresizer/fsresizer.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Module that resizes a single FS to fill the entire (rest) of # a device. This is used in OEM situations where an image is # flashed onto an SD card (or similar) and used to boot a device, diff --git a/src/modules/fstab/fstab.conf b/src/modules/fstab/fstab.conf index db66488ac..a14165e15 100644 --- a/src/modules/fstab/fstab.conf +++ b/src/modules/fstab/fstab.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Creates /etc/fstab and /etc/crypttab in the target system. # Also creates mount points for all the filesystems. # diff --git a/src/modules/fstab/fstab.schema.yaml b/src/modules/fstab/fstab.schema.yaml index 5b54d767f..fc68fd2c5 100644 --- a/src/modules/fstab/fstab.schema.yaml +++ b/src/modules/fstab/fstab.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/fstab diff --git a/src/modules/fstab/main.py b/src/modules/fstab/main.py index c58e8eb11..26c357945 100644 --- a/src/modules/fstab/main.py +++ b/src/modules/fstab/main.py @@ -1,25 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Aurélien Gâteau -# Copyright 2016, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2014 Aurélien Gâteau +# SPDX-FileCopyrightText: 2016 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import os import re diff --git a/src/modules/fstab/module.desc b/src/modules/fstab/module.desc index bbd416606..77cb7adbc 100644 --- a/src/modules/fstab/module.desc +++ b/src/modules/fstab/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "fstab" diff --git a/src/modules/fstab/test.yaml b/src/modules/fstab/test.yaml index e95b52e5d..cd2034571 100644 --- a/src/modules/fstab/test.yaml +++ b/src/modules/fstab/test.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 rootMountPoint: /tmp/mount partitions: - device: /dev/sda1 diff --git a/src/modules/grubcfg/grubcfg.conf b/src/modules/grubcfg/grubcfg.conf index 374561787..33c2a72ab 100644 --- a/src/modules/grubcfg/grubcfg.conf +++ b/src/modules/grubcfg/grubcfg.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Create, overwrite or update /etc/default/grub in the target system. # # Write lines to /etc/default/grub (in the target system) based diff --git a/src/modules/grubcfg/grubcfg.schema.yaml b/src/modules/grubcfg/grubcfg.schema.yaml index f010ac694..f1bf2cc03 100644 --- a/src/modules/grubcfg/grubcfg.schema.yaml +++ b/src/modules/grubcfg/grubcfg.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/grubcfg diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py index fa93c0dc9..96a2f55af 100644 --- a/src/modules/grubcfg/main.py +++ b/src/modules/grubcfg/main.py @@ -1,26 +1,17 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014-2019, Philip Müller -# Copyright 2015-2017, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2017, 2019, Adriaan de Groot -# Copyright 2017-2018, Gabriel Craciunescu +# SPDX-FileCopyrightText: 2014-2015,2019 Philip Müller +# SPDX-FileCopyrightText: 2015-2017 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2017-2018 Gabriel Craciunescu +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares import os diff --git a/src/modules/grubcfg/module.desc b/src/modules/grubcfg/module.desc index 34f1a5a1e..293e75ba7 100644 --- a/src/modules/grubcfg/module.desc +++ b/src/modules/grubcfg/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "grubcfg" diff --git a/src/modules/grubcfg/tests/1.global b/src/modules/grubcfg/tests/1.global index 02ae840cb..7dedc1527 100644 --- a/src/modules/grubcfg/tests/1.global +++ b/src/modules/grubcfg/tests/1.global @@ -1,2 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- bogus: true diff --git a/src/modules/grubcfg/tests/2.global b/src/modules/grubcfg/tests/2.global index 88f789630..31c6f1166 100644 --- a/src/modules/grubcfg/tests/2.global +++ b/src/modules/grubcfg/tests/2.global @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- bogus: true firmwareType: bios diff --git a/src/modules/grubcfg/tests/2.job b/src/modules/grubcfg/tests/2.job index d7b8db9d1..92e598394 100644 --- a/src/modules/grubcfg/tests/2.job +++ b/src/modules/grubcfg/tests/2.job @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- overwrite: true keepDistributor: false diff --git a/src/modules/grubcfg/tests/3.global b/src/modules/grubcfg/tests/3.global index 45468d4df..f9e1e6954 100644 --- a/src/modules/grubcfg/tests/3.global +++ b/src/modules/grubcfg/tests/3.global @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- bogus: true firmwareType: bios diff --git a/src/modules/grubcfg/tests/3.job b/src/modules/grubcfg/tests/3.job index 7182deeb2..7d579839c 100644 --- a/src/modules/grubcfg/tests/3.job +++ b/src/modules/grubcfg/tests/3.job @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- overwrite: true prefer_grub_d: true # But it doesn't exist diff --git a/src/modules/grubcfg/tests/4.global b/src/modules/grubcfg/tests/4.global index fe24ba6ca..1e8d37fc6 100644 --- a/src/modules/grubcfg/tests/4.global +++ b/src/modules/grubcfg/tests/4.global @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- bogus: true firmwareType: bios diff --git a/src/modules/grubcfg/tests/4.job b/src/modules/grubcfg/tests/4.job index f8f30f21b..58fd8bcb7 100644 --- a/src/modules/grubcfg/tests/4.job +++ b/src/modules/grubcfg/tests/4.job @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- overwrite: true prefer_grub_d: true diff --git a/src/modules/grubcfg/tests/CMakeTests.txt b/src/modules/grubcfg/tests/CMakeTests.txt index 78a0f85ac..54a0721e4 100644 --- a/src/modules/grubcfg/tests/CMakeTests.txt +++ b/src/modules/grubcfg/tests/CMakeTests.txt @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Special cases for grubcfg configuration tests: # - 2.global specifies /tmp/calamares as the rootMountPath, # so we end up editing files there. Create the directory diff --git a/src/modules/hostinfo/CMakeLists.txt b/src/modules/hostinfo/CMakeLists.txt index 3d6e0973f..cdf5857e6 100644 --- a/src/modules/hostinfo/CMakeLists.txt +++ b/src/modules/hostinfo/CMakeLists.txt @@ -1,3 +1,9 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + # Configuration for hostinfo # # There isn't anything to configure for the hostinfo module. diff --git a/src/modules/hostinfo/HostInfoJob.cpp b/src/modules/hostinfo/HostInfoJob.cpp index 90c9cd515..0be419978 100644 --- a/src/modules/hostinfo/HostInfoJob.cpp +++ b/src/modules/hostinfo/HostInfoJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "HostInfoJob.h" @@ -123,7 +114,7 @@ hostCPUmatchARM( const QString& s ) * silicon. For instance, a list from lscpu-arm.c (Linux kernel) * shows this: * -static const struct hw_impl hw_implementer[] = { + static const struct hw_impl hw_implementer[] = { { 0x41, arm_part, "ARM" }, { 0x42, brcm_part, "Broadcom" }, { 0x43, cavium_part, "Cavium" }, @@ -137,7 +128,7 @@ static const struct hw_impl hw_implementer[] = { { 0x66, faraday_part, "Faraday" }, { 0x69, intel_part, "Intel" }, { -1, unknown_part, "unknown" }, -}; + }; * * Since the specific implementor isn't interesting, just * map everything to "ARM". diff --git a/src/modules/hostinfo/HostInfoJob.h b/src/modules/hostinfo/HostInfoJob.h index 5db169b0e..d9b450ac4 100644 --- a/src/modules/hostinfo/HostInfoJob.h +++ b/src/modules/hostinfo/HostInfoJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef HOSTINFOJOB_H diff --git a/src/modules/hostinfo/Tests.cpp b/src/modules/hostinfo/Tests.cpp index 7ab797ed4..724340269 100644 --- a/src/modules/hostinfo/Tests.cpp +++ b/src/modules/hostinfo/Tests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "HostInfoJob.h" @@ -63,8 +54,8 @@ HostInfoTests::testHostOS() // This is a lousy test, too: the implementation reads /proc/cpuinfo // and that's the only way we could use, too, to find what the "right" // answer is. - QStringList x86cpunames{ QStringLiteral( "Intel" ), QStringLiteral( "AMD" ) }; - QStringList armcpunames{ QStringLiteral( "ARM" ) }; + QStringList x86cpunames { QStringLiteral( "Intel" ), QStringLiteral( "AMD" ) }; + QStringList armcpunames { QStringLiteral( "ARM" ) }; const QString cpu = hostCPU(); QVERIFY( x86cpunames.contains( cpu ) || armcpunames.contains( cpu ) ); @@ -83,7 +74,7 @@ HostInfoTests::testHostOS() } else { - QCOMPARE( cpu, QString( "Unknown CPU modalias '%1'" ).arg(cpumodalias) ); + QCOMPARE( cpu, QString( "Unknown CPU modalias '%1'" ).arg( cpumodalias ) ); } } } diff --git a/src/modules/hwclock/main.py b/src/modules/hwclock/main.py index f18cf12a9..be9fabf5f 100644 --- a/src/modules/hwclock/main.py +++ b/src/modules/hwclock/main.py @@ -1,26 +1,17 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014 - 2015, Philip Müller -# Copyright 2014, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2017-2018, Gabriel Craciunescu -# Copyright 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2014-2015 Philip Müller +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2017-2018 Gabriel Craciunescu +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares diff --git a/src/modules/hwclock/module.desc b/src/modules/hwclock/module.desc index ba3dbbaf8..d13435b3c 100644 --- a/src/modules/hwclock/module.desc +++ b/src/modules/hwclock/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "hwclock" diff --git a/src/modules/initcpio/CMakeLists.txt b/src/modules/initcpio/CMakeLists.txt index 5140c97e0..e8d90e7fa 100644 --- a/src/modules/initcpio/CMakeLists.txt +++ b/src/modules/initcpio/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( initcpio TYPE job EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/initcpio/InitcpioJob.cpp b/src/modules/initcpio/InitcpioJob.cpp index 38f3a8961..b96f3b316 100644 --- a/src/modules/initcpio/InitcpioJob.cpp +++ b/src/modules/initcpio/InitcpioJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "InitcpioJob.h" @@ -88,8 +79,11 @@ InitcpioJob::setConfigurationMap( const QVariantMap& configurationMap ) } else if ( m_kernel == "$uname" ) { - auto r = CalamaresUtils::System::runCommand( - CalamaresUtils::System::RunLocation::RunInHost, { "/bin/uname", "-r" }, QString(), QString(), std::chrono::seconds( 3 ) ); + auto r = CalamaresUtils::System::runCommand( CalamaresUtils::System::RunLocation::RunInHost, + { "/bin/uname", "-r" }, + QString(), + QString(), + std::chrono::seconds( 3 ) ); if ( r.getExitCode() == 0 ) { m_kernel = r.getOutput(); diff --git a/src/modules/initcpio/InitcpioJob.h b/src/modules/initcpio/InitcpioJob.h index cdc48f6ce..45421ea05 100644 --- a/src/modules/initcpio/InitcpioJob.h +++ b/src/modules/initcpio/InitcpioJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef INITCPIOJOB_H diff --git a/src/modules/initcpio/Tests.cpp b/src/modules/initcpio/Tests.cpp index e0590ba25..bff163b5f 100644 --- a/src/modules/initcpio/Tests.cpp +++ b/src/modules/initcpio/Tests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Tests.h" @@ -31,23 +22,20 @@ #include extern void fixPermissions( const QDir& d ); - + QTEST_GUILESS_MAIN( InitcpioTests ) -InitcpioTests::InitcpioTests() -{ -} +InitcpioTests::InitcpioTests() {} -InitcpioTests::~InitcpioTests() -{ -} +InitcpioTests::~InitcpioTests() {} void InitcpioTests::initTestCase() { } -void InitcpioTests::testFixPermissions() +void +InitcpioTests::testFixPermissions() { Logger::setupLogLevel( Logger::LOGDEBUG ); cDebug() << "Fixing up /boot"; @@ -56,4 +44,3 @@ void InitcpioTests::testFixPermissions() fixPermissions( QDir( "/nonexistent/nonexistent" ) ); QVERIFY( true ); } - diff --git a/src/modules/initcpio/Tests.h b/src/modules/initcpio/Tests.h index 5bab26d3f..aac48d0c4 100644 --- a/src/modules/initcpio/Tests.h +++ b/src/modules/initcpio/Tests.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TESTS_H diff --git a/src/modules/initcpio/initcpio.conf b/src/modules/initcpio/initcpio.conf index 517e48392..717a511df 100644 --- a/src/modules/initcpio/initcpio.conf +++ b/src/modules/initcpio/initcpio.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Run mkinitcpio(8) with the given preset value --- # This key defines the kernel to be loaded. diff --git a/src/modules/initcpio/initcpio.schema.yaml b/src/modules/initcpio/initcpio.schema.yaml index d3fda6be0..2024182bf 100644 --- a/src/modules/initcpio/initcpio.schema.yaml +++ b/src/modules/initcpio/initcpio.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/initcpio diff --git a/src/modules/initcpiocfg/main.py b/src/modules/initcpiocfg/main.py index b3c43ea0b..7a94a8acc 100644 --- a/src/modules/initcpiocfg/main.py +++ b/src/modules/initcpiocfg/main.py @@ -1,25 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Rohan Garg -# Copyright 2015,2019,2020, Philip Müller -# Copyright 2017, Alf Gaida -# Copyright 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2014 Rohan Garg +# SPDX-FileCopyrightText: 2015 2019-2020, Philip Müller +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares from libcalamares.utils import debug, target_env_call diff --git a/src/modules/initcpiocfg/module.desc b/src/modules/initcpiocfg/module.desc index 936a99bbe..a4476121b 100644 --- a/src/modules/initcpiocfg/module.desc +++ b/src/modules/initcpiocfg/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "initcpiocfg" diff --git a/src/modules/initramfs/CMakeLists.txt b/src/modules/initramfs/CMakeLists.txt index b3287c896..b8bcc9681 100644 --- a/src/modules/initramfs/CMakeLists.txt +++ b/src/modules/initramfs/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( initramfs TYPE job EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/initramfs/InitramfsJob.cpp b/src/modules/initramfs/InitramfsJob.cpp index 468047c45..1b10a1a05 100644 --- a/src/modules/initramfs/InitramfsJob.cpp +++ b/src/modules/initramfs/InitramfsJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "InitramfsJob.h" @@ -78,8 +69,11 @@ InitramfsJob::setConfigurationMap( const QVariantMap& configurationMap ) } else if ( m_kernel == "$uname" ) { - auto r = CalamaresUtils::System::runCommand( - CalamaresUtils::System::RunLocation::RunInHost, { "/bin/uname", "-r" }, QString(), QString(), std::chrono::seconds( 3 ) ); + auto r = CalamaresUtils::System::runCommand( CalamaresUtils::System::RunLocation::RunInHost, + { "/bin/uname", "-r" }, + QString(), + QString(), + std::chrono::seconds( 3 ) ); if ( r.getExitCode() == 0 ) { m_kernel = r.getOutput(); diff --git a/src/modules/initramfs/InitramfsJob.h b/src/modules/initramfs/InitramfsJob.h index 3239c6929..7b3a03911 100644 --- a/src/modules/initramfs/InitramfsJob.h +++ b/src/modules/initramfs/InitramfsJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef INITRAMFSJOB_H diff --git a/src/modules/initramfs/Tests.cpp b/src/modules/initramfs/Tests.cpp index 2a236e64b..f1c9b5e24 100644 --- a/src/modules/initramfs/Tests.cpp +++ b/src/modules/initramfs/Tests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Tests.h" @@ -33,32 +24,30 @@ QTEST_GUILESS_MAIN( InitramfsTests ) -InitramfsTests::InitramfsTests() -{ -} +InitramfsTests::InitramfsTests() {} -InitramfsTests::~InitramfsTests() -{ -} +InitramfsTests::~InitramfsTests() {} void InitramfsTests::initTestCase() { Logger::setupLogLevel( Logger::LOGDEBUG ); - (void) new Calamares::JobQueue(); - (void) new CalamaresUtils::System( true ); + (void)new Calamares::JobQueue(); + (void)new CalamaresUtils::System( true ); } static const char contents[] = "UMASK=0077\n"; static const char confFile[] = "/tmp/calamares-safe-umask"; -void InitramfsTests::cleanup() +void +InitramfsTests::cleanup() { QFile::remove( confFile ); } -void InitramfsTests::testCreateTargetFile() +void +InitramfsTests::testCreateTargetFile() { static const char short_confFile[] = "/calamares-safe-umask"; @@ -79,8 +68,7 @@ void InitramfsTests::testCreateTargetFile() QFileInfo fi( path ); QVERIFY( fi.exists() ); - QCOMPARE( ulong( fi.size() ), sizeof( contents )-1 ); // don't count trailing NUL + QCOMPARE( ulong( fi.size() ), sizeof( contents ) - 1 ); // don't count trailing NUL QFile::remove( path ); - } diff --git a/src/modules/initramfs/Tests.h b/src/modules/initramfs/Tests.h index 715c90169..377424589 100644 --- a/src/modules/initramfs/Tests.h +++ b/src/modules/initramfs/Tests.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TESTS_H diff --git a/src/modules/initramfs/initramfs.conf b/src/modules/initramfs/initramfs.conf index a989d83c3..c9dcf1697 100644 --- a/src/modules/initramfs/initramfs.conf +++ b/src/modules/initramfs/initramfs.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# ## initramfs module # # This module is specific to Debian based distros. Post installation on Debian diff --git a/src/modules/initramfscfg/encrypt_hook b/src/modules/initramfscfg/encrypt_hook index 257097303..70d661a98 100755 --- a/src/modules/initramfscfg/encrypt_hook +++ b/src/modules/initramfscfg/encrypt_hook @@ -1,4 +1,7 @@ #!/bin/sh +# +# SPDX-FileCopyrightText: 2016 David McKinney +# SPDX-License-Identifier: GPL-3.0-or-later PREREQ="" diff --git a/src/modules/initramfscfg/encrypt_hook_nokey b/src/modules/initramfscfg/encrypt_hook_nokey index db51475bd..8ee669c30 100755 --- a/src/modules/initramfscfg/encrypt_hook_nokey +++ b/src/modules/initramfscfg/encrypt_hook_nokey @@ -1,4 +1,7 @@ #!/bin/sh +# +# SPDX-FileCopyrightText: 2016 David McKinney +# SPDX-License-Identifier: GPL-3.0-or-later PREREQ="" diff --git a/src/modules/initramfscfg/main.py b/src/modules/initramfscfg/main.py index 52d512567..974e2634d 100644 --- a/src/modules/initramfscfg/main.py +++ b/src/modules/initramfscfg/main.py @@ -1,27 +1,18 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Rohan Garg -# Copyright 2015, Philip Müller -# Copyright 2016, David McKinney -# Copyright 2016, Kevin Kofler -# Copyright 2017, Alf Gaida -# Copyright 2017, 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2014 Rohan Garg +# SPDX-FileCopyrightText: 2015 Philip Müller +# SPDX-FileCopyrightText: 2016 David McKinney +# SPDX-FileCopyrightText: 2016 Kevin Kofler +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares diff --git a/src/modules/initramfscfg/module.desc b/src/modules/initramfscfg/module.desc index c00e8170f..17db29465 100644 --- a/src/modules/initramfscfg/module.desc +++ b/src/modules/initramfscfg/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "initramfscfg" diff --git a/src/modules/interactiveterminal/CMakeLists.txt b/src/modules/interactiveterminal/CMakeLists.txt index 5eff610d5..fea99a5dd 100644 --- a/src/modules/interactiveterminal/CMakeLists.txt +++ b/src/modules/interactiveterminal/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# find_package(ECM ${ECM_VERSION} REQUIRED NO_MODULE) set( kf5_ver 5.41 ) diff --git a/src/modules/interactiveterminal/InteractiveTerminalPage.cpp b/src/modules/interactiveterminal/InteractiveTerminalPage.cpp index 5b2f81bfa..ea4e3b42e 100644 --- a/src/modules/interactiveterminal/InteractiveTerminalPage.cpp +++ b/src/modules/interactiveterminal/InteractiveTerminalPage.cpp @@ -1,31 +1,22 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "InteractiveTerminalPage.h" -#include "viewpages/ViewStep.h" -#include "utils/Retranslator.h" #include "utils/CalamaresUtilsGui.h" #include "utils/Logger.h" +#include "utils/Retranslator.h" +#include "viewpages/ViewStep.h" -#include -#include #include +#include +#include #include #include @@ -49,17 +40,17 @@ InteractiveTerminalPage::InteractiveTerminalPage( QWidget* parent ) void InteractiveTerminalPage::errorKonsoleNotInstalled() { - QMessageBox::critical( this, - tr( "Konsole not installed"), - tr( "Please install KDE Konsole and try again!" ), - QMessageBox::Ok ); + QMessageBox::critical( + this, tr( "Konsole not installed" ), tr( "Please install KDE Konsole and try again!" ), QMessageBox::Ok ); } void InteractiveTerminalPage::onActivate() { if ( m_termHostWidget ) + { return; + } // For whatever reason, instead of simply linking against a library we // need to do a runtime query to KService just to get a sodding terminal // widget. @@ -69,14 +60,11 @@ InteractiveTerminalPage::onActivate() // And all of this hoping the Konsole application is installed. If not, // tough cookies. errorKonsoleNotInstalled(); - return ; + return; } // Create one instance of konsolepart. - KParts::ReadOnlyPart* p = - service->createInstance< KParts::ReadOnlyPart >( this, - this, - {} ); + KParts::ReadOnlyPart* p = service->createInstance< KParts::ReadOnlyPart >( this, this, {} ); if ( !p ) { // One more opportunity for the loading operation to fail. @@ -100,8 +88,7 @@ InteractiveTerminalPage::onActivate() m_termHostWidget = p->widget(); m_layout->addWidget( m_termHostWidget ); - cDebug() << "Part widget ought to be" - << m_termHostWidget->metaObject()->className(); + cDebug() << "Part widget ought to be" << m_termHostWidget->metaObject()->className(); t->showShellInDir( QDir::home().path() ); t->sendInput( QString( "%1\n" ).arg( m_command ) ); @@ -112,8 +99,5 @@ void InteractiveTerminalPage::setCommand( const QString& command ) { m_command = command; - CALAMARES_RETRANSLATE( - m_headerLabel->setText( tr( "Executing script:  %1" ) - .arg( m_command ) ); - ) + CALAMARES_RETRANSLATE( m_headerLabel->setText( tr( "Executing script:  %1" ).arg( m_command ) ); ) } diff --git a/src/modules/interactiveterminal/InteractiveTerminalPage.h b/src/modules/interactiveterminal/InteractiveTerminalPage.h index 503a53756..86ba075ad 100644 --- a/src/modules/interactiveterminal/InteractiveTerminalPage.h +++ b/src/modules/interactiveterminal/InteractiveTerminalPage.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef INTERACTIVETERMINALPAGE_H @@ -43,4 +34,4 @@ private: void errorKonsoleNotInstalled(); }; -#endif // INTERACTIVETERMINALPAGE_H +#endif // INTERACTIVETERMINALPAGE_H diff --git a/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp b/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp index 874c8a9cc..b01321c18 100644 --- a/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp +++ b/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "InteractiveTerminalViewStep.h" @@ -24,7 +15,8 @@ #include -CALAMARES_PLUGIN_FACTORY_DEFINITION( InteractiveTerminalViewStepFactory, registerPlugin(); ) +CALAMARES_PLUGIN_FACTORY_DEFINITION( InteractiveTerminalViewStepFactory, + registerPlugin< InteractiveTerminalViewStep >(); ) InteractiveTerminalViewStep::InteractiveTerminalViewStep( QObject* parent ) : Calamares::ViewStep( parent ) @@ -37,7 +29,9 @@ InteractiveTerminalViewStep::InteractiveTerminalViewStep( QObject* parent ) InteractiveTerminalViewStep::~InteractiveTerminalViewStep() { if ( m_widget && m_widget->parent() == nullptr ) + { m_widget->deleteLater(); + } } @@ -102,8 +96,8 @@ InteractiveTerminalViewStep::onActivate() void InteractiveTerminalViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { - if ( configurationMap.contains( "command" ) && - configurationMap.value( "command").type() == QVariant::String ) + if ( configurationMap.contains( "command" ) && configurationMap.value( "command" ).type() == QVariant::String ) + { m_widget->setCommand( configurationMap.value( "command" ).toString() ); + } } - diff --git a/src/modules/interactiveterminal/InteractiveTerminalViewStep.h b/src/modules/interactiveterminal/InteractiveTerminalViewStep.h index bf26ba91e..f01a19ee6 100644 --- a/src/modules/interactiveterminal/InteractiveTerminalViewStep.h +++ b/src/modules/interactiveterminal/InteractiveTerminalViewStep.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef INTERACTIVETERMINALPAGEPLUGIN_H @@ -60,4 +51,4 @@ private: CALAMARES_PLUGIN_FACTORY_DECLARATION( InteractiveTerminalViewStepFactory ) -#endif // INTERACTIVETERMINALPAGEPLUGIN_H +#endif // INTERACTIVETERMINALPAGEPLUGIN_H diff --git a/src/modules/interactiveterminal/interactiveterminal.conf b/src/modules/interactiveterminal/interactiveterminal.conf index 067bce8be..9354f8f4a 100644 --- a/src/modules/interactiveterminal/interactiveterminal.conf +++ b/src/modules/interactiveterminal/interactiveterminal.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # The interactive terminal provides a konsole (terminal) window # during the installation process. The terminal runs in the # host system, so you will need to change directories to the diff --git a/src/modules/keyboard/CMakeLists.txt b/src/modules/keyboard/CMakeLists.txt index c0d8575c6..4ee83ec14 100644 --- a/src/modules/keyboard/CMakeLists.txt +++ b/src/modules/keyboard/CMakeLists.txt @@ -1,5 +1,8 @@ -include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) - +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( keyboard TYPE viewmodule EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 64b253835..11a20bbb7 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019-2020, Adriaan de Groot - * Copyright 2020, Camilo Higuita * + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Camilo Higuita * + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Config.h" diff --git a/src/modules/keyboard/Config.h b/src/modules/keyboard/Config.h index a05a5ab86..44a893faa 100644 --- a/src/modules/keyboard/Config.h +++ b/src/modules/keyboard/Config.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019-2020, Adriaan de Groot - * Copyright 2020, Camilo Higuita + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Camilo Higuita + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef KEYBOARD_CONFIG_H diff --git a/src/modules/keyboard/KeyboardLayoutModel.cpp b/src/modules/keyboard/KeyboardLayoutModel.cpp index 7e24df570..5b92678f6 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.cpp +++ b/src/modules/keyboard/KeyboardLayoutModel.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "KeyboardLayoutModel.h" diff --git a/src/modules/keyboard/KeyboardLayoutModel.h b/src/modules/keyboard/KeyboardLayoutModel.h index e0007fdbc..f4699c9f8 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.h +++ b/src/modules/keyboard/KeyboardLayoutModel.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef KEYBOARDLAYOUTMODEL_H diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index e8997b915..66f4c7570 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -1,24 +1,16 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc. + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * * Portions from the Manjaro Installation Framework * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "KeyboardPage.h" diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 1ce21787c..485e27ed6 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -1,24 +1,16 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc. + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * * Portions from the Manjaro Installation Framework * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef KEYBOARDPAGE_H diff --git a/src/modules/keyboard/KeyboardPage.ui b/src/modules/keyboard/KeyboardPage.ui index 5df874b21..f7e430a04 100644 --- a/src/modules/keyboard/KeyboardPage.ui +++ b/src/modules/keyboard/KeyboardPage.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + Page_Keyboard diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index e6e89eb1c..55402fd14 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "KeyboardViewStep.h" diff --git a/src/modules/keyboard/KeyboardViewStep.h b/src/modules/keyboard/KeyboardViewStep.h index 208d50686..5d4882aca 100644 --- a/src/modules/keyboard/KeyboardViewStep.h +++ b/src/modules/keyboard/KeyboardViewStep.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef KEYBOARDVIEWSTEP_H diff --git a/src/modules/keyboard/README.md b/src/modules/keyboard/README.md deleted file mode 100644 index cf4ce3994..000000000 --- a/src/modules/keyboard/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Keyboard layout configuration viewmodule ---- -Requires ckbcomp script. - * Debian package console-setup or - * Manjaro package keyboardctl https://github.com/manjaro/packages-core/tree/master/keyboardctl diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.cpp b/src/modules/keyboard/SetKeyboardLayoutJob.cpp index 537feeb8c..d0ad8fcbf 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.cpp +++ b/src/modules/keyboard/SetKeyboardLayoutJob.cpp @@ -1,25 +1,18 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2014, Kevin Kofler + * SPDX-FileCopyrightText: 2011 Lennart Poettering + * SPDX-FileCopyrightText: Kay Sievers + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Kevin Kofler + * SPDX-License-Identifier: GPL-3.0-or-later * * Portions from systemd (localed.c): * Copyright 2011 Lennart Poettering * Copyright 2013 Kay Sievers * (originally under LGPLv2.1+, used under the LGPL to GPL conversion clause) * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "SetKeyboardLayoutJob.h" diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.h b/src/modules/keyboard/SetKeyboardLayoutJob.h index 599642b19..f1eabe195 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.h +++ b/src/modules/keyboard/SetKeyboardLayoutJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2014, Kevin Kofler + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Kevin Kofler + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef SETKEYBOARDLAYOUTJOB_H diff --git a/src/modules/keyboard/images/restore.png.license b/src/modules/keyboard/images/restore.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/src/modules/keyboard/images/restore.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/keyboard/kbd-model-map b/src/modules/keyboard/kbd-model-map index 49ec4ad75..e113c92ba 100644 --- a/src/modules/keyboard/kbd-model-map +++ b/src/modules/keyboard/kbd-model-map @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2015 Systemd authors and contributors +# SPDX-FileCopyrightText: 2018 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later +# # Copied from systemd-localed # # https://cgit.freedesktop.org/systemd/systemd/log/src/locale/kbd-model-map diff --git a/src/modules/keyboard/keyboard.conf b/src/modules/keyboard/keyboard.conf index ee97c3939..d122f30d7 100644 --- a/src/modules/keyboard/keyboard.conf +++ b/src/modules/keyboard/keyboard.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # NOTE: you must have ckbcomp installed and runnable # on the live system, for keyboard layout previews. --- diff --git a/src/modules/keyboard/keyboard.schema.yaml b/src/modules/keyboard/keyboard.schema.yaml index 05d98bfde..08a2ababe 100644 --- a/src/modules/keyboard/keyboard.schema.yaml +++ b/src/modules/keyboard/keyboard.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/finished diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp index f363ea844..329913d79 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.cpp @@ -1,7 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc. + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * * Originally from the Manjaro Installation Framework * by Roland Singer @@ -9,18 +11,8 @@ * * Source by Georg Grabler * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "keyboardglobal.h" @@ -43,18 +35,22 @@ static const char XKB_FILE[] = "/usr/share/X11/xkb/rules/base.lst"; * or hits end-of-file. Returns true if the section is found. The * @p name must include the "! " section marker as well. */ -static bool findSection( QFile& fh, const char* name ) +static bool +findSection( QFile& fh, const char* name ) { while ( !fh.atEnd() ) { QByteArray line = fh.readLine(); if ( line.startsWith( name ) ) + { return true; + } } return false; } -static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath ) +static KeyboardGlobal::ModelsMap +parseKeyboardModels( const char* filepath ) { KeyboardGlobal::ModelsMap models; @@ -75,7 +71,9 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath ) // check if we start a new section if ( line.startsWith( '!' ) ) + { break; + } // here we are in the model section, otherwhise we would continue or break QRegExp rx; @@ -88,7 +86,9 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath ) QString model = rx.cap( 1 ); if ( model == "pc105" ) + { modelDesc += " - " + QObject::tr( "Default Keyboard Model" ); + } models.insert( modelDesc, model ); } @@ -98,7 +98,8 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath ) } -KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath ) +KeyboardGlobal::LayoutsMap +parseKeyboardLayouts( const char* filepath ) { KeyboardGlobal::LayoutsMap layouts; @@ -120,7 +121,9 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath ) QByteArray line = fh.readLine(); if ( line.startsWith( '!' ) ) + { break; + } QRegExp rx; rx.setPattern( "^\\s+(\\S+)\\s+(\\w.*)\n$" ); @@ -147,7 +150,9 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath ) QByteArray line = fh.readLine(); if ( line.startsWith( '!' ) ) + { break; + } QRegExp rx; rx.setPattern( "^\\s+(\\S+)\\s+(\\S+): (\\w.*)\n$" ); @@ -176,14 +181,15 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath ) } -KeyboardGlobal::LayoutsMap KeyboardGlobal::getKeyboardLayouts() +KeyboardGlobal::LayoutsMap +KeyboardGlobal::getKeyboardLayouts() { return parseKeyboardLayouts( XKB_FILE ); } -KeyboardGlobal::ModelsMap KeyboardGlobal::getKeyboardModels() +KeyboardGlobal::ModelsMap +KeyboardGlobal::getKeyboardModels() { return parseKeyboardModels( XKB_FILE ); } - diff --git a/src/modules/keyboard/keyboardwidget/keyboardglobal.h b/src/modules/keyboard/keyboardwidget/keyboardglobal.h index 1732dc913..07c6e5ea2 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardglobal.h +++ b/src/modules/keyboard/keyboardwidget/keyboardglobal.h @@ -1,44 +1,37 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017, 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc. + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * * Originally from the Manjaro Installation Framework * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef KEYBOARDGLOBAL_H #define KEYBOARDGLOBAL_H -#include -#include -#include +#include #include -#include -#include +#include #include +#include #include #include -#include +#include +#include +#include class KeyboardGlobal { public: - struct KeyboardInfo { + struct KeyboardInfo + { QString description; QMap< QString, QString > variants; }; @@ -50,4 +43,4 @@ public: static ModelsMap getKeyboardModels(); }; -#endif // KEYBOARDGLOBAL_H +#endif // KEYBOARDGLOBAL_H diff --git a/src/modules/keyboard/keyboardwidget/keyboardpreview.cpp b/src/modules/keyboard/keyboardwidget/keyboardpreview.cpp index 02ddd4186..572965de5 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardpreview.cpp +++ b/src/modules/keyboard/keyboardwidget/keyboardpreview.cpp @@ -1,24 +1,16 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc. + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * * Portions from the Manjaro Installation Framework * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "keyboardpreview.h" @@ -33,96 +25,126 @@ KeyBoardPreview::KeyBoardPreview( QWidget* parent ) , usable_width( 0 ) , key_w( 0 ) { - setMinimumSize(700, 191); + setMinimumSize( 700, 191 ); // We must set up the font size in pixels to fit the keys - lowerFont = QFont("Helvetica", 10, QFont::DemiBold); - lowerFont.setPixelSize(16); - upperFont = QFont("Helvetica", 8); - upperFont.setPixelSize(13); + lowerFont = QFont( "Helvetica", 10, QFont::DemiBold ); + lowerFont.setPixelSize( 16 ); + upperFont = QFont( "Helvetica", 8 ); + upperFont.setPixelSize( 13 ); // Setup keyboard types - kbList[KB_104].kb_extended_return = false; - kbList[KB_104].keys.append(QList() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa << 0xb << 0xc << 0xd); - kbList[KB_104].keys.append(QList() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 << 0x19 << 0x1a << 0x1b << 0x2b); - kbList[KB_104].keys.append(QList() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 << 0x27 << 0x28); - kbList[KB_104].keys.append(QList() << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35); + kbList[ KB_104 ].kb_extended_return = false; + kbList[ KB_104 ].keys.append( QList< int >() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa + << 0xb << 0xc << 0xd ); + kbList[ KB_104 ].keys.append( QList< int >() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 + << 0x19 << 0x1a << 0x1b << 0x2b ); + kbList[ KB_104 ].keys.append( QList< int >() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 + << 0x27 << 0x28 ); + kbList[ KB_104 ].keys.append( QList< int >() + << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35 ); - kbList[KB_105].kb_extended_return = true; - kbList[KB_105].keys.append(QList() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa << 0xb << 0xc << 0xd); - kbList[KB_105].keys.append(QList() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 << 0x19 << 0x1a << 0x1b); - kbList[KB_105].keys.append(QList() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 << 0x27 << 0x28 << 0x2b); - kbList[KB_105].keys.append(QList() << 0x54 << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35); + kbList[ KB_105 ].kb_extended_return = true; + kbList[ KB_105 ].keys.append( QList< int >() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa + << 0xb << 0xc << 0xd ); + kbList[ KB_105 ].keys.append( QList< int >() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 + << 0x19 << 0x1a << 0x1b ); + kbList[ KB_105 ].keys.append( QList< int >() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 + << 0x27 << 0x28 << 0x2b ); + kbList[ KB_105 ].keys.append( QList< int >() << 0x54 << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 + << 0x34 << 0x35 ); - kbList[KB_106].kb_extended_return = true; - kbList[KB_106].keys.append(QList() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa << 0xb << 0xc << 0xd << 0xe); - kbList[KB_106].keys.append(QList() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 << 0x19 << 0x1a << 0x1b); - kbList[KB_106].keys.append(QList() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 << 0x27 << 0x28 << 0x29); - kbList[KB_106].keys.append(QList() << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35 << 0x36); + kbList[ KB_106 ].kb_extended_return = true; + kbList[ KB_106 ].keys.append( QList< int >() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa + << 0xb << 0xc << 0xd << 0xe ); + kbList[ KB_106 ].keys.append( QList< int >() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 + << 0x19 << 0x1a << 0x1b ); + kbList[ KB_106 ].keys.append( QList< int >() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 + << 0x27 << 0x28 << 0x29 ); + kbList[ KB_106 ].keys.append( QList< int >() << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 + << 0x35 << 0x36 ); - kb = &kbList[KB_104]; + kb = &kbList[ KB_104 ]; } - -void KeyBoardPreview::setLayout(QString _layout) { +void +KeyBoardPreview::setLayout( QString _layout ) +{ layout = _layout; } - -void KeyBoardPreview::setVariant(QString _variant) { +void +KeyBoardPreview::setVariant( QString _variant ) +{ variant = _variant; - if (!loadCodes()) + if ( !loadCodes() ) + { return; + } loadInfo(); repaint(); } - //### //### Private //### - -void KeyBoardPreview::loadInfo() { +void +KeyBoardPreview::loadInfo() +{ // kb_104 - if (layout == "us" || layout == "th") - kb = &kbList[KB_104]; + if ( layout == "us" || layout == "th" ) + { + kb = &kbList[ KB_104 ]; + } // kb_106 - else if (layout == "jp") - kb = &kbList[KB_106]; + else if ( layout == "jp" ) + { + kb = &kbList[ KB_106 ]; + } // most keyboards are 105 key so default to that else - kb = &kbList[KB_105]; + { + kb = &kbList[ KB_105 ]; + } } - -bool KeyBoardPreview::loadCodes() { - if (layout.isEmpty()) +bool +KeyBoardPreview::loadCodes() +{ + if ( layout.isEmpty() ) + { return false; + } QStringList param; - param << "-model" << "pc106" << "-layout" << layout << "-compact"; - if (!variant.isEmpty()) + param << "-model" + << "pc106" + << "-layout" << layout << "-compact"; + if ( !variant.isEmpty() ) + { param << "-variant" << variant; + } QProcess process; - process.setEnvironment(QStringList() << "LANG=C" << "LC_MESSAGES=C"); - process.start("ckbcomp", param); - if (!process.waitForStarted()) + process.setEnvironment( QStringList() << "LANG=C" + << "LC_MESSAGES=C" ); + process.start( "ckbcomp", param ); + if ( !process.waitForStarted() ) { cWarning() << "ckbcomp not found , keyboard preview disabled"; return false; } - if (!process.waitForFinished()) + if ( !process.waitForFinished() ) { cWarning() << "ckbcomp failed, keyboard preview disabled"; return false; @@ -131,209 +153,247 @@ bool KeyBoardPreview::loadCodes() { // Clear codes codes.clear(); - const QStringList list = QString(process.readAll()).split("\n", SplitSkipEmptyParts); + const QStringList list = QString( process.readAll() ).split( "\n", SplitSkipEmptyParts ); - for (const QString &line : list) { - if (!line.startsWith("keycode") || !line.contains('=')) + for ( const QString& line : list ) + { + if ( !line.startsWith( "keycode" ) || !line.contains( '=' ) ) + { continue; + } - QStringList split = line.split('=').at(1).trimmed().split(' '); - if (split.size() < 4) + QStringList split = line.split( '=' ).at( 1 ).trimmed().split( ' ' ); + if ( split.size() < 4 ) + { continue; + } Code code; - code.plain = fromUnicodeString(split.at(0)); - code.shift = fromUnicodeString(split.at(1)); - code.ctrl = fromUnicodeString(split.at(2)); - code.alt = fromUnicodeString(split.at(3)); + code.plain = fromUnicodeString( split.at( 0 ) ); + code.shift = fromUnicodeString( split.at( 1 ) ); + code.ctrl = fromUnicodeString( split.at( 2 ) ); + code.alt = fromUnicodeString( split.at( 3 ) ); - if (code.ctrl == code.plain) + if ( code.ctrl == code.plain ) + { code.ctrl = ""; + } - if (code.alt == code.plain) + if ( code.alt == code.plain ) + { code.alt = ""; + } - codes.append(code); + codes.append( code ); } return true; } - -QString KeyBoardPreview::fromUnicodeString(QString raw) { - if (raw.startsWith("U+")) - return QChar(raw.mid(2).toInt(nullptr, 16)); - else if (raw.startsWith("+U")) - return QChar(raw.mid(3).toInt(nullptr, 16)); +QString +KeyBoardPreview::fromUnicodeString( QString raw ) +{ + if ( raw.startsWith( "U+" ) ) + { + return QChar( raw.mid( 2 ).toInt( nullptr, 16 ) ); + } + else if ( raw.startsWith( "+U" ) ) + { + return QChar( raw.mid( 3 ).toInt( nullptr, 16 ) ); + } return ""; } - -QString KeyBoardPreview::regular_text(int index) { - if (index < 0 || index >= codes.size()) +QString +KeyBoardPreview::regular_text( int index ) +{ + if ( index < 0 || index >= codes.size() ) + { return ""; + } - return codes.at(index - 1).plain; + return codes.at( index - 1 ).plain; } - -QString KeyBoardPreview::shift_text(int index) { - if (index < 0 || index >= codes.size()) +QString +KeyBoardPreview::shift_text( int index ) +{ + if ( index < 0 || index >= codes.size() ) + { return ""; + } - return codes.at(index - 1).shift; + return codes.at( index - 1 ).shift; } - -QString KeyBoardPreview::ctrl_text(int index) { - if (index < 0 || index >= codes.size()) +QString +KeyBoardPreview::ctrl_text( int index ) +{ + if ( index < 0 || index >= codes.size() ) + { return ""; + } - return codes.at(index - 1).ctrl; + return codes.at( index - 1 ).ctrl; } - -QString KeyBoardPreview::alt_text(int index) { - if (index < 0 || index >= codes.size()) +QString +KeyBoardPreview::alt_text( int index ) +{ + if ( index < 0 || index >= codes.size() ) + { return ""; + } - return codes.at(index - 1).alt; + return codes.at( index - 1 ).alt; } - -void KeyBoardPreview::resizeEvent(QResizeEvent *) { +void +KeyBoardPreview::resizeEvent( QResizeEvent* ) +{ space = 6; - usable_width = width()-7; - key_w = (usable_width - 14 * space)/15; + usable_width = width() - 7; + key_w = ( usable_width - 14 * space ) / 15; - setMaximumHeight(key_w*4 + space*5 + 1); + setMaximumHeight( key_w * 4 + space * 5 + 1 ); } +void +KeyBoardPreview::paintEvent( QPaintEvent* event ) +{ + QPainter p( this ); + p.setRenderHint( QPainter::Antialiasing ); -void KeyBoardPreview::paintEvent(QPaintEvent* event) { - QPainter p(this); - p.setRenderHint(QPainter::Antialiasing); - - p.setBrush(QColor(0xd6, 0xd6, 0xd6)); - p.drawRect(rect()); + p.setBrush( QColor( 0xd6, 0xd6, 0xd6 ) ); + p.drawRect( rect() ); QPen pen; - pen.setWidth(1); - pen.setColor(QColor(0x58, 0x58, 0x58)); - p.setPen(pen); + pen.setWidth( 1 ); + pen.setColor( QColor( 0x58, 0x58, 0x58 ) ); + p.setPen( pen ); - p.setBrush(QColor(0x58, 0x58, 0x58)); + p.setBrush( QColor( 0x58, 0x58, 0x58 ) ); - p.setBackgroundMode(Qt::TransparentMode); - p.translate(0.5, 0.5); + p.setBackgroundMode( Qt::TransparentMode ); + p.translate( 0.5, 0.5 ); int rx = 3; - int x=6; - int y=6; + int x = 6; + int y = 6; int first_key_w = 0; - int remaining_x[] = {0,0,0,0}; - int remaining_widths[] = {0,0,0,0}; + int remaining_x[] = { 0, 0, 0, 0 }; + int remaining_widths[] = { 0, 0, 0, 0 }; - for (int i = 0; i < 4; i++) { - if (first_key_w > 0) { - first_key_w = int(first_key_w * 1.375); + for ( int i = 0; i < 4; i++ ) + { + if ( first_key_w > 0 ) + { + first_key_w = int( first_key_w * 1.375 ); - if (kb == &kbList[KB_105] && i == 3) - first_key_w = int(key_w * 1.275); + if ( kb == &kbList[ KB_105 ] && i == 3 ) + { + first_key_w = int( key_w * 1.275 ); + } - p.drawRoundedRect(QRectF(6, y, first_key_w, key_w), rx, rx); + p.drawRoundedRect( QRectF( 6, y, first_key_w, key_w ), rx, rx ); x = 6 + first_key_w + space; } - else { + else + { first_key_w = key_w; } + bool last_end = ( i == 1 && !kb->kb_extended_return ); + int rw = usable_width - x; + int ii = 0; - bool last_end = (i==1 && ! kb->kb_extended_return); - int rw=usable_width-x; - int ii=0; + for ( int k : kb->keys.at( i ) ) + { + QRectF rect = QRectF( x, y, key_w, key_w ); - for (int k : kb->keys.at(i)) { - QRectF rect = QRectF(x, y, key_w, key_w); + if ( ii == kb->keys.at( i ).size() - 1 && last_end ) + { + rect.setWidth( rw ); + } - if (ii == kb->keys.at(i).size()-1 && last_end) - rect.setWidth(rw); + p.drawRoundedRect( rect, rx, rx ); - p.drawRoundedRect(rect, rx, rx); + rect.adjust( 5, 1, 0, 0 ); - rect.adjust(5, 1, 0, 0); + p.setPen( QColor( 0x9e, 0xde, 0x00 ) ); + p.setFont( upperFont ); + p.drawText( rect, Qt::AlignLeft | Qt::AlignTop, shift_text( k ) ); - p.setPen(QColor(0x9e, 0xde, 0x00)); - p.setFont(upperFont); - p.drawText(rect, Qt::AlignLeft | Qt::AlignTop, shift_text(k)); + rect.setBottom( rect.bottom() - 2.5 ); - rect.setBottom(rect.bottom() - 2.5); - - p.setPen(QColor(0xff, 0xff, 0xff)); - p.setFont(lowerFont); - p.drawText(rect, Qt::AlignLeft | Qt::AlignBottom, regular_text(k)); + p.setPen( QColor( 0xff, 0xff, 0xff ) ); + p.setFont( lowerFont ); + p.drawText( rect, Qt::AlignLeft | Qt::AlignBottom, regular_text( k ) ); rw = rw - space - key_w; x = x + space + key_w; - ii = ii+1; + ii = ii + 1; - p.setPen(pen); + p.setPen( pen ); } + remaining_x[ i ] = x; + remaining_widths[ i ] = rw; - remaining_x[i] = x; - remaining_widths[i] = rw; - - if (i != 1 && i != 2) - p.drawRoundedRect(QRectF(x, y, rw, key_w), rx, rx); + if ( i != 1 && i != 2 ) + { + p.drawRoundedRect( QRectF( x, y, rw, key_w ), rx, rx ); + } y = y + space + key_w; } - if (kb->kb_extended_return) { - rx=rx*2; - int x1 = remaining_x[1]; - int y1 = 6 + key_w*1 + space*1; - int w1 = remaining_widths[1]; - int x2 = remaining_x[2]; - int y2 = 6 + key_w*2 + space*2; + if ( kb->kb_extended_return ) + { + rx = rx * 2; + int x1 = remaining_x[ 1 ]; + int y1 = 6 + key_w * 1 + space * 1; + int w1 = remaining_widths[ 1 ]; + int x2 = remaining_x[ 2 ]; + int y2 = 6 + key_w * 2 + space * 2; // this is some serious crap... but it has to be so // maybe one day keyboards won't look like this... // one can only hope QPainterPath pp; - pp.moveTo(x1, y1+rx); - pp.arcTo(x1, y1, rx, rx, 180, -90); - pp.lineTo(x1+w1-rx, y1); - pp.arcTo(x1+w1-rx, y1, rx, rx, 90, -90); - pp.lineTo(x1+w1, y2+key_w-rx); - pp.arcTo(x1+w1-rx, y2+key_w-rx, rx, rx, 0, -90); - pp.lineTo(x2+rx, y2+key_w); - pp.arcTo(x2, y2+key_w-rx, rx, rx, -90, -90); - pp.lineTo(x2, y1+key_w); - pp.lineTo(x1+rx, y1+key_w); - pp.arcTo(x1, y1+key_w-rx, rx, rx, -90, -90); + pp.moveTo( x1, y1 + rx ); + pp.arcTo( x1, y1, rx, rx, 180, -90 ); + pp.lineTo( x1 + w1 - rx, y1 ); + pp.arcTo( x1 + w1 - rx, y1, rx, rx, 90, -90 ); + pp.lineTo( x1 + w1, y2 + key_w - rx ); + pp.arcTo( x1 + w1 - rx, y2 + key_w - rx, rx, rx, 0, -90 ); + pp.lineTo( x2 + rx, y2 + key_w ); + pp.arcTo( x2, y2 + key_w - rx, rx, rx, -90, -90 ); + pp.lineTo( x2, y1 + key_w ); + pp.lineTo( x1 + rx, y1 + key_w ); + pp.arcTo( x1, y1 + key_w - rx, rx, rx, -90, -90 ); pp.closeSubpath(); - p.drawPath(pp); + p.drawPath( pp ); } - else { - x= remaining_x[2]; - y = 6 + key_w*2 + space*2; - p.drawRoundedRect(QRectF(x, y, remaining_widths[2], key_w), rx, rx); + else + { + x = remaining_x[ 2 ]; + y = 6 + key_w * 2 + space * 2; + p.drawRoundedRect( QRectF( x, y, remaining_widths[ 2 ], key_w ), rx, rx ); } - QWidget::paintEvent(event); + QWidget::paintEvent( event ); } diff --git a/src/modules/keyboard/keyboardwidget/keyboardpreview.h b/src/modules/keyboard/keyboardwidget/keyboardpreview.h index 881866147..1a01fe1a2 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardpreview.h +++ b/src/modules/keyboard/keyboardwidget/keyboardpreview.h @@ -1,39 +1,31 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc. + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * * Portions from the Manjaro Installation Framework * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef KEYBOARDPREVIEW_H #define KEYBOARDPREVIEW_H -#include -#include +#include #include #include -#include #include -#include +#include #include #include +#include #include #include +#include class KeyBoardPreview : public QWidget @@ -41,40 +33,46 @@ class KeyBoardPreview : public QWidget Q_OBJECT public: explicit KeyBoardPreview( QWidget* parent = nullptr ); - - void setLayout(QString layout); - void setVariant(QString variant); + + void setLayout( QString layout ); + void setVariant( QString variant ); private: - enum KB_TYPE { KB_104, KB_105, KB_106 }; - - struct KB { - bool kb_extended_return; - QList > keys; + enum KB_TYPE + { + KB_104, + KB_105, + KB_106 }; - struct Code { + struct KB + { + bool kb_extended_return; + QList< QList< int > > keys; + }; + + struct Code + { QString plain, shift, ctrl, alt; }; QString layout, variant; QFont lowerFont, upperFont; - KB* kb, kbList[3]; - QList codes; + KB *kb, kbList[ 3 ]; + QList< Code > codes; int space, usable_width, key_w; void loadInfo(); bool loadCodes(); - QString regular_text(int index); - QString shift_text(int index); - QString ctrl_text(int index); - QString alt_text(int index); - QString fromUnicodeString(QString raw); + QString regular_text( int index ); + QString shift_text( int index ); + QString ctrl_text( int index ); + QString alt_text( int index ); + QString fromUnicodeString( QString raw ); protected: - void paintEvent(QPaintEvent* event); - void resizeEvent(QResizeEvent* event); - + void paintEvent( QPaintEvent* event ); + void resizeEvent( QResizeEvent* event ); }; -#endif // KEYBOARDPREVIEW_H +#endif // KEYBOARDPREVIEW_H diff --git a/src/modules/keyboardq/CMakeLists.txt b/src/modules/keyboardq/CMakeLists.txt index 729748a7f..cc1e7e2c3 100644 --- a/src/modules/keyboardq/CMakeLists.txt +++ b/src/modules/keyboardq/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# if( NOT WITH_QML ) calamares_skip_module( "keyboardq (QML is not supported in this build)" ) return() diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.cpp b/src/modules/keyboardq/KeyboardQmlViewStep.cpp index 783349075..d42ab5269 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.cpp +++ b/src/modules/keyboardq/KeyboardQmlViewStep.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2020, Camilo Higuita + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2020 Camilo Higuita + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "KeyboardQmlViewStep.h" diff --git a/src/modules/keyboardq/KeyboardQmlViewStep.h b/src/modules/keyboardq/KeyboardQmlViewStep.h index 22826f2cd..4571a9a60 100644 --- a/src/modules/keyboardq/KeyboardQmlViewStep.h +++ b/src/modules/keyboardq/KeyboardQmlViewStep.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef KEYBOARDQMLVIEWSTEP_H diff --git a/src/modules/keyboardq/ListItemDelegate.qml b/src/modules/keyboardq/ListItemDelegate.qml deleted file mode 100644 index 2ad10144c..000000000 --- a/src/modules/keyboardq/ListItemDelegate.qml +++ /dev/null @@ -1,63 +0,0 @@ -import io.calamares.ui 1.0 - -import QtQuick 2.10 -import QtQuick.Controls 2.10 -import QtQuick.Layouts 1.3 -import org.kde.kirigami 2.7 as Kirigami - -ItemDelegate { - - id: control - - - property alias label1 : _label1 - property alias label2 : _label2 - - hoverEnabled: true - - property bool isCurrentItem: ListView.isCurrentItem - background: Rectangle { - - color: isCurrentItem || hovered ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - opacity: isCurrentItem || hovered ? 0.8 : 0.5 - } - - width: 490 //parent.width - height: 36 - - contentItem: RowLayout { - - anchors.fill: parent - anchors.margins: Kirigami.Units.smallSpacing - - Label { - - id: _label1 - Layout.fillHeight: true - Layout.fillWidth: true - horizontalAlignment: Qt.AlignLeft - color: isCurrentItem ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor - } - - Label { - - id: _label2 - visible: text.length - Layout.fillHeight: true - Layout.maximumWidth: parent.width * 0.4 - horizontalAlignment: Qt.AlignRight - color: isCurrentItem ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor - opacity: isCurrentItem ? 1 : 0.7 - font.weight: Font.Light - } - - Kirigami.Icon { - - source: "checkmark" - Layout.preferredWidth: 22 - Layout.preferredHeight: 22 - color: Kirigami.Theme.highlightedTextColor - visible: isCurrentItem - } - } -} diff --git a/src/modules/keyboardq/ListViewTemplate.qml b/src/modules/keyboardq/ListViewTemplate.qml deleted file mode 100644 index 4564b887b..000000000 --- a/src/modules/keyboardq/ListViewTemplate.qml +++ /dev/null @@ -1,22 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.10 -import QtQuick.Layouts 1.3 -import org.kde.kirigami 2.7 as Kirigami - -ListView { - - id: control - - spacing: Kirigami.Units.smallSpacing - clip: true - boundsBehavior: Flickable.StopAtBounds - - Rectangle { - - z: parent.z - 1 - anchors.fill: parent - color: "#BDC3C7" - radius: 5 - opacity: 0.7 - } -} diff --git a/src/modules/keyboardq/ResponsiveBase.qml b/src/modules/keyboardq/ResponsiveBase.qml deleted file mode 100644 index 38fa15d1b..000000000 --- a/src/modules/keyboardq/ResponsiveBase.qml +++ /dev/null @@ -1,83 +0,0 @@ -import QtQuick 2.10 -import QtQuick.Controls 2.10 -import QtQuick.Layouts 1.3 -import org.kde.kirigami 2.7 as Kirigami -import QtGraphicalEffects 1.0 - -import io.calamares.ui 1.0 -import io.calamares.core 1.0 - -Page { - - id: control - width: 800 //parent.width - height: 550 //parent.height - - Kirigami.Theme.backgroundColor: "#FAFAFA" - Kirigami.Theme.textColor: "#1F1F1F" - - property string subtitle - property string message - - default property alias content : _content.data - property alias stackView: _stackView - - ColumnLayout { - - id: _content - - anchors.fill: parent - spacing: Kirigami.Units.smallSpacing * 5 - anchors.margins: Kirigami.Units.smallSpacing * 5 - anchors.bottomMargin: 20 - - Label { - - Layout.fillWidth: true - Layout.preferredHeight: Math.min(implicitHeight, 200) - horizontalAlignment: Qt.AlignHCenter - wrapMode: Text.NoWrap - elide: Text.ElideMiddle - text: control.title - color: Kirigami.Theme.textColor - font.bold: true - font.weight: Font.Bold - font.pointSize: 24 - } - - Label { - - Layout.fillWidth: true - Layout.preferredHeight: Math.min(implicitHeight, 200) - horizontalAlignment: Qt.AlignHCenter - wrapMode: Text.Wrap - elide: Text.ElideMiddle - text: control.subtitle - color: Kirigami.Theme.textColor - font.weight: Font.Light - font.pointSize: 12 - } - - Label { - - Layout.fillWidth: true - Layout.preferredHeight: Math.min(implicitHeight, 200) - horizontalAlignment: Qt.AlignHCenter - wrapMode: Text.Wrap - elide: Text.ElideMiddle - text: control.message - color: Kirigami.Theme.textColor - font.weight: Font.Light - font.pointSize: 10 - } - - StackView { - - id: _stackView - Layout.fillHeight: true - Layout.preferredWidth: parent.width - clip: true - } - - } -} diff --git a/src/modules/keyboardq/keyboardq.conf b/src/modules/keyboardq/keyboardq.conf index ee97c3939..d122f30d7 100644 --- a/src/modules/keyboardq/keyboardq.conf +++ b/src/modules/keyboardq/keyboardq.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # NOTE: you must have ckbcomp installed and runnable # on the live system, for keyboard layout previews. --- diff --git a/src/modules/keyboardq/keyboardq.qml b/src/modules/keyboardq/keyboardq.qml index 613223a1c..8f8bf05d1 100644 --- a/src/modules/keyboardq/keyboardq.qml +++ b/src/modules/keyboardq/keyboardq.qml @@ -1,195 +1,403 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +import io.calamares.core 1.0 import io.calamares.ui 1.0 import QtQuick 2.10 import QtQuick.Controls 2.10 +import QtQuick.Window 2.14 import QtQuick.Layouts 1.3 + import org.kde.kirigami 2.7 as Kirigami -ResponsiveBase { +Page { + width: 800 //parent.width + height: 500 - id: control + StackView { + id: stack + anchors.fill: parent + clip: true - title: stackView.currentItem.title - subtitle: stackView.currentItem.subtitle + initialItem: Item { + Label { - stackView.initialItem: Item { + id: header + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Keyboard Model") + color: Kirigami.Theme.textColor + font.bold: true + font.weight: Font.Bold + font.pointSize: 24 + } - id: _keyboardModelsComponet + Label { - property string title: qsTr("Keyboard Model") - property string subtitle: qsTr("Pick your preferred keyboard model or use the default one based on the detected hardware") + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: header.bottom + color: Kirigami.Theme.textColor + horizontalAlignment: Text.AlignHCenter + width: parent.width / 1.5 + wrapMode: Text.WordWrap + text: qsTr("Click your preferred keyboard model to select layout and variant, or use the default one based on the detected hardware.") + } - ListViewTemplate { + ListView { - id: _keyboardModelListView + id: list1 - anchors.centerIn: parent - implicitWidth: Math.min(parent.width, 500) - implicitHeight: Math.min(contentHeight, 300) - currentIndex: model.currentIndex + ScrollBar.vertical: ScrollBar { - model: config.keyboardModelsModel - - delegate: ListItemDelegate { - - id: _delegate - label1.text: model.label - onClicked: { - - _keyboardModelListView.model.currentIndex = index - control.stackView.push(_keyboardLayoutsComponent) + active: true } - } - } - - ColumnLayout{ - - spacing: 2 - anchors.verticalCenter: parent.verticalCenter - - Button { - - icon.name: "view-refresh" - width: parent.width - onClicked: control.stackView.pop() - text: qsTr("Refresh") - } - - Button { - - Layout.fillWidth: true - text: qsTr("Layouts") - icon.name: "go-next" - onClicked: control.stackView.push(_keyboardLayoutsComponent) - } - } - } - - Component { - - id: _keyboardLayoutsComponent - - Item { - - property string title: qsTr("Keyboard Layout") - property string subtitle: config.prettyStatus - - ListViewTemplate { - - id: _layoutsListView + width: parent.width / 2 + height: 250 anchors.centerIn: parent - - implicitWidth: Math.min(parent.width, 500) - implicitHeight: Math.min(contentHeight, 300) - - currentIndex: model.currentIndex - - model: config.keyboardLayoutsModel - - delegate: ListItemDelegate { - - id: _delegate - label1.text: model.label - onClicked: { - - _layoutsListView.model.currentIndex = index - _layoutsListView.positionViewAtIndex(index, ListView.Center) - control.stackView.push(_keyboardVariantsComponent) - } - } - } - - ColumnLayout{ - + anchors.verticalCenterOffset: -30 + focus: true + clip: true + boundsBehavior: Flickable.StopAtBounds spacing: 2 - anchors.verticalCenter: parent.verticalCenter - Button { + Rectangle { - Layout.fillWidth: true - icon.name: "go-previous" - text: qsTr("Models") - onClicked: control.stackView.pop() + z: parent.z - 1 + anchors.fill: parent + color: "#BDC3C7" + radius: 5 + opacity: 0.7 } - Button { - - Layout.fillWidth: true - icon.name: "go-next" - text: qsTr("Variants") - onClicked: control.stackView.push(_keyboardVariantsComponent) - } - } - } - } - - Component { - - id: _keyboardVariantsComponent - - Item { - - property string title: qsTr("Keyboard Layout") - property string subtitle: config.prettyStatus - - ListViewTemplate { - - id: _variantsListView - - anchors.centerIn: parent - - implicitWidth: Math.min(parent.width, 500) - implicitHeight: Math.min(contentHeight, 300) + model: config.keyboardModelsModel + //model: ["Africa", "America", "Antarctica", "Arctic", "Asia", "Atlantic", "Australia", "Europe", "Indian", "Pacific"] currentIndex: model.currentIndex + delegate: ItemDelegate { - model: config.keyboardVariantsModel + hoverEnabled: true + width: parent.width + highlighted: ListView.isCurrentItem - delegate: ListItemDelegate { + RowLayout { + anchors.fill: parent + + Label { + + text: model.label // modelData + Layout.fillHeight: true + Layout.fillWidth: true + width: parent.width + height: 32 + color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor + + background: Rectangle { + + color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor + opacity: highlighted || hovered ? 0.5 : 0.3 + } + } + + Kirigami.Icon { + + source: "checkmark" + Layout.preferredWidth: 22 + Layout.preferredHeight: 22 + color: Kirigami.Theme.highlightedTextColor + visible: highlighted + } + } - id: _delegate - label1.text: model.label onClicked: { - _variantsListView.model.currentIndex = index - _variantsListView.positionViewAtIndex(index, ListView.Center) + list1.model.currentIndex = index + stack.push(layoutsList) + list1.positionViewAtIndex(index, ListView.Center) } } } + } - ColumnLayout{ + Component { + id: layoutsList - anchors.verticalCenter: parent.verticalCenter - - Button { + Item { - Layout.fillWidth: true - text: qsTr("Layouts") - icon.name: "go-previous" - onClicked: control.stackView.pop() + Label { + + id: header + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Keyboard Layout") + color: Kirigami.Theme.textColor + font.bold: true + font.weight: Font.Bold + font.pointSize: 24 + } + + Label { + + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: header.bottom + color: Kirigami.Theme.textColor + horizontalAlignment: Text.AlignHCenter + width: parent.width / 1.5 + wrapMode: Text.WordWrap + text: config.prettyStatus + //text: qsTr("Set keyboard model or use the default one based on the detected hardware.") + } + + ListView { + + id: list2 + + ScrollBar.vertical: ScrollBar { + + active: true + } + + width: parent.width / 2 + height: 250 + anchors.centerIn: parent + anchors.verticalCenterOffset: -30 + focus: true + clip: true + boundsBehavior: Flickable.StopAtBounds + spacing: 2 + + Rectangle { + + z: parent.z - 1 + anchors.fill: parent + color: "#BDC3C7" + radius: 5 + opacity: 0.7 + } + + model: config.keyboardLayoutsModel + //model: ["Brussels", "London", "Madrid", "New York", "Melbourne", "London", "Madrid", "New York", "Brussels", "London", "Madrid", "New York", "Brussels", "London", "Madrid", "New York"] + + currentIndex: model.currentIndex + delegate: ItemDelegate { + + hoverEnabled: true + width: parent.width + highlighted: ListView.isCurrentItem + + RowLayout { + anchors.fill: parent + + Label { + + text: model.label // modelData + Layout.fillHeight: true + Layout.fillWidth: true + width: parent.width + height: 30 + color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor + + background: Rectangle { + + color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor + opacity: highlighted || hovered ? 0.5 : 0.3 + } + } + + Kirigami.Icon { + + source: "checkmark" + Layout.preferredWidth: 22 + Layout.preferredHeight: 22 + color: Kirigami.Theme.highlightedTextColor + visible: highlighted + } + } + + onClicked: { + + list2.model.currentIndex = index + stack.push(variantsList) + list2.positionViewAtIndex(index, ListView.Center) + } + } + } + + ColumnLayout { + + spacing: 2 + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: -30 + anchors.left: parent.left + anchors.leftMargin: parent.width / 15 + + Button { + + icon.name: "go-previous" + text: qsTr("Models") + onClicked: stack.pop() + } + + Button { + + icon.name: "go-next" + text: qsTr("Variants") + onClicked: stack.push(variantsList) + } } } } + Component { + id: variantsList + + Item { + + Label { + + id: header + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Keyboard Variant") + color: Kirigami.Theme.textColor + font.bold: true + font.weight: Font.Bold + font.pointSize: 24 + } + + Label { + + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: header.bottom + color: Kirigami.Theme.textColor + horizontalAlignment: Text.AlignHCenter + width: parent.width / 1.5 + wrapMode: Text.WordWrap + text: config.prettyStatus + //text: qsTr("Variant keyboard model or use the default one based on the detected hardware.") + } + + ListView { + + id: list3 + + ScrollBar.vertical: ScrollBar { + + active: true + } + + width: parent.width / 2 + height: 250 + anchors.centerIn: parent + anchors.verticalCenterOffset: -30 + focus: true + clip: true + boundsBehavior: Flickable.StopAtBounds + spacing: 2 + + Rectangle { + + z: parent.z - 1 + anchors.fill: parent + color: "#BDC3C7" + radius: 5 + opacity: 0.7 + } + + model: config.keyboardVariantsModel + //model: ["Brussels", "London", "Madrid", "New York", "Melbourne", "London", "Madrid", "New York", "Brussels", "London", "Madrid", "New York", "Brussels", "London", "Madrid", "New York"] + + currentIndex: model.currentIndex + delegate: ItemDelegate { + + hoverEnabled: true + width: parent.width + highlighted: ListView.isCurrentItem + + RowLayout { + anchors.fill: parent + + Label { + + text: model.label //modelData + Layout.fillHeight: true + Layout.fillWidth: true + width: parent.width + height: 30 + color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor + + background: Rectangle { + + color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor + opacity: highlighted || hovered ? 0.5 : 0.3 + } + } + + Kirigami.Icon { + + source: "checkmark" + Layout.preferredWidth: 22 + Layout.preferredHeight: 22 + color: Kirigami.Theme.highlightedTextColor + visible: highlighted + } + } + + onClicked: { + + list3.model.currentIndex = index + list3.positionViewAtIndex(index, ListView.Center) + } + } + } + + Button { + + Layout.fillWidth: true + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: -30 + anchors.left: parent.left + anchors.leftMargin: parent.width / 15 + icon.name: "go-previous" + text: qsTr("Layouts") + onClicked: stack.pop() + } + } + } } TextField { placeholderText: qsTr("Test your keyboard") - Layout.preferredHeight: 48 - Layout.maximumWidth: 500 - Layout.fillWidth: true - Layout.alignment: Qt.AlignCenter - color: control.Kirigami.Theme.textColor + height: 48 + width: parent.width / 1.5 + horizontalAlignment: TextInput.AlignHCenter + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: parent.height / 10 + color: "#1F1F1F" background:Rectangle { z: parent.z - 1 anchors.fill: parent color: "#BDC3C7" - radius: 5 + radius: 2 opacity: 0.3 } } diff --git a/src/modules/keyboardq/keyboardq.qrc b/src/modules/keyboardq/keyboardq.qrc index b2ee36ee5..492f6e213 100644 --- a/src/modules/keyboardq/keyboardq.qrc +++ b/src/modules/keyboardq/keyboardq.qrc @@ -3,8 +3,5 @@ ../keyboard/kbd-model-map ../keyboard/images/restore.png keyboardq.qml - ListItemDelegate.qml - ListViewTemplate.qml - ResponsiveBase.qml diff --git a/src/modules/license/CMakeLists.txt b/src/modules/license/CMakeLists.txt index 164233b3b..baaf34b43 100644 --- a/src/modules/license/CMakeLists.txt +++ b/src/modules/license/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) calamares_add_plugin( license diff --git a/src/modules/license/LicensePage.cpp b/src/modules/license/LicensePage.cpp index f2b1f4a50..1a92e9ac1 100644 --- a/src/modules/license/LicensePage.cpp +++ b/src/modules/license/LicensePage.cpp @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Anke Boersma - * Copyright 2015, Alexandre Arnt - * Copyright 2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Anke Boersma + * SPDX-FileCopyrightText: 2015 Alexandre Arnt + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "LicensePage.h" diff --git a/src/modules/license/LicensePage.h b/src/modules/license/LicensePage.h index dcd3ea7b4..73a62defa 100644 --- a/src/modules/license/LicensePage.h +++ b/src/modules/license/LicensePage.h @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Anke Boersma - * Copyright 2015, Alexandre Arnt - * Copyright 2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Anke Boersma + * SPDX-FileCopyrightText: 2015 Alexandre Arnt + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LICENSEPAGE_H diff --git a/src/modules/license/LicensePage.ui b/src/modules/license/LicensePage.ui index b5936d5de..817775c38 100644 --- a/src/modules/license/LicensePage.ui +++ b/src/modules/license/LicensePage.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2015 demmm <anke62@gmail.com> +SPDX-License-Identifier: GPL-3.0-or-later + LicensePage diff --git a/src/modules/license/LicenseViewStep.cpp b/src/modules/license/LicenseViewStep.cpp index 89cddf27f..aca04a1b3 100644 --- a/src/modules/license/LicenseViewStep.cpp +++ b/src/modules/license/LicenseViewStep.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Anke Boersma - * Copyright 2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2015 Anke Boersma + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "LicenseViewStep.h" diff --git a/src/modules/license/LicenseViewStep.h b/src/modules/license/LicenseViewStep.h index 6bfab4246..15e345221 100644 --- a/src/modules/license/LicenseViewStep.h +++ b/src/modules/license/LicenseViewStep.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Anke Boersma - * Copyright 2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2015 Anke Boersma + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LICENSEPAGEPLUGIN_H diff --git a/src/modules/license/LicenseWidget.cpp b/src/modules/license/LicenseWidget.cpp index 09d2230e5..b2e66515d 100644 --- a/src/modules/license/LicenseWidget.cpp +++ b/src/modules/license/LicenseWidget.cpp @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Anke Boersma - * Copyright 2015, Alexandre Arnt - * Copyright 2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Anke Boersma + * SPDX-FileCopyrightText: 2015 Alexandre Arnt + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "LicenseWidget.h" diff --git a/src/modules/license/LicenseWidget.h b/src/modules/license/LicenseWidget.h index a386ae353..2d810e80a 100644 --- a/src/modules/license/LicenseWidget.h +++ b/src/modules/license/LicenseWidget.h @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Anke Boersma - * Copyright 2015, Alexandre Arnt - * Copyright 2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Anke Boersma + * SPDX-FileCopyrightText: 2015 Alexandre Arnt + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LICENSE_LICENSEWIDGET_H diff --git a/src/modules/license/README.md b/src/modules/license/README.md index 4c9862c8a..0ad7a636e 100644 --- a/src/modules/license/README.md +++ b/src/modules/license/README.md @@ -1,11 +1,25 @@ ### License Approval Module ---------- -For distributions shipping proprietary software, this module creates a globalstorage entry when the user accepts or declines one or more presented End User License Agreements files. -The number of licenses shown are configurable. The license.conf file has a few examples of how to add URLs. -If you do not want to include this module in your Calamares build, add ```-DSKIP_MODULES="license"``` to your build settings (CMake call). + + +For distributions shipping proprietary software, this module creates a +Global Storage entry when the user accepts or declines one or more of +the End User License Agreements files that are presented here. + +The number of licenses shown are configurable. The `license.conf` file +has a few examples of how to add URLs. + +If you do not want to include this module in your Calamares build, +add `-DSKIP_MODULES="license"` to your build settings (CMake call). + +How to implement the removal or not installing of proprietary software is +up to any distribution to implement. For example, proprietary graphics +drivers cannot simply be removed in the packages module, a free version +will need to be installed. -How to implement the removal or not installing of proprietary software is up to any distribution to implement. For example, proprietary graphics drivers cannot simply be removed in the packages module, a free version will need to be installed. An example of where the licenseAgree globalstorage entry is used: https://github.com/KaOSx/calamares/blob/master/src/modules/nonfree_drivers/main.py diff --git a/src/modules/license/license.conf b/src/modules/license/license.conf index 8a1672887..e32d49984 100644 --- a/src/modules/license/license.conf +++ b/src/modules/license/license.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration file for License viewmodule, Calamares # Syntax is YAML 1.2 --- diff --git a/src/modules/license/license.schema.yaml b/src/modules/license/license.schema.yaml index 090b2428e..d933ac15a 100644 --- a/src/modules/license/license.schema.yaml +++ b/src/modules/license/license.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/license diff --git a/src/modules/locale/CMakeLists.txt b/src/modules/locale/CMakeLists.txt index 6f965f041..3802f92b2 100644 --- a/src/modules/locale/CMakeLists.txt +++ b/src/modules/locale/CMakeLists.txt @@ -1,3 +1,9 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + # When debugging the timezone widget, add this debugging definition # to have a debugging-friendly timezone widget, debug logging, # and no intrusive timezone-setting while clicking around. diff --git a/src/modules/locale/Config.cpp b/src/modules/locale/Config.cpp index 5bbe20038..37857cc71 100644 --- a/src/modules/locale/Config.cpp +++ b/src/modules/locale/Config.cpp @@ -1,21 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Config.h" diff --git a/src/modules/locale/Config.h b/src/modules/locale/Config.h index d95606d99..a7ae0ccaf 100644 --- a/src/modules/locale/Config.h +++ b/src/modules/locale/Config.h @@ -1,21 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LOCALE_CONFIG_H diff --git a/src/modules/locale/LCLocaleDialog.cpp b/src/modules/locale/LCLocaleDialog.cpp index db33f0c3d..efa85c536 100644 --- a/src/modules/locale/LCLocaleDialog.cpp +++ b/src/modules/locale/LCLocaleDialog.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "LCLocaleDialog.h" diff --git a/src/modules/locale/LCLocaleDialog.h b/src/modules/locale/LCLocaleDialog.h index 81e4cb547..2d1869a62 100644 --- a/src/modules/locale/LCLocaleDialog.h +++ b/src/modules/locale/LCLocaleDialog.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LCLOCALEDIALOG_H diff --git a/src/modules/locale/LocaleConfiguration.cpp b/src/modules/locale/LocaleConfiguration.cpp index 055907228..c208dc02d 100644 --- a/src/modules/locale/LocaleConfiguration.cpp +++ b/src/modules/locale/LocaleConfiguration.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2017-2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "LocaleConfiguration.h" diff --git a/src/modules/locale/LocaleConfiguration.h b/src/modules/locale/LocaleConfiguration.h index 2e02bc02a..acd80953c 100644 --- a/src/modules/locale/LocaleConfiguration.h +++ b/src/modules/locale/LocaleConfiguration.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2017-2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LOCALECONFIGURATION_H diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index d4ad6854e..7a6ed8b15 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -1,21 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "LocalePage.h" diff --git a/src/modules/locale/LocalePage.h b/src/modules/locale/LocalePage.h index 4f2d321b5..c8b80e906 100644 --- a/src/modules/locale/LocalePage.h +++ b/src/modules/locale/LocalePage.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LOCALEPAGE_H diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 9ffb96c25..2145ad201 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "LocaleViewStep.h" diff --git a/src/modules/locale/LocaleViewStep.h b/src/modules/locale/LocaleViewStep.h index 0a40da861..fd9c00796 100644 --- a/src/modules/locale/LocaleViewStep.h +++ b/src/modules/locale/LocaleViewStep.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LOCALEVIEWSTEP_H diff --git a/src/modules/locale/SetTimezoneJob.cpp b/src/modules/locale/SetTimezoneJob.cpp index aa8c4c241..675cca8af 100644 --- a/src/modules/locale/SetTimezoneJob.cpp +++ b/src/modules/locale/SetTimezoneJob.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2015, Rohan Garg + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2015 Rohan Garg + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "SetTimezoneJob.h" diff --git a/src/modules/locale/SetTimezoneJob.h b/src/modules/locale/SetTimezoneJob.h index 7b93770bb..d51171256 100644 --- a/src/modules/locale/SetTimezoneJob.h +++ b/src/modules/locale/SetTimezoneJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef SETTIMEZONEJOB_H diff --git a/src/modules/locale/Tests.cpp b/src/modules/locale/Tests.cpp index 021140b60..6fe9d5662 100644 --- a/src/modules/locale/Tests.cpp +++ b/src/modules/locale/Tests.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Config.h" diff --git a/src/modules/locale/images/bg.png.license b/src/modules/locale/images/bg.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/src/modules/locale/images/bg.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/locale/images/orig/bg.png b/src/modules/locale/images/orig/bg.png deleted file mode 100644 index d7479bf96..000000000 Binary files a/src/modules/locale/images/orig/bg.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-1.0.png b/src/modules/locale/images/orig/timezone_-1.0.png deleted file mode 100644 index fb00d83c5..000000000 Binary files a/src/modules/locale/images/orig/timezone_-1.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-10.0.png b/src/modules/locale/images/orig/timezone_-10.0.png deleted file mode 100644 index 472eb888a..000000000 Binary files a/src/modules/locale/images/orig/timezone_-10.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-11.0.png b/src/modules/locale/images/orig/timezone_-11.0.png deleted file mode 100644 index 5f8c5d6f9..000000000 Binary files a/src/modules/locale/images/orig/timezone_-11.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-2.0.png b/src/modules/locale/images/orig/timezone_-2.0.png deleted file mode 100644 index 30a1ec738..000000000 Binary files a/src/modules/locale/images/orig/timezone_-2.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-3.0.png b/src/modules/locale/images/orig/timezone_-3.0.png deleted file mode 100644 index c22dbb64a..000000000 Binary files a/src/modules/locale/images/orig/timezone_-3.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-3.5.png b/src/modules/locale/images/orig/timezone_-3.5.png deleted file mode 100644 index c1df00b9b..000000000 Binary files a/src/modules/locale/images/orig/timezone_-3.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-4.0.png b/src/modules/locale/images/orig/timezone_-4.0.png deleted file mode 100644 index 4b5a4318c..000000000 Binary files a/src/modules/locale/images/orig/timezone_-4.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-4.5.png b/src/modules/locale/images/orig/timezone_-4.5.png deleted file mode 100644 index 9e3c13459..000000000 Binary files a/src/modules/locale/images/orig/timezone_-4.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-5.0.png b/src/modules/locale/images/orig/timezone_-5.0.png deleted file mode 100644 index 06c15e697..000000000 Binary files a/src/modules/locale/images/orig/timezone_-5.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-5.5.png b/src/modules/locale/images/orig/timezone_-5.5.png deleted file mode 100644 index b1c788dc8..000000000 Binary files a/src/modules/locale/images/orig/timezone_-5.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-6.0.png b/src/modules/locale/images/orig/timezone_-6.0.png deleted file mode 100644 index 8505fb1f7..000000000 Binary files a/src/modules/locale/images/orig/timezone_-6.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-7.0.png b/src/modules/locale/images/orig/timezone_-7.0.png deleted file mode 100644 index fec235da4..000000000 Binary files a/src/modules/locale/images/orig/timezone_-7.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-8.0.png b/src/modules/locale/images/orig/timezone_-8.0.png deleted file mode 100644 index bdad7bf50..000000000 Binary files a/src/modules/locale/images/orig/timezone_-8.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-9.0.png b/src/modules/locale/images/orig/timezone_-9.0.png deleted file mode 100644 index 04cb3cb8b..000000000 Binary files a/src/modules/locale/images/orig/timezone_-9.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_-9.5.png b/src/modules/locale/images/orig/timezone_-9.5.png deleted file mode 100644 index b1c788dc8..000000000 Binary files a/src/modules/locale/images/orig/timezone_-9.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_0.0.png b/src/modules/locale/images/orig/timezone_0.0.png deleted file mode 100644 index e59b773ca..000000000 Binary files a/src/modules/locale/images/orig/timezone_0.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_1.0.png b/src/modules/locale/images/orig/timezone_1.0.png deleted file mode 100644 index 2053b7e2e..000000000 Binary files a/src/modules/locale/images/orig/timezone_1.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_10.0.png b/src/modules/locale/images/orig/timezone_10.0.png deleted file mode 100644 index 475dcf43a..000000000 Binary files a/src/modules/locale/images/orig/timezone_10.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_10.5.png b/src/modules/locale/images/orig/timezone_10.5.png deleted file mode 100644 index 6ec7f9fa9..000000000 Binary files a/src/modules/locale/images/orig/timezone_10.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_11.0.png b/src/modules/locale/images/orig/timezone_11.0.png deleted file mode 100644 index 6168aa2ba..000000000 Binary files a/src/modules/locale/images/orig/timezone_11.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_11.5.png b/src/modules/locale/images/orig/timezone_11.5.png deleted file mode 100644 index afdedd7e0..000000000 Binary files a/src/modules/locale/images/orig/timezone_11.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_12.0.png b/src/modules/locale/images/orig/timezone_12.0.png deleted file mode 100644 index d0b35317e..000000000 Binary files a/src/modules/locale/images/orig/timezone_12.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_12.75.png b/src/modules/locale/images/orig/timezone_12.75.png deleted file mode 100644 index 4f74a8582..000000000 Binary files a/src/modules/locale/images/orig/timezone_12.75.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_13.0.png b/src/modules/locale/images/orig/timezone_13.0.png deleted file mode 100644 index fe2f134cd..000000000 Binary files a/src/modules/locale/images/orig/timezone_13.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_2.0.png b/src/modules/locale/images/orig/timezone_2.0.png deleted file mode 100644 index ec1e87401..000000000 Binary files a/src/modules/locale/images/orig/timezone_2.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_3.0.png b/src/modules/locale/images/orig/timezone_3.0.png deleted file mode 100644 index eda59dce1..000000000 Binary files a/src/modules/locale/images/orig/timezone_3.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_3.5.png b/src/modules/locale/images/orig/timezone_3.5.png deleted file mode 100644 index 2dc7399a8..000000000 Binary files a/src/modules/locale/images/orig/timezone_3.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_4.0.png b/src/modules/locale/images/orig/timezone_4.0.png deleted file mode 100644 index 483dc5342..000000000 Binary files a/src/modules/locale/images/orig/timezone_4.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_4.5.png b/src/modules/locale/images/orig/timezone_4.5.png deleted file mode 100644 index e09ed90bb..000000000 Binary files a/src/modules/locale/images/orig/timezone_4.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_5.0.png b/src/modules/locale/images/orig/timezone_5.0.png deleted file mode 100644 index 1bb6d20f3..000000000 Binary files a/src/modules/locale/images/orig/timezone_5.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_5.5.png b/src/modules/locale/images/orig/timezone_5.5.png deleted file mode 100644 index f904cc298..000000000 Binary files a/src/modules/locale/images/orig/timezone_5.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_5.75.png b/src/modules/locale/images/orig/timezone_5.75.png deleted file mode 100644 index 827ce1a45..000000000 Binary files a/src/modules/locale/images/orig/timezone_5.75.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_6.0.png b/src/modules/locale/images/orig/timezone_6.0.png deleted file mode 100644 index 460f9cf11..000000000 Binary files a/src/modules/locale/images/orig/timezone_6.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_6.5.png b/src/modules/locale/images/orig/timezone_6.5.png deleted file mode 100644 index d307bf310..000000000 Binary files a/src/modules/locale/images/orig/timezone_6.5.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_7.0.png b/src/modules/locale/images/orig/timezone_7.0.png deleted file mode 100644 index 239115af9..000000000 Binary files a/src/modules/locale/images/orig/timezone_7.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_8.0.png b/src/modules/locale/images/orig/timezone_8.0.png deleted file mode 100644 index 3627686fd..000000000 Binary files a/src/modules/locale/images/orig/timezone_8.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_9.0.png b/src/modules/locale/images/orig/timezone_9.0.png deleted file mode 100644 index 65d2e46dd..000000000 Binary files a/src/modules/locale/images/orig/timezone_9.0.png and /dev/null differ diff --git a/src/modules/locale/images/orig/timezone_9.5.png b/src/modules/locale/images/orig/timezone_9.5.png deleted file mode 100644 index 1c3290c08..000000000 Binary files a/src/modules/locale/images/orig/timezone_9.5.png and /dev/null differ diff --git a/src/modules/locale/images/pin.png.license b/src/modules/locale/images/pin.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/src/modules/locale/images/pin.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/locale/locale.conf b/src/modules/locale/locale.conf index 8236a879b..4463f7a94 100644 --- a/src/modules/locale/locale.conf +++ b/src/modules/locale/locale.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# --- # These settings are used to set your default system time zone. # Time zones are usually located under /usr/share/zoneinfo and diff --git a/src/modules/locale/locale.schema.yaml b/src/modules/locale/locale.schema.yaml index d6c35020f..7aa781127 100644 --- a/src/modules/locale/locale.schema.yaml +++ b/src/modules/locale/locale.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/locale diff --git a/src/modules/locale/timezonewidget/TimeZoneImage.cpp b/src/modules/locale/timezonewidget/TimeZoneImage.cpp index 22bd263d6..54aa1afd5 100644 --- a/src/modules/locale/timezonewidget/TimeZoneImage.cpp +++ b/src/modules/locale/timezonewidget/TimeZoneImage.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "TimeZoneImage.h" diff --git a/src/modules/locale/timezonewidget/TimeZoneImage.h b/src/modules/locale/timezonewidget/TimeZoneImage.h index ee02bfbfd..c36f4e2f7 100644 --- a/src/modules/locale/timezonewidget/TimeZoneImage.h +++ b/src/modules/locale/timezonewidget/TimeZoneImage.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TIMEZONEIMAGE_H diff --git a/src/modules/locale/timezonewidget/timezonewidget.cpp b/src/modules/locale/timezonewidget/timezonewidget.cpp index 778f0535d..9ad9f2d3f 100644 --- a/src/modules/locale/timezonewidget/timezonewidget.cpp +++ b/src/modules/locale/timezonewidget/timezonewidget.cpp @@ -1,24 +1,16 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc. + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * * Originally from the Manjaro Installation Framework * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "locale/TimeZone.h" diff --git a/src/modules/locale/timezonewidget/timezonewidget.h b/src/modules/locale/timezonewidget/timezonewidget.h index c15570b52..3a2911597 100644 --- a/src/modules/locale/timezonewidget/timezonewidget.h +++ b/src/modules/locale/timezonewidget/timezonewidget.h @@ -1,24 +1,16 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc. + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * * Originally from the Manjaro Installation Framework * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TIMEZONEWIDGET_H diff --git a/src/modules/localecfg/main.py b/src/modules/localecfg/main.py index 9e50fb448..8f0edcd17 100644 --- a/src/modules/localecfg/main.py +++ b/src/modules/localecfg/main.py @@ -1,26 +1,17 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Anke Boersma -# Copyright 2015, Philip Müller -# Copyright 2016, Teo Mrnjavac -# Copyright 2018, AlmAck -# Copyright 2018-2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2014 Anke Boersma +# SPDX-FileCopyrightText: 2015 Philip Müller +# SPDX-FileCopyrightText: 2016 Teo Mrnjavac +# SPDX-FileCopyrightText: 2018 AlmAck +# SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import os import re diff --git a/src/modules/localecfg/module.desc b/src/modules/localecfg/module.desc index 4b8cd9e6d..030846a3e 100644 --- a/src/modules/localecfg/module.desc +++ b/src/modules/localecfg/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # Enable the configured locales (those set by the user on the # user page) in /etc/locale.gen, if they are available in the # target system. diff --git a/src/modules/localeq/CMakeLists.txt b/src/modules/localeq/CMakeLists.txt index c9ed1cd55..55c16091c 100644 --- a/src/modules/localeq/CMakeLists.txt +++ b/src/modules/localeq/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# if( NOT WITH_QML ) calamares_skip_module( "localeq (QML is not supported in this build)" ) return() diff --git a/src/modules/localeq/LocaleQmlViewStep.cpp b/src/modules/localeq/LocaleQmlViewStep.cpp index d60664a8f..6139d3a45 100644 --- a/src/modules/localeq/LocaleQmlViewStep.cpp +++ b/src/modules/localeq/LocaleQmlViewStep.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018,2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 20182020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "LocaleQmlViewStep.h" diff --git a/src/modules/localeq/LocaleQmlViewStep.h b/src/modules/localeq/LocaleQmlViewStep.h index bbafd5abb..ca70ca5d9 100644 --- a/src/modules/localeq/LocaleQmlViewStep.h +++ b/src/modules/localeq/LocaleQmlViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019-2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LOCALE_QMLVIEWSTEP_H diff --git a/src/modules/localeq/Map.qml b/src/modules/localeq/Map.qml index d414825dd..845f16ea3 100644 --- a/src/modules/localeq/Map.qml +++ b/src/modules/localeq/Map.qml @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ import QtQuick 2.10 diff --git a/src/modules/localeq/Offline.qml b/src/modules/localeq/Offline.qml index 8e9d91280..5a0d4eb3f 100644 --- a/src/modules/localeq/Offline.qml +++ b/src/modules/localeq/Offline.qml @@ -1,21 +1,15 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + import QtQuick 2.10 import QtQuick.Controls 2.10 import QtQuick.Window 2.14 @@ -23,43 +17,200 @@ import QtQuick.Layouts 1.3 import org.kde.kirigami 2.7 as Kirigami -Column { - width: parent.width +Page { + width: 800 //parent.width + height: 500 - //Needs to come from localeq.conf - property var configTimezone: "America/New York" + StackView { + id: stack + anchors.fill: parent + clip: true - Rectangle { - width: parent.width - height: parent.height / 1.28 + initialItem: Item { - Image { - id: image - anchors.fill: parent - source: "img/worldmap.png" - width: parent.width + Label { + + id: region + anchors.horizontalCenter: parent.horizontalCenter + color: Kirigami.Theme.textColor + horizontalAlignment: Text.AlignCenter + text: qsTr("Select your preferred Region, or use the default one based on your current location.") + } + + ListView { + + id: list + ScrollBar.vertical: ScrollBar { + active: true + } + + width: parent.width / 2 + height: 250 + anchors.centerIn: parent + anchors.verticalCenterOffset: -30 + focus: true + clip: true + boundsBehavior: Flickable.StopAtBounds + spacing: 2 + + Rectangle { + + z: parent.z - 1 + anchors.fill: parent + color: "#BDC3C7" + radius: 5 + opacity: 0.7 + } + + // model loads, dozens of variations tried for currentIndex all fail + model: config.regionModel + currentIndex: config.currentIndex + delegate: ItemDelegate { + + hoverEnabled: true + width: parent.width + highlighted: ListView.isCurrentItem + + Label { + + text: name + Layout.fillHeight: true + Layout.fillWidth: true + width: parent.width + height: 30 + color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor + + background: Rectangle { + + color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor + opacity: highlighted || hovered ? 0.5 : 0.3 + } + } + + onClicked: { + + list.model.currentIndex = index + // correct to use config.currentTimezoneName when index is updated? + tztext.text = qsTr("Timezone: %1").arg(config.currentTimezoneName) + stack.push(zoneView) + } + } + } + } + + Component { + id: zoneView + + Item { + + Label { + + id: zone + anchors.horizontalCenter: parent.horizontalCenter + color: Kirigami.Theme.textColor + text: qsTr("Select your preferred Zone within your Region.") + } + + ListView { + + id: list2 + ScrollBar.vertical: ScrollBar { + active: true + } + + width: parent.width / 2 + height: 250 + anchors.centerIn: parent + anchors.verticalCenterOffset: -30 + focus: true + clip: true + boundsBehavior: Flickable.StopAtBounds + spacing: 2 + + Rectangle { + + z: parent.z - 1 + anchors.fill: parent + color: "#BDC3C7" + radius: 5 + opacity: 0.7 + } + + // model loads, dozens of variations tried for currentIndex all fail + model: config.regionalZonesModel + currentIndex: config.currentIndex + delegate: ItemDelegate { + + hoverEnabled: true + width: parent.width + highlighted: ListView.isCurrentItem + + Label { + + text: name + Layout.fillHeight: true + Layout.fillWidth: true + width: parent.width + height: 30 + color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor + + background: Rectangle { + + color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor + opacity: highlighted || hovered ? 0.5 : 0.3 + } + } + + onClicked: { + + list2.model.currentIndex = index + list2.positionViewAtIndex(index, ListView.Center) + // correct to use config.currentTimezoneName when index is updated? + tztext.text = qsTr("Timezone: %1").arg(config.currentTimezoneName) + } + } + } + + Button { + + Layout.fillWidth: true + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: -30 + anchors.left: parent.left + anchors.leftMargin: parent.width / 15 + icon.name: "go-previous" + text: qsTr("Zones") + onClicked: stack.pop() + } + } } } Rectangle { + width: parent.width - height: 100 + height: 60 anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom Item { + id: location Kirigami.Theme.inherit: false Kirigami.Theme.colorSet: Kirigami.Theme.Complementary anchors.horizontalCenter: parent.horizontalCenter Rectangle { + anchors.centerIn: parent width: 300 height: 30 color: Kirigami.Theme.backgroundColor Text { - text: qsTr("Timezone: %1").arg(configTimezone) + + id: tztext + text: qsTr("Timezone: %1").arg(config.currentTimezoneName) color: Kirigami.Theme.textColor anchors.centerIn: parent } @@ -67,6 +218,7 @@ Column { } Text { + anchors.top: location.bottom anchors.topMargin: 20 padding: 10 @@ -74,7 +226,7 @@ Column { wrapMode: Text.WordWrap horizontalAlignment: Text.AlignHCenter Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor - text: qsTr("To be able to select a timezone, make sure you are connected to the internet. Restart the installer after connecting. You can fine-tune Language and Locale settings below.") + text: qsTr("You can fine-tune Language and Locale settings below.") } } } diff --git a/src/modules/localeq/i18n.qml b/src/modules/localeq/i18n.qml index 6907b1ba8..63cad8bf5 100644 --- a/src/modules/localeq/i18n.qml +++ b/src/modules/localeq/i18n.qml @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ import io.calamares.ui 1.0 diff --git a/src/modules/localeq/img/chevron-left-solid.svg.license b/src/modules/localeq/img/chevron-left-solid.svg.license new file mode 100644 index 000000000..5a578a8a2 --- /dev/null +++ b/src/modules/localeq/img/chevron-left-solid.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2020 https://github.com/FortAwesome/Font-Awesome +SPDX-License-Identifier: CC-BY-4.0 diff --git a/src/modules/localeq/img/locale.svg.license b/src/modules/localeq/img/locale.svg.license new file mode 100644 index 000000000..5f43e650d --- /dev/null +++ b/src/modules/localeq/img/locale.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2020 demmm +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/localeq/img/minus.png.license b/src/modules/localeq/img/minus.png.license new file mode 100644 index 000000000..5f43e650d --- /dev/null +++ b/src/modules/localeq/img/minus.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2020 demmm +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/localeq/img/pin.svg.license b/src/modules/localeq/img/pin.svg.license new file mode 100644 index 000000000..5f43e650d --- /dev/null +++ b/src/modules/localeq/img/pin.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2020 demmm +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/localeq/img/plus.png.license b/src/modules/localeq/img/plus.png.license new file mode 100644 index 000000000..5f43e650d --- /dev/null +++ b/src/modules/localeq/img/plus.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2020 demmm +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/localeq/img/worldmap.png b/src/modules/localeq/img/worldmap.png deleted file mode 100644 index c5c181985..000000000 Binary files a/src/modules/localeq/img/worldmap.png and /dev/null differ diff --git a/src/modules/localeq/localeq.conf b/src/modules/localeq/localeq.conf index 4beb4fe85..bb2a7e816 100644 --- a/src/modules/localeq/localeq.conf +++ b/src/modules/localeq/localeq.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# --- # This settings are used to set your default system time zone. # Time zones are usually located under /usr/share/zoneinfo and diff --git a/src/modules/localeq/localeq.qml b/src/modules/localeq/localeq.qml index a2013f5de..dbaa09034 100644 --- a/src/modules/localeq/localeq.qml +++ b/src/modules/localeq/localeq.qml @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ import io.calamares.core 1.0 diff --git a/src/modules/localeq/localeq.qrc b/src/modules/localeq/localeq.qrc index 3f7c9b5e5..a3f8dec9d 100644 --- a/src/modules/localeq/localeq.qrc +++ b/src/modules/localeq/localeq.qrc @@ -9,6 +9,5 @@ img/pin.svg img/plus.png img/chevron-left-solid.svg - img/worldmap.png diff --git a/src/modules/luksbootkeyfile/CMakeLists.txt b/src/modules/luksbootkeyfile/CMakeLists.txt index 5e69d3acb..1782e7e0e 100644 --- a/src/modules/luksbootkeyfile/CMakeLists.txt +++ b/src/modules/luksbootkeyfile/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( luksbootkeyfile TYPE job EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp index 90d64d5a6..9bd2f66da 100644 --- a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp +++ b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp @@ -1,19 +1,8 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "LuksBootKeyFileJob.h" diff --git a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.h b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.h index de9b9c677..d78a7ecdc 100644 --- a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.h +++ b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.h @@ -1,19 +1,8 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LUKSBOOTKEYFILEJOB_H diff --git a/src/modules/luksopenswaphookcfg/luksopenswaphookcfg.conf b/src/modules/luksopenswaphookcfg/luksopenswaphookcfg.conf index f5610cd7c..f1f03bbe4 100644 --- a/src/modules/luksopenswaphookcfg/luksopenswaphookcfg.conf +++ b/src/modules/luksopenswaphookcfg/luksopenswaphookcfg.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Writes an openswap configuration with LUKS settings to the given path --- # Path of the configuration file to write (in the target system) diff --git a/src/modules/luksopenswaphookcfg/luksopenswaphookcfg.schema.yaml b/src/modules/luksopenswaphookcfg/luksopenswaphookcfg.schema.yaml index 426822e27..ed2ae7971 100644 --- a/src/modules/luksopenswaphookcfg/luksopenswaphookcfg.schema.yaml +++ b/src/modules/luksopenswaphookcfg/luksopenswaphookcfg.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/luksopenswaphookcfg diff --git a/src/modules/luksopenswaphookcfg/main.py b/src/modules/luksopenswaphookcfg/main.py index a30ae999b..ec09a631b 100644 --- a/src/modules/luksopenswaphookcfg/main.py +++ b/src/modules/luksopenswaphookcfg/main.py @@ -1,24 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2016, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2016 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares import os.path diff --git a/src/modules/luksopenswaphookcfg/module.desc b/src/modules/luksopenswaphookcfg/module.desc index 53f8b7c39..919a92792 100644 --- a/src/modules/luksopenswaphookcfg/module.desc +++ b/src/modules/luksopenswaphookcfg/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "luksopenswaphookcfg" diff --git a/src/modules/machineid/CMakeLists.txt b/src/modules/machineid/CMakeLists.txt index 4a916334c..360c0cc8a 100644 --- a/src/modules/machineid/CMakeLists.txt +++ b/src/modules/machineid/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( machineid TYPE job EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/machineid/MachineIdJob.cpp b/src/modules/machineid/MachineIdJob.cpp index fc535e356..302e8c308 100644 --- a/src/modules/machineid/MachineIdJob.cpp +++ b/src/modules/machineid/MachineIdJob.cpp @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Kevin Kofler - * Copyright 2016, Philip Müller - * Copyright 2017, Alf Gaida - * Copyright 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Kevin Kofler + * SPDX-FileCopyrightText: 2016 Philip Müller + * SPDX-FileCopyrightText: 2017 Alf Gaida + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "MachineIdJob.h" diff --git a/src/modules/machineid/MachineIdJob.h b/src/modules/machineid/MachineIdJob.h index 08943392a..b58d2f4dd 100644 --- a/src/modules/machineid/MachineIdJob.h +++ b/src/modules/machineid/MachineIdJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef MACHINEIDJOB_H diff --git a/src/modules/machineid/Tests.cpp b/src/modules/machineid/Tests.cpp index 2b6a9b1d1..45f0e6954 100644 --- a/src/modules/machineid/Tests.cpp +++ b/src/modules/machineid/Tests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "MachineIdJob.h" @@ -130,7 +121,7 @@ MachineIdTests::testJob() // Prepare part of the target filesystem { - QVERIFY( system->createTargetDirs("/etc") ); + QVERIFY( system->createTargetDirs( "/etc" ) ); auto r = system->createTargetFile( "/etc/machine-id", "Hello" ); QVERIFY( !r.failed() ); QVERIFY( r ); @@ -164,7 +155,7 @@ MachineIdTests::testJob() QFileInfo fi( "/tmp/var/lib/dbus/machine-id" ); QVERIFY( fi.exists() ); QVERIFY( fi.isSymLink() ); - QCOMPARE( fi.size(), 5); + QCOMPARE( fi.size(), 5 ); #endif } tempRoot.setAutoRemove( true ); // All tests succeeded diff --git a/src/modules/machineid/Workers.cpp b/src/modules/machineid/Workers.cpp index 76e466435..79d075c86 100644 --- a/src/modules/machineid/Workers.cpp +++ b/src/modules/machineid/Workers.cpp @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Kevin Kofler - * Copyright 2016, Philip Müller - * Copyright 2017, Alf Gaida - * Copyright 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Kevin Kofler + * SPDX-FileCopyrightText: 2016 Philip Müller + * SPDX-FileCopyrightText: 2017 Alf Gaida + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Workers.h" diff --git a/src/modules/machineid/Workers.h b/src/modules/machineid/Workers.h index 8cb8d74ff..51c9d526d 100644 --- a/src/modules/machineid/Workers.h +++ b/src/modules/machineid/Workers.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef WORKERS_H diff --git a/src/modules/machineid/machineid.conf b/src/modules/machineid/machineid.conf index fa42655fd..5ebf17c8c 100644 --- a/src/modules/machineid/machineid.conf +++ b/src/modules/machineid/machineid.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Machine-ID and other random data on the target system. # # This module can create a number of "random" things on the target: diff --git a/src/modules/machineid/machineid.schema.yaml b/src/modules/machineid/machineid.schema.yaml index c5eb55b1b..8b84f1d22 100644 --- a/src/modules/machineid/machineid.schema.yaml +++ b/src/modules/machineid/machineid.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/machineid diff --git a/src/modules/mkinitfs/main.py b/src/modules/mkinitfs/main.py index 7deac3914..e3e6e176a 100644 --- a/src/modules/mkinitfs/main.py +++ b/src/modules/mkinitfs/main.py @@ -1,25 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014-2015, Philip Müller -# Copyright 2014, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2014-2015 Philip Müller +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares from libcalamares.utils import target_env_call diff --git a/src/modules/mkinitfs/module.desc b/src/modules/mkinitfs/module.desc index 06541fb87..decc3259f 100644 --- a/src/modules/mkinitfs/module.desc +++ b/src/modules/mkinitfs/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "mkinitfs" diff --git a/src/modules/mount/main.py b/src/modules/mount/main.py index 4e16b43c3..01c0650bf 100644 --- a/src/modules/mount/main.py +++ b/src/modules/mount/main.py @@ -1,25 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Aurélien Gâteau -# Copyright 2017, Alf Gaida -# Copyright 2019, Adriaan de Groot -# Copyright 2019, Kevin Kofler +# SPDX-FileCopyrightText: 2014 Aurélien Gâteau +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-FileCopyrightText: 2019 Kevin Kofler +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import tempfile import subprocess diff --git a/src/modules/mount/module.desc b/src/modules/mount/module.desc index 13e411716..e4486cf12 100644 --- a/src/modules/mount/module.desc +++ b/src/modules/mount/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "mount" diff --git a/src/modules/mount/mount.conf b/src/modules/mount/mount.conf index bb28eed66..1e70465c2 100644 --- a/src/modules/mount/mount.conf +++ b/src/modules/mount/mount.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Mount filesystems in the target (generally, before treating the # target as a usable chroot / "live" system). Filesystems are # automatically mounted from the partitioning module. Filesystems diff --git a/src/modules/mount/mount.schema.yaml b/src/modules/mount/mount.schema.yaml index 55ee88644..2d5e4d4a0 100644 --- a/src/modules/mount/mount.schema.yaml +++ b/src/modules/mount/mount.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/mount diff --git a/src/modules/mount/test.yaml b/src/modules/mount/test.yaml index e1619296e..ce3e12e4e 100644 --- a/src/modules/mount/test.yaml +++ b/src/modules/mount/test.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 partitions: - device: "/dev/sdb1" mountPoint: "/" diff --git a/src/modules/netinstall/CMakeLists.txt b/src/modules/netinstall/CMakeLists.txt index 0f2cf06f8..4500a314f 100644 --- a/src/modules/netinstall/CMakeLists.txt +++ b/src/modules/netinstall/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( netinstall TYPE viewmodule EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/netinstall/Config.cpp b/src/modules/netinstall/Config.cpp index 062518221..ddbb36fcc 100644 --- a/src/modules/netinstall/Config.cpp +++ b/src/modules/netinstall/Config.cpp @@ -1,22 +1,13 @@ /* - * Copyright 2016, Luca Giambonini - * Copyright 2016, Lisa Vitolo - * Copyright 2017, Kyle Robbertze - * Copyright 2017-2018, 2020, Adriaan de Groot - * Copyright 2017, Gabriel Craciunescu + * SPDX-FileCopyrightText: 2016 Luca Giambonini + * SPDX-FileCopyrightText: 2016 Lisa Vitolo + * SPDX-FileCopyrightText: 2017 Kyle Robbertze + * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Gabriel Craciunescu + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Config.h" diff --git a/src/modules/netinstall/Config.h b/src/modules/netinstall/Config.h index 781c9be5d..56cbd784b 100644 --- a/src/modules/netinstall/Config.h +++ b/src/modules/netinstall/Config.h @@ -1,21 +1,12 @@ /* - * Copyright 2016, Luca Giambonini - * Copyright 2016, Lisa Vitolo - * Copyright 2017, Kyle Robbertze - * Copyright 2017-2018, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Luca Giambonini + * SPDX-FileCopyrightText: 2016 Lisa Vitolo + * SPDX-FileCopyrightText: 2017 Kyle Robbertze + * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef NETINSTALL_CONFIG_H diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 755b17999..75175a941 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -1,22 +1,13 @@ /* - * Copyright 2016, Luca Giambonini - * Copyright 2016, Lisa Vitolo - * Copyright 2017, Kyle Robbertze - * Copyright 2017-2018, 2020, Adriaan de Groot - * Copyright 2017, Gabriel Craciunescu + * SPDX-FileCopyrightText: 2016 Luca Giambonini + * SPDX-FileCopyrightText: 2016 Lisa Vitolo + * SPDX-FileCopyrightText: 2017 Kyle Robbertze + * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Gabriel Craciunescu + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "NetInstallPage.h" diff --git a/src/modules/netinstall/NetInstallPage.h b/src/modules/netinstall/NetInstallPage.h index 13a106eaf..167f9807f 100644 --- a/src/modules/netinstall/NetInstallPage.h +++ b/src/modules/netinstall/NetInstallPage.h @@ -1,21 +1,12 @@ /* - * Copyright 2016, Luca Giambonini - * Copyright 2016, Lisa Vitolo - * Copyright 2017, Kyle Robbertze - * Copyright 2017-2018, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Luca Giambonini + * SPDX-FileCopyrightText: 2016 Lisa Vitolo + * SPDX-FileCopyrightText: 2017 Kyle Robbertze + * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef NETINSTALLPAGE_H diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index e99b43830..beb295c32 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -1,21 +1,12 @@ /* - * Copyright 2016, Luca Giambonini - * Copyright 2016, Lisa Vitolo - * Copyright 2017, Kyle Robbertze - * Copyright 2017-2018, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Luca Giambonini + * SPDX-FileCopyrightText: 2016 Lisa Vitolo + * SPDX-FileCopyrightText: 2017 Kyle Robbertze + * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "NetInstallViewStep.h" diff --git a/src/modules/netinstall/NetInstallViewStep.h b/src/modules/netinstall/NetInstallViewStep.h index d2114a346..cd79e7a4a 100644 --- a/src/modules/netinstall/NetInstallViewStep.h +++ b/src/modules/netinstall/NetInstallViewStep.h @@ -1,20 +1,11 @@ /* - * Copyright 2016, Luca Giambonini - * Copyright 2016, Lisa Vitolo - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Luca Giambonini + * SPDX-FileCopyrightText: 2016 Lisa Vitolo + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef NETINSTALLVIEWSTEP_H diff --git a/src/modules/netinstall/PackageModel.cpp b/src/modules/netinstall/PackageModel.cpp index dd5047129..beb094d2d 100644 --- a/src/modules/netinstall/PackageModel.cpp +++ b/src/modules/netinstall/PackageModel.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright (c) 2017, Kyle Robbertze - * Copyright 2017-2018, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Kyle Robbertze + * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PackageModel.h" diff --git a/src/modules/netinstall/PackageModel.h b/src/modules/netinstall/PackageModel.h index b4e8fc102..998f42c38 100644 --- a/src/modules/netinstall/PackageModel.h +++ b/src/modules/netinstall/PackageModel.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright (c) 2017, Kyle Robbertze - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Kyle Robbertze + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PACKAGEMODEL_H diff --git a/src/modules/netinstall/PackageTreeItem.cpp b/src/modules/netinstall/PackageTreeItem.cpp index 30a57ac2a..b30cdf915 100644 --- a/src/modules/netinstall/PackageTreeItem.cpp +++ b/src/modules/netinstall/PackageTreeItem.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright (c) 2017, Kyle Robbertze - * Copyright 2017, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Kyle Robbertze + * SPDX-FileCopyrightText: 2017 2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PackageTreeItem.h" diff --git a/src/modules/netinstall/PackageTreeItem.h b/src/modules/netinstall/PackageTreeItem.h index 0b2d506d7..c04b9a21d 100644 --- a/src/modules/netinstall/PackageTreeItem.h +++ b/src/modules/netinstall/PackageTreeItem.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright (c) 2017, Kyle Robbertze - * Copyright 2017, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Kyle Robbertze + * SPDX-FileCopyrightText: 2017 2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PACKAGETREEITEM_H diff --git a/src/modules/netinstall/README.md b/src/modules/netinstall/README.md deleted file mode 100644 index 0a9db2f22..000000000 --- a/src/modules/netinstall/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Netinstall module - -All of the actual documentation of the netinstall module has moved -into the `netinstall.conf` file; since the configuration file **may** -contain the groups-and-packages list itself, that format is -also described there. diff --git a/src/modules/netinstall/Tests.cpp b/src/modules/netinstall/Tests.cpp index c74e6aafe..569d47d15 100644 --- a/src/modules/netinstall/Tests.cpp +++ b/src/modules/netinstall/Tests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PackageModel.h" diff --git a/src/modules/netinstall/netinstall.conf b/src/modules/netinstall/netinstall.conf index db4d65da0..f96da9a8e 100644 --- a/src/modules/netinstall/netinstall.conf +++ b/src/modules/netinstall/netinstall.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# ### Netinstall module # # The netinstall module allows distribution maintainers to ship minimal ISOs diff --git a/src/modules/netinstall/netinstall.schema.yaml b/src/modules/netinstall/netinstall.schema.yaml index 739af635e..a66c877d1 100644 --- a/src/modules/netinstall/netinstall.schema.yaml +++ b/src/modules/netinstall/netinstall.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/netinstall diff --git a/src/modules/netinstall/netinstall.yaml b/src/modules/netinstall/netinstall.yaml index 6a93d84ea..e55bc1b24 100644 --- a/src/modules/netinstall/netinstall.yaml +++ b/src/modules/netinstall/netinstall.yaml @@ -1,5 +1,8 @@ # Example configuration with groups and packages, taken from Chakra Linux. # +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # This example is rather limited. See `netinstall.conf` for full documentation # on the configuration format. The module configuration file `netinstall.conf` # **may** contain the package-list, but that is only useful for static diff --git a/src/modules/netinstall/page_netinst.ui b/src/modules/netinstall/page_netinst.ui index 32c11ec15..f17e939cd 100644 --- a/src/modules/netinstall/page_netinst.ui +++ b/src/modules/netinstall/page_netinst.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2016 shainer <syn.shainer@gmail.com> +SPDX-License-Identifier: GPL-3.0-or-later + Page_NetInst diff --git a/src/modules/networkcfg/main.py b/src/modules/networkcfg/main.py index 00a264f53..608cfd288 100644 --- a/src/modules/networkcfg/main.py +++ b/src/modules/networkcfg/main.py @@ -1,25 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Philip Müller -# Copyright 2014, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2014 Philip Müller +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import os import shutil diff --git a/src/modules/networkcfg/module.desc b/src/modules/networkcfg/module.desc index 68024cb8d..cbafe8cd5 100644 --- a/src/modules/networkcfg/module.desc +++ b/src/modules/networkcfg/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "networkcfg" diff --git a/src/modules/notesqml/CMakeLists.txt b/src/modules/notesqml/CMakeLists.txt index 7ac808fa7..a5edc7d04 100644 --- a/src/modules/notesqml/CMakeLists.txt +++ b/src/modules/notesqml/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# if( NOT WITH_QML ) calamares_skip_module( "notesqml (QML is not supported in this build)" ) return() diff --git a/src/modules/notesqml/NotesQmlViewStep.cpp b/src/modules/notesqml/NotesQmlViewStep.cpp index 5a6bbc494..9f57eb615 100644 --- a/src/modules/notesqml/NotesQmlViewStep.cpp +++ b/src/modules/notesqml/NotesQmlViewStep.cpp @@ -1,20 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "NotesQmlViewStep.h" @@ -45,7 +34,7 @@ NotesQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) m_notesName = new CalamaresUtils::Locale::TranslatedString( qmlLabel, "notes" ); } - Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last + Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last } CALAMARES_PLUGIN_FACTORY_DEFINITION( NotesQmlViewStepFactory, registerPlugin< NotesQmlViewStep >(); ) diff --git a/src/modules/notesqml/NotesQmlViewStep.h b/src/modules/notesqml/NotesQmlViewStep.h index 5ffd4598e..10f249a88 100644 --- a/src/modules/notesqml/NotesQmlViewStep.h +++ b/src/modules/notesqml/NotesQmlViewStep.h @@ -1,20 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef NOTESQMLVIEWSTEP_H @@ -23,8 +12,8 @@ #include "DllMacro.h" #include "locale/TranslatableConfiguration.h" #include "utils/CalamaresUtilsSystem.h" -#include "utils/Variant.h" #include "utils/PluginFactory.h" +#include "utils/Variant.h" #include "viewpages/QmlViewStep.h" class PLUGINDLLEXPORT NotesQmlViewStep : public Calamares::QmlViewStep @@ -36,7 +25,7 @@ public: virtual ~NotesQmlViewStep() override; QString prettyName() const override; - + void setConfigurationMap( const QVariantMap& configurationMap ) override; private: diff --git a/src/modules/notesqml/examples/notesqml.qml.example b/src/modules/notesqml/examples/notesqml.qml.example index a41fa98fd..782ae404e 100644 --- a/src/modules/notesqml/examples/notesqml.qml.example +++ b/src/modules/notesqml/examples/notesqml.qml.example @@ -1,20 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Anke Boersma - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /* Some Calamares internals are available to all QML modules. @@ -25,60 +14,61 @@ */ import calamares.ui 1.0 -import QtQuick 2.7 -import QtQuick.Controls 2.2 -import QtQuick.Window 2.2 -import QtQuick.Layouts 1.3 -import QtQuick.Controls.Material 2.1 + import QtQuick 2.7 import QtQuick.Controls 2.2 import QtQuick.Window 2.2 import QtQuick.Layouts 1.3 import QtQuick.Controls.Material 2.1 -Item { - width: 740 - height: 420 + Item +{ +width: + 740 height : 420 - Flickable { - id: flick - anchors.fill: parent - contentHeight: 800 + Flickable + { + id: + flick anchors + .fill : parent contentHeight : 800 - ScrollBar.vertical: ScrollBar { - id: fscrollbar - width: 10 - policy: ScrollBar.AlwaysOn - } + ScrollBar.vertical : ScrollBar { id : fscrollbar width : 10 policy : ScrollBar.AlwaysOn } - TextArea { - id: intro + TextArea + { + id: + intro x: 1 y: 0 - width: parent.width - fscrollbar.width +width: + parent.width - fscrollbar.width font.pointSize: 14 - textFormat: Text.RichText - antialiasing: true - activeFocusOnPress: false - wrapMode: Text.WordWrap +textFormat: + Text.RichText +antialiasing: + true +activeFocusOnPress: + false +wrapMode: + Text.WordWrap - text: qsTr("

%1

-

This an example QML file, showing options in RichText with Flickable content.

+text: + qsTr( "

%1

+

This an example QML file, showing options in RichText with Flickable content.

-

QML with RichText can use HTML tags, Flickable content is useful for touchscreens.

+

QML with RichText can use HTML tags, Flickable content is useful for touchscreens.

-

This is bold text

-

This is italic text

-

This is underlined text

-

This text will be center-aligned.

-

This is strikethrough

+

This is bold text

+

This is italic text

+

This is underlined text

+

This text will be center-aligned.

+

This is strikethrough

-

Code example: - ls -l /home

+

Code example: + ls -l /home

-

Lists:

-
    -
  • Intel CPU systems
  • -
  • AMD CPU systems
  • -
- -

The vertical scrollbar is adjustable, current width set to 10.

").arg(Branding.string(Branding.VersionedName)) +

Lists:

+
    +
  • Intel CPU systems
  • +
  • AMD CPU systems
  • +
+

The vertical scrollbar is adjustable, current width set to 10.

").arg(Branding.string(Branding.VersionedName)) } } } diff --git a/src/modules/notesqml/notesqml.conf b/src/modules/notesqml/notesqml.conf index 88948bf64..c65f98879 100644 --- a/src/modules/notesqml/notesqml.conf +++ b/src/modules/notesqml/notesqml.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # The *notesqml* module can be used to display a QML file # as an installer step. This is most useful for release-notes # and similar somewhat-static content, but if you want to you diff --git a/src/modules/notesqml/notesqml.qml b/src/modules/notesqml/notesqml.qml index 374d9c399..7805f27fa 100644 --- a/src/modules/notesqml/notesqml.qml +++ b/src/modules/notesqml/notesqml.qml @@ -1,20 +1,9 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * Copyright 2020, Anke Boersma * Copyright 2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /* Some Calamares internals are available to all QML modules. diff --git a/src/modules/oemid/CMakeLists.txt b/src/modules/oemid/CMakeLists.txt index 0c4ad03ad..68a1b653e 100644 --- a/src/modules/oemid/CMakeLists.txt +++ b/src/modules/oemid/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( oemid TYPE viewmodule EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/oemid/IDJob.cpp b/src/modules/oemid/IDJob.cpp index 16461b191..ccda86057 100644 --- a/src/modules/oemid/IDJob.cpp +++ b/src/modules/oemid/IDJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "IDJob.h" @@ -27,52 +18,54 @@ #include #include -IDJob::IDJob(const QString& id, QObject* parent) +IDJob::IDJob( const QString& id, QObject* parent ) : Job( parent ) , m_batchIdentifier( id ) { } -QString IDJob::prettyName() const +QString +IDJob::prettyName() const { return tr( "OEM Batch Identifier" ); } -Calamares::JobResult IDJob::writeId( const QString& dirs, const QString& filename, const QString& contents ) +Calamares::JobResult +IDJob::writeId( const QString& dirs, const QString& filename, const QString& contents ) { if ( !QDir().mkpath( dirs ) ) { cError() << "Could not create directories" << dirs; - return Calamares::JobResult::error( - tr( "OEM Batch Identifier" ), - tr( "Could not create directories %1." ).arg( dirs ) ); + return Calamares::JobResult::error( tr( "OEM Batch Identifier" ), + tr( "Could not create directories %1." ).arg( dirs ) ); } QFile output( QDir( dirs ).filePath( filename ) ); if ( output.exists() ) + { cWarning() << "Existing OEM Batch ID" << output.fileName() << "overwritten."; + } if ( !output.open( QIODevice::WriteOnly ) ) { cError() << "Could not write to" << output.fileName(); - return Calamares::JobResult::error( - tr( "OEM Batch Identifier" ), - tr( "Could not open file %1." ).arg( output.fileName() ) ); + return Calamares::JobResult::error( tr( "OEM Batch Identifier" ), + tr( "Could not open file %1." ).arg( output.fileName() ) ); } if ( output.write( contents.toUtf8() ) < 0 ) { cError() << "Write error on" << output.fileName(); - return Calamares::JobResult::error( - tr( "OEM Batch Identifier" ), - tr( "Could not write to file %1." ).arg( output.fileName() ) ); + return Calamares::JobResult::error( tr( "OEM Batch Identifier" ), + tr( "Could not write to file %1." ).arg( output.fileName() ) ); } output.write( "\n" ); // Ignore error on this one return Calamares::JobResult::ok(); } -Calamares::JobResult IDJob::exec() +Calamares::JobResult +IDJob::exec() { cDebug() << "Setting OEM Batch ID to" << m_batchIdentifier; @@ -84,10 +77,11 @@ Calamares::JobResult IDJob::exec() // Don't bother translating internal errors if ( rootMount.isEmpty() && Calamares::Settings::instance()->doChroot() ) - return Calamares::JobResult::internalError( - "OEM Batch Identifier", - "No rootMountPoint is set, but a chroot is required. " - "Is there a module before oemid that sets up the partitions?", - Calamares::JobResult::InvalidConfiguration ); - return writeId( Calamares::Settings::instance()->doChroot() ? rootMount + targetDir : targetDir, targetFile, m_batchIdentifier ); + return Calamares::JobResult::internalError( "OEM Batch Identifier", + "No rootMountPoint is set, but a chroot is required. " + "Is there a module before oemid that sets up the partitions?", + Calamares::JobResult::InvalidConfiguration ); + return writeId( Calamares::Settings::instance()->doChroot() ? rootMount + targetDir : targetDir, + targetFile, + m_batchIdentifier ); } diff --git a/src/modules/oemid/IDJob.h b/src/modules/oemid/IDJob.h index 845a3f451..17d97b4ee 100644 --- a/src/modules/oemid/IDJob.h +++ b/src/modules/oemid/IDJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef IDJOB_H @@ -36,7 +27,7 @@ private: Calamares::JobResult writeId( const QString&, const QString&, const QString& ); QString m_batchIdentifier; -} ; +}; #endif diff --git a/src/modules/oemid/OEMPage.ui b/src/modules/oemid/OEMPage.ui index b14906537..2194ac24c 100644 --- a/src/modules/oemid/OEMPage.ui +++ b/src/modules/oemid/OEMPage.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + OEMPage diff --git a/src/modules/oemid/OEMViewStep.cpp b/src/modules/oemid/OEMViewStep.cpp index 8a12bd17c..7405c6e3a 100644 --- a/src/modules/oemid/OEMViewStep.cpp +++ b/src/modules/oemid/OEMViewStep.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "OEMViewStep.h" @@ -38,22 +29,18 @@ public: { m_ui->setupUi( this ); - CALAMARES_RETRANSLATE( - m_ui->retranslateUi( this ); - ) + CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); ) } virtual ~OEMPage() override; - + Ui_OEMPage* m_ui; -} ; +}; -OEMPage::~OEMPage() -{ -} +OEMPage::~OEMPage() {} -OEMViewStep::OEMViewStep(QObject* parent) +OEMViewStep::OEMViewStep( QObject* parent ) : Calamares::ViewStep( parent ) , m_widget( nullptr ) , m_visited( false ) @@ -63,86 +50,106 @@ OEMViewStep::OEMViewStep(QObject* parent) OEMViewStep::~OEMViewStep() { if ( m_widget && m_widget->parent() == nullptr ) + { m_widget->deleteLater(); + } } -bool OEMViewStep::isBackEnabled() const +bool +OEMViewStep::isBackEnabled() const { return true; } -bool OEMViewStep::isNextEnabled() const +bool +OEMViewStep::isNextEnabled() const { return true; } -bool OEMViewStep::isAtBeginning() const +bool +OEMViewStep::isAtBeginning() const { return true; } -bool OEMViewStep::isAtEnd() const +bool +OEMViewStep::isAtEnd() const { return true; } -static QString substitute( QString s ) +static QString +substitute( QString s ) { QString t_date = QStringLiteral( "@@DATE@@" ); if ( s.contains( t_date ) ) { auto date = QDate::currentDate(); - s = s.replace( t_date, date.toString( Qt::ISODate )); + s = s.replace( t_date, date.toString( Qt::ISODate ) ); } return s; } -void OEMViewStep::onActivate() +void +OEMViewStep::onActivate() { if ( !m_widget ) - (void) widget(); + { + (void)widget(); + } if ( !m_visited && m_widget ) + { m_widget->m_ui->batchIdentifier->setText( m_user_batchIdentifier ); + } m_visited = true; ViewStep::onActivate(); } -void OEMViewStep::onLeave() +void +OEMViewStep::onLeave() { m_user_batchIdentifier = m_widget->m_ui->batchIdentifier->text(); ViewStep::onLeave(); } -QString OEMViewStep::prettyName() const +QString +OEMViewStep::prettyName() const { return tr( "OEM Configuration" ); } -QString OEMViewStep::prettyStatus() const +QString +OEMViewStep::prettyStatus() const { return tr( "Set the OEM Batch Identifier to %1." ).arg( m_user_batchIdentifier ); } -QWidget * OEMViewStep::widget() +QWidget* +OEMViewStep::widget() { - if (!m_widget) + if ( !m_widget ) + { m_widget = new OEMPage; + } return m_widget; } -Calamares::JobList OEMViewStep::jobs() const +Calamares::JobList +OEMViewStep::jobs() const { return Calamares::JobList() << Calamares::job_ptr( new IDJob( m_user_batchIdentifier ) ); } -void OEMViewStep::setConfigurationMap(const QVariantMap& configurationMap) +void +OEMViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { m_conf_batchIdentifier = CalamaresUtils::getString( configurationMap, "batch-identifier" ); m_user_batchIdentifier = substitute( m_conf_batchIdentifier ); } -CALAMARES_PLUGIN_FACTORY_DEFINITION( OEMViewStepFactory, registerPlugin(); ) +CALAMARES_PLUGIN_FACTORY_DEFINITION( OEMViewStepFactory, registerPlugin< OEMViewStep >(); ) diff --git a/src/modules/oemid/OEMViewStep.h b/src/modules/oemid/OEMViewStep.h index 1f0e58915..c07cb7971 100644 --- a/src/modules/oemid/OEMViewStep.h +++ b/src/modules/oemid/OEMViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef OEMVIEWSTEP_H diff --git a/src/modules/oemid/oemid.conf b/src/modules/oemid/oemid.conf index 8f9bc3d08..921fb3b30 100644 --- a/src/modules/oemid/oemid.conf +++ b/src/modules/oemid/oemid.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # This is an OEM setup (phase-0) configuration file. --- # The batch-identifier is written to /var/log/installer/oem-id. diff --git a/src/modules/openrcdmcryptcfg/main.py b/src/modules/openrcdmcryptcfg/main.py index 522d623bc..d350aade0 100644 --- a/src/modules/openrcdmcryptcfg/main.py +++ b/src/modules/openrcdmcryptcfg/main.py @@ -1,23 +1,14 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2017, Ghiunhan Mamut -# Copyright 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2017 Ghiunhan Mamut +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import os.path diff --git a/src/modules/openrcdmcryptcfg/module.desc b/src/modules/openrcdmcryptcfg/module.desc index 283adfdac..e63339573 100644 --- a/src/modules/openrcdmcryptcfg/module.desc +++ b/src/modules/openrcdmcryptcfg/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "openrcdmcryptcfg" diff --git a/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf b/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf index 57ee2dc31..911a4eff3 100644 --- a/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf +++ b/src/modules/openrcdmcryptcfg/openrcdmcryptcfg.conf @@ -1,2 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# --- configFilePath: /etc/conf.d/dmcrypt diff --git a/src/modules/packagechooser/CMakeLists.txt b/src/modules/packagechooser/CMakeLists.txt index d949829de..ad9cc8527 100644 --- a/src/modules/packagechooser/CMakeLists.txt +++ b/src/modules/packagechooser/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# find_package( Qt5 COMPONENTS Core Gui Widgets REQUIRED ) set( _extra_libraries "" ) set( _extra_src "" ) diff --git a/src/modules/packagechooser/ItemAppData.cpp b/src/modules/packagechooser/ItemAppData.cpp index ed0ba9223..dd1eb1fb7 100644 --- a/src/modules/packagechooser/ItemAppData.cpp +++ b/src/modules/packagechooser/ItemAppData.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /** @brief Loading items from AppData XML files. diff --git a/src/modules/packagechooser/ItemAppData.h b/src/modules/packagechooser/ItemAppData.h index 72617ff0c..92d81220d 100644 --- a/src/modules/packagechooser/ItemAppData.h +++ b/src/modules/packagechooser/ItemAppData.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef ITEMAPPDATA_H diff --git a/src/modules/packagechooser/ItemAppStream.cpp b/src/modules/packagechooser/ItemAppStream.cpp index 83837a9ca..787db0b3f 100644 --- a/src/modules/packagechooser/ItemAppStream.cpp +++ b/src/modules/packagechooser/ItemAppStream.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /** @brief Loading items from AppData XML files. diff --git a/src/modules/packagechooser/ItemAppStream.h b/src/modules/packagechooser/ItemAppStream.h index c44b84b06..9fa3608c3 100644 --- a/src/modules/packagechooser/ItemAppStream.h +++ b/src/modules/packagechooser/ItemAppStream.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef ITEMAPPSTREAM_H diff --git a/src/modules/packagechooser/PackageChooserPage.cpp b/src/modules/packagechooser/PackageChooserPage.cpp index 16f50abab..0d5df8177 100644 --- a/src/modules/packagechooser/PackageChooserPage.cpp +++ b/src/modules/packagechooser/PackageChooserPage.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PackageChooserPage.h" diff --git a/src/modules/packagechooser/PackageChooserPage.h b/src/modules/packagechooser/PackageChooserPage.h index b4ef2169b..4f485c890 100644 --- a/src/modules/packagechooser/PackageChooserPage.h +++ b/src/modules/packagechooser/PackageChooserPage.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PACKAGECHOOSERPAGE_H diff --git a/src/modules/packagechooser/PackageChooserViewStep.cpp b/src/modules/packagechooser/PackageChooserViewStep.cpp index 759c6eeab..f162c074b 100644 --- a/src/modules/packagechooser/PackageChooserViewStep.cpp +++ b/src/modules/packagechooser/PackageChooserViewStep.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PackageChooserViewStep.h" diff --git a/src/modules/packagechooser/PackageChooserViewStep.h b/src/modules/packagechooser/PackageChooserViewStep.h index 9e9087971..2a10ce270 100644 --- a/src/modules/packagechooser/PackageChooserViewStep.h +++ b/src/modules/packagechooser/PackageChooserViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PACKAGECHOOSERVIEWSTEP_H diff --git a/src/modules/packagechooser/PackageModel.cpp b/src/modules/packagechooser/PackageModel.cpp index 12995fad5..1072b8b3b 100644 --- a/src/modules/packagechooser/PackageModel.cpp +++ b/src/modules/packagechooser/PackageModel.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PackageModel.h" diff --git a/src/modules/packagechooser/PackageModel.h b/src/modules/packagechooser/PackageModel.h index ee3b30185..b8fc9a4ce 100644 --- a/src/modules/packagechooser/PackageModel.h +++ b/src/modules/packagechooser/PackageModel.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PACKAGEMODEL_H diff --git a/src/modules/packagechooser/Tests.cpp b/src/modules/packagechooser/Tests.cpp index da355dc96..c303f0488 100644 --- a/src/modules/packagechooser/Tests.cpp +++ b/src/modules/packagechooser/Tests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Tests.h" @@ -77,7 +68,8 @@ PackageChooserTests::testAppData() QCOMPARE( p1.description.get(), QStringLiteral( "Calamares is an installer program for Linux distributions." ) ); // .. but en_GB doesn't have an entry in description, so uses QCOMPARE( p1.description.get( QLocale( "en_GB" ) ), QStringLiteral( "Calamares Linux Installer" ) ); - QCOMPARE( p1.description.get( QLocale( "nl" ) ), QStringLiteral( "Calamares is een installatieprogramma voor Linux distributies." ) ); + QCOMPARE( p1.description.get( QLocale( "nl" ) ), + QStringLiteral( "Calamares is een installatieprogramma voor Linux distributies." ) ); QVERIFY( p1.screenshot.isNull() ); m.insert( "id", "calamares" ); @@ -85,7 +77,8 @@ PackageChooserTests::testAppData() PackageItem p2 = fromAppData( m ); QVERIFY( p2.isValid() ); QCOMPARE( p2.id, QStringLiteral( "calamares" ) ); - QCOMPARE( p2.description.get( QLocale( "nl" ) ), QStringLiteral( "Calamares is een installatieprogramma voor Linux distributies." ) ); + QCOMPARE( p2.description.get( QLocale( "nl" ) ), + QStringLiteral( "Calamares is een installatieprogramma voor Linux distributies." ) ); QVERIFY( !p2.screenshot.isNull() ); #endif } diff --git a/src/modules/packagechooser/Tests.h b/src/modules/packagechooser/Tests.h index 62efe92cc..34ac2f682 100644 --- a/src/modules/packagechooser/Tests.h +++ b/src/modules/packagechooser/Tests.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PACKAGECHOOSERTESTS_H diff --git a/src/modules/packagechooser/images/calamares.png.license b/src/modules/packagechooser/images/calamares.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/src/modules/packagechooser/images/calamares.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/packagechooser/images/no-selection.png.license b/src/modules/packagechooser/images/no-selection.png.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/src/modules/packagechooser/images/no-selection.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/src/modules/packagechooser/packagechooser.conf b/src/modules/packagechooser/packagechooser.conf index 90611a64b..88f23ecf9 100644 --- a/src/modules/packagechooser/packagechooser.conf +++ b/src/modules/packagechooser/packagechooser.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the low-density software chooser --- # The packagechooser writes a GlobalStorage value for the choice that diff --git a/src/modules/packagechooser/page_package.ui b/src/modules/packagechooser/page_package.ui index 8349f2b52..5cc98b126 100644 --- a/src/modules/packagechooser/page_package.ui +++ b/src/modules/packagechooser/page_package.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + PackageChooserPage diff --git a/src/modules/packages/main.py b/src/modules/packages/main.py index 908d778b2..9d912da72 100644 --- a/src/modules/packages/main.py +++ b/src/modules/packages/main.py @@ -1,27 +1,18 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Pier Luigi Fiorini -# Copyright 2015-2017, Teo Mrnjavac -# Copyright 2016-2017, Kyle Robbertze -# Copyright 2017, Alf Gaida -# Copyright 2018, Adriaan de Groot -# Copyright 2018, Philip Müller +# SPDX-FileCopyrightText: 2014 Pier Luigi Fiorini +# SPDX-FileCopyrightText: 2015-2017 Teo Mrnjavac +# SPDX-FileCopyrightText: 2016-2017 Kyle Robbertze +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2018 Adriaan de Groot +# SPDX-FileCopyrightText: 2018 Philip Müller +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import abc from string import Template diff --git a/src/modules/packages/module.desc b/src/modules/packages/module.desc index 6a0423614..3e3053bfa 100644 --- a/src/modules/packages/module.desc +++ b/src/modules/packages/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "packages" diff --git a/src/modules/packages/packages.conf b/src/modules/packages/packages.conf index df477e6e9..b1289ad51 100644 --- a/src/modules/packages/packages.conf +++ b/src/modules/packages/packages.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# --- # # Which package manager to use, options are: diff --git a/src/modules/packages/packages.schema.yaml b/src/modules/packages/packages.schema.yaml index ea0addd10..79f5f21c8 100644 --- a/src/modules/packages/packages.schema.yaml +++ b/src/modules/packages/packages.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/packages diff --git a/src/modules/packages/test.yaml b/src/modules/packages/test.yaml index 8902b657a..130214dfd 100644 --- a/src/modules/packages/test.yaml +++ b/src/modules/packages/test.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 backend: dummy rootMountPoint: /tmp/mount operations: diff --git a/src/modules/partition/CMakeLists.txt b/src/modules/partition/CMakeLists.txt index 65b1a91e9..f3ffcb9c7 100644 --- a/src/modules/partition/CMakeLists.txt +++ b/src/modules/partition/CMakeLists.txt @@ -1,3 +1,9 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + # When debugging the partitioning widget, or experimenting, you may # want to allow unsafe partitioning choices (e.g. doing things to the # current disk). Set DEBUG_PARTITION_UNSAFE to allow that (it turns off diff --git a/src/modules/partition/README.md b/src/modules/partition/README.md index 3491b309b..cbebd589e 100644 --- a/src/modules/partition/README.md +++ b/src/modules/partition/README.md @@ -1,5 +1,11 @@ # Architecture + + ## Overview The heart of the module is the PartitionCoreModule class. It holds Qt models for diff --git a/src/modules/partition/core/BootLoaderModel.cpp b/src/modules/partition/core/BootLoaderModel.cpp index 10b88be76..f9743291f 100644 --- a/src/modules/partition/core/BootLoaderModel.cpp +++ b/src/modules/partition/core/BootLoaderModel.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "core/BootLoaderModel.h" diff --git a/src/modules/partition/core/BootLoaderModel.h b/src/modules/partition/core/BootLoaderModel.h index 8daa8ca04..47e6ccb95 100644 --- a/src/modules/partition/core/BootLoaderModel.h +++ b/src/modules/partition/core/BootLoaderModel.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef BOOTLOADERMODEL_H #define BOOTLOADERMODEL_H diff --git a/src/modules/partition/core/ColorUtils.cpp b/src/modules/partition/core/ColorUtils.cpp index d04c4110d..fb613e240 100644 --- a/src/modules/partition/core/ColorUtils.cpp +++ b/src/modules/partition/core/ColorUtils.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "core/ColorUtils.h" diff --git a/src/modules/partition/core/ColorUtils.h b/src/modules/partition/core/ColorUtils.h index 3c65b75b2..9ebce580b 100644 --- a/src/modules/partition/core/ColorUtils.h +++ b/src/modules/partition/core/ColorUtils.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef COLORUTILS_H #define COLORUTILS_H diff --git a/src/modules/partition/core/Config.cpp b/src/modules/partition/core/Config.cpp index 086d87da5..6dcad2d66 100644 --- a/src/modules/partition/core/Config.cpp +++ b/src/modules/partition/core/Config.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Config.h" @@ -125,7 +115,8 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) m_swapChoices = getSwapChoices( configurationMap ); bool nameFound = false; // In the name table (ignored, falls back to first entry in table) - m_initialInstallChoice = PartitionActions::Choices::installChoiceNames().find( CalamaresUtils::getString( configurationMap, "initialPartitioningChoice" ), nameFound ); + m_initialInstallChoice = PartitionActions::Choices::installChoiceNames().find( + CalamaresUtils::getString( configurationMap, "initialPartitioningChoice" ), nameFound ); } void diff --git a/src/modules/partition/core/Config.h b/src/modules/partition/core/Config.h index fb2f8116c..f2ba9cf58 100644 --- a/src/modules/partition/core/Config.h +++ b/src/modules/partition/core/Config.h @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITION_CONFIG_H diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp index 041801b9e..2fce62e9d 100644 --- a/src/modules/partition/core/DeviceList.cpp +++ b/src/modules/partition/core/DeviceList.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015-2016, Teo Mrnjavac - * Copyright 2018-2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "DeviceList.h" diff --git a/src/modules/partition/core/DeviceList.h b/src/modules/partition/core/DeviceList.h index 306d90739..b76a31a6b 100644 --- a/src/modules/partition/core/DeviceList.h +++ b/src/modules/partition/core/DeviceList.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef DEVICELIST_H diff --git a/src/modules/partition/core/DeviceModel.cpp b/src/modules/partition/core/DeviceModel.cpp index f881d265b..bf5541756 100644 --- a/src/modules/partition/core/DeviceModel.cpp +++ b/src/modules/partition/core/DeviceModel.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2014, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "core/DeviceModel.h" diff --git a/src/modules/partition/core/DeviceModel.h b/src/modules/partition/core/DeviceModel.h index 29d1598ad..71918f64d 100644 --- a/src/modules/partition/core/DeviceModel.h +++ b/src/modules/partition/core/DeviceModel.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2017, 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef DEVICEMODEL_H #define DEVICEMODEL_H diff --git a/src/modules/partition/core/KPMHelpers.cpp b/src/modules/partition/core/KPMHelpers.cpp index 730d1d9af..e9e69456d 100644 --- a/src/modules/partition/core/KPMHelpers.cpp +++ b/src/modules/partition/core/KPMHelpers.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac * Copyright 2018-2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "core/KPMHelpers.h" diff --git a/src/modules/partition/core/KPMHelpers.h b/src/modules/partition/core/KPMHelpers.h index 326993362..ad25689f3 100644 --- a/src/modules/partition/core/KPMHelpers.h +++ b/src/modules/partition/core/KPMHelpers.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef KPMHELPERS_H #define KPMHELPERS_H diff --git a/src/modules/partition/core/OsproberEntry.h b/src/modules/partition/core/OsproberEntry.h index 1e1fd0eca..a358e4285 100644 --- a/src/modules/partition/core/OsproberEntry.h +++ b/src/modules/partition/core/OsproberEntry.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef OSPROBERENTRY_H diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index 4dd3dcbf3..099cdf299 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac * Copyright 2018-2019 Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PartUtils.h" @@ -459,7 +450,7 @@ isEfiBootable( const Partition* candidate ) while ( root && !root->isRoot() ) { root = root->parent(); - cDebug() << Logger::SubEntry << "moved towards root" << Logger::Pointer(root); + cDebug() << Logger::SubEntry << "moved towards root" << Logger::Pointer( root ); } // Strange case: no root found, no partition table node? @@ -469,7 +460,7 @@ isEfiBootable( const Partition* candidate ) } const PartitionTable* table = dynamic_cast< const PartitionTable* >( root ); - cDebug() << Logger::SubEntry << "partition table" << Logger::Pointer(table) << "type" + cDebug() << Logger::SubEntry << "partition table" << Logger::Pointer( table ) << "type" << ( table ? table->type() : PartitionTable::TableType::unknownTableType ); return table && ( table->type() == PartitionTable::TableType::gpt ) && flags.testFlag( KPM_PARTITION_FLAG( Boot ) ); } diff --git a/src/modules/partition/core/PartUtils.h b/src/modules/partition/core/PartUtils.h index 0db49d043..f5ca0ddaa 100644 --- a/src/modules/partition/core/PartUtils.h +++ b/src/modules/partition/core/PartUtils.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015-2016, Teo Mrnjavac - * Copyright 2018-2019 Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTUTILS_H diff --git a/src/modules/partition/core/PartitionActions.cpp b/src/modules/partition/core/PartitionActions.cpp index cae5025bf..748df2d95 100644 --- a/src/modules/partition/core/PartitionActions.cpp +++ b/src/modules/partition/core/PartitionActions.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017-2019, Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PartitionActions.h" diff --git a/src/modules/partition/core/PartitionActions.h b/src/modules/partition/core/PartitionActions.h index 6f4b41cc8..d86e51048 100644 --- a/src/modules/partition/core/PartitionActions.h +++ b/src/modules/partition/core/PartitionActions.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONACTIONS_H diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index 8856778b3..d78ef70c7 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -1,23 +1,14 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2019, Adriaan de Groot - * Copyright 2018, Caio Carvalho - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Caio Carvalho + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "core/PartitionCoreModule.h" diff --git a/src/modules/partition/core/PartitionCoreModule.h b/src/modules/partition/core/PartitionCoreModule.h index f88544ae8..f84bee291 100644 --- a/src/modules/partition/core/PartitionCoreModule.h +++ b/src/modules/partition/core/PartitionCoreModule.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONCOREMODULE_H diff --git a/src/modules/partition/core/PartitionInfo.cpp b/src/modules/partition/core/PartitionInfo.cpp index fe38bf2d6..87aa03b66 100644 --- a/src/modules/partition/core/PartitionInfo.cpp +++ b/src/modules/partition/core/PartitionInfo.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "core/PartitionInfo.h" diff --git a/src/modules/partition/core/PartitionInfo.h b/src/modules/partition/core/PartitionInfo.h index 9f9cd2d1e..19b66180a 100644 --- a/src/modules/partition/core/PartitionInfo.h +++ b/src/modules/partition/core/PartitionInfo.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONINFO_H #define PARTITIONINFO_H diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index 367b7487a..aceda2d72 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot - * Copyright 2018-2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2018-2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "GlobalStorage.h" diff --git a/src/modules/partition/core/PartitionLayout.h b/src/modules/partition/core/PartitionLayout.h index da691d200..79dff1697 100644 --- a/src/modules/partition/core/PartitionLayout.h +++ b/src/modules/partition/core/PartitionLayout.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018-2019, Collabora Ltd - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2018-2019 Collabora Ltd + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONLAYOUT_H diff --git a/src/modules/partition/core/PartitionModel.cpp b/src/modules/partition/core/PartitionModel.cpp index 1135f5719..9a8f4d96c 100644 --- a/src/modules/partition/core/PartitionModel.cpp +++ b/src/modules/partition/core/PartitionModel.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2018-2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "core/PartitionModel.h" diff --git a/src/modules/partition/core/PartitionModel.h b/src/modules/partition/core/PartitionModel.h index 7066aa5a5..f91479adc 100644 --- a/src/modules/partition/core/PartitionModel.h +++ b/src/modules/partition/core/PartitionModel.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2017, 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONMODEL_H #define PARTITIONMODEL_H diff --git a/src/modules/partition/gui/BootInfoWidget.cpp b/src/modules/partition/gui/BootInfoWidget.cpp index 696628c37..5d9dcf8b5 100644 --- a/src/modules/partition/gui/BootInfoWidget.cpp +++ b/src/modules/partition/gui/BootInfoWidget.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ @@ -24,16 +15,16 @@ #include "utils/Retranslator.h" #include -#include #include +#include BootInfoWidget::BootInfoWidget( QWidget* parent ) : QWidget( parent ) , m_bootIcon( new QLabel ) , m_bootLabel( new QLabel ) { - m_bootIcon->setObjectName("bootInfoIcon"); - m_bootLabel->setObjectName("bootInfoLabel"); + m_bootIcon->setObjectName( "bootInfoIcon" ); + m_bootLabel->setObjectName( "bootInfoLabel" ); QHBoxLayout* mainLayout = new QHBoxLayout; setLayout( mainLayout ); @@ -46,16 +37,15 @@ BootInfoWidget::BootInfoWidget( QWidget* parent ) m_bootIcon->setMargin( 0 ); m_bootIcon->setFixedSize( iconSize ); - m_bootIcon->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::BootEnvironment, - CalamaresUtils::Original, - iconSize ) ); - + m_bootIcon->setPixmap( + CalamaresUtils::defaultPixmap( CalamaresUtils::BootEnvironment, CalamaresUtils::Original, iconSize ) ); + QFontMetrics fm = QFontMetrics( QFont() ); m_bootLabel->setMinimumWidth( fm.boundingRect( "BIOS" ).width() + CalamaresUtils::defaultFontHeight() / 2 ); m_bootLabel->setAlignment( Qt::AlignCenter ); QPalette palette; - palette.setBrush( QPalette::Foreground, QColor( "#4D4D4D" ) ); //dark grey + palette.setBrush( QPalette::Foreground, QColor( "#4D4D4D" ) ); //dark grey m_bootIcon->setAutoFillBackground( true ); m_bootLabel->setAutoFillBackground( true ); @@ -100,7 +90,6 @@ BootInfoWidget::retranslateUi() "This is automatic, unless " "you choose manual partitioning, in which case you must " "set it up on your own." ); - } m_bootLabel->setToolTip( bootToolTip ); } diff --git a/src/modules/partition/gui/BootInfoWidget.h b/src/modules/partition/gui/BootInfoWidget.h index 257b3904a..6be3f6e7b 100644 --- a/src/modules/partition/gui/BootInfoWidget.h +++ b/src/modules/partition/gui/BootInfoWidget.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ @@ -38,4 +29,4 @@ private: QLabel* m_bootLabel; }; -#endif // BOOTINFOWIDGET_H +#endif // BOOTINFOWIDGET_H diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index d7b5e497e..6b4b8b659 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017-2019, Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ChoicePage.h" @@ -59,16 +50,16 @@ #include #include #include +#include #include #include -#include #include -using PartitionActions::Choices::SwapChoice; -using CalamaresUtils::Partition::PartitionIterator; -using CalamaresUtils::Partition::isPartitionFreeSpace; -using CalamaresUtils::Partition::findPartitionByPath; using Calamares::PrettyRadioButton; +using CalamaresUtils::Partition::findPartitionByPath; +using CalamaresUtils::Partition::isPartitionFreeSpace; +using CalamaresUtils::Partition::PartitionIterator; +using PartitionActions::Choices::SwapChoice; /** * @brief ChoicePage::ChoicePage is the default constructor. Called on startup as part of @@ -107,7 +98,9 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent ) m_allowManualPartitioning = gs->value( "allowManualPartitioning" ).toBool(); if ( FileSystem::typeForName( m_defaultFsType ) == FileSystem::Unknown ) + { m_defaultFsType = "ext4"; + } // Set up drives combo m_mainLayout->setDirection( QBoxLayout::TopToBottom ); @@ -134,12 +127,9 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent ) CalamaresUtils::unmarginLayout( m_itemsLayout ); // Drive selector + preview - CALAMARES_RETRANSLATE( - retranslateUi( this ); - m_drivesLabel->setText( tr( "Select storage de&vice:" ) ); - m_previewBeforeLabel->setText( tr( "Current:" ) ); - m_previewAfterLabel->setText( tr( "After:" ) ); - ) + CALAMARES_RETRANSLATE( retranslateUi( this ); m_drivesLabel->setText( tr( "Select storage de&vice:" ) ); + m_previewBeforeLabel->setText( tr( "Current:" ) ); + m_previewAfterLabel->setText( tr( "After:" ) ); ) m_previewBeforeFrame->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding ); m_previewAfterFrame->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding ); @@ -151,8 +141,7 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent ) } -ChoicePage::~ChoicePage() -{} +ChoicePage::~ChoicePage() {} void @@ -165,9 +154,7 @@ ChoicePage::init( PartitionCoreModule* core ) // We need to do this because a PCM revert invalidates the deviceModel. - connect( core, &PartitionCoreModule::reverted, - this, [=] - { + connect( core, &PartitionCoreModule::reverted, this, [=] { m_drivesCombo->setModel( core->deviceModel() ); m_drivesCombo->setCurrentIndex( m_lastSelectedDeviceIndex ); } ); @@ -175,12 +162,11 @@ ChoicePage::init( PartitionCoreModule* core ) connect( m_drivesCombo, static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ), - this, &ChoicePage::applyDeviceChoice ); + this, + &ChoicePage::applyDeviceChoice ); - connect( m_encryptWidget, &EncryptWidget::stateChanged, - this, &ChoicePage::onEncryptWidgetStateChanged ); - connect( m_reuseHomeCheckBox, &QCheckBox::stateChanged, - this, &ChoicePage::onHomeCheckBoxStateChanged ); + connect( m_encryptWidget, &EncryptWidget::stateChanged, this, &ChoicePage::onEncryptWidgetStateChanged ); + connect( m_reuseHomeCheckBox, &QCheckBox::stateChanged, this, &ChoicePage::onHomeCheckBoxStateChanged ); ChoicePage::applyDeviceChoice(); } @@ -195,13 +181,21 @@ static inline QComboBox* createCombo( const QSet< SwapChoice >& s, SwapChoice dflt ) { QComboBox* box = new QComboBox; - for ( SwapChoice c : { SwapChoice::NoSwap, SwapChoice::SmallSwap, SwapChoice::FullSwap, SwapChoice::ReuseSwap, SwapChoice::SwapFile } ) + for ( SwapChoice c : { SwapChoice::NoSwap, + SwapChoice::SmallSwap, + SwapChoice::FullSwap, + SwapChoice::ReuseSwap, + SwapChoice::SwapFile } ) if ( s.contains( c ) ) + { box->addItem( QString(), c ); + } int dfltIndex = box->findData( dflt ); if ( dfltIndex >= 0 ) + { box->setCurrentIndex( dfltIndex ); + } return box; } @@ -233,30 +227,26 @@ ChoicePage::setupChoices() // 3) Manual // TBD: upgrade option? - QSize iconSize( CalamaresUtils::defaultIconSize().width() * 2, - CalamaresUtils::defaultIconSize().height() * 2 ); + QSize iconSize( CalamaresUtils::defaultIconSize().width() * 2, CalamaresUtils::defaultIconSize().height() * 2 ); m_grp = new QButtonGroup( this ); m_alongsideButton = new PrettyRadioButton; m_alongsideButton->setIconSize( iconSize ); - m_alongsideButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionAlongside, - CalamaresUtils::Original, - iconSize ) ); + m_alongsideButton->setIcon( + CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionAlongside, CalamaresUtils::Original, iconSize ) ); m_alongsideButton->addToGroup( m_grp, InstallChoice::Alongside ); m_eraseButton = new PrettyRadioButton; m_eraseButton->setIconSize( iconSize ); - m_eraseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionEraseAuto, - CalamaresUtils::Original, - iconSize ) ); + m_eraseButton->setIcon( + CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionEraseAuto, CalamaresUtils::Original, iconSize ) ); m_eraseButton->addToGroup( m_grp, InstallChoice::Erase ); m_replaceButton = new PrettyRadioButton; m_replaceButton->setIconSize( iconSize ); - m_replaceButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionReplaceOs, - CalamaresUtils::Original, - iconSize ) ); + m_replaceButton->setIcon( + CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionReplaceOs, CalamaresUtils::Original, iconSize ) ); m_replaceButton->addToGroup( m_grp, InstallChoice::Replace ); // Fill up swap options @@ -273,17 +263,14 @@ ChoicePage::setupChoices() m_somethingElseButton = new PrettyRadioButton; m_somethingElseButton->setIconSize( iconSize ); - m_somethingElseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionManual, - CalamaresUtils::Original, - iconSize ) ); + m_somethingElseButton->setIcon( + CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionManual, CalamaresUtils::Original, iconSize ) ); m_itemsLayout->addWidget( m_somethingElseButton ); m_somethingElseButton->addToGroup( m_grp, InstallChoice::Manual ); m_itemsLayout->addStretch(); - connect( m_grp, QOverload::of( &QButtonGroup::buttonToggled ), - this, [ this ]( int id, bool checked ) - { + connect( m_grp, QOverload< int, bool >::of( &QButtonGroup::buttonToggled ), this, [this]( int id, bool checked ) { if ( checked ) // An action was picked. { m_choice = static_cast< InstallChoice >( id ); @@ -291,10 +278,11 @@ ChoicePage::setupChoices() emit actionChosen(); } - else // An action was unpicked, either on its own or because of another selection. + else // An action was unpicked, either on its own or because of another selection. { if ( m_grp->checkedButton() == nullptr ) // If no other action is chosen, we must - { // set m_choice to NoChoice and reset previews. + { + // set m_choice to NoChoice and reset previews. m_choice = InstallChoice::NoChoice; updateNextEnabled(); @@ -307,17 +295,16 @@ ChoicePage::setupChoices() m_rightLayout->setStretchFactor( m_previewBeforeFrame, 0 ); m_rightLayout->setStretchFactor( m_previewAfterFrame, 0 ); - connect( this, &ChoicePage::actionChosen, - this, &ChoicePage::onActionChanged ); + connect( this, &ChoicePage::actionChosen, this, &ChoicePage::onActionChanged ); if ( m_eraseSwapChoiceComboBox ) - connect( m_eraseSwapChoiceComboBox, QOverload::of(&QComboBox::currentIndexChanged), - this, &ChoicePage::onEraseSwapChoiceChanged ); + connect( m_eraseSwapChoiceComboBox, + QOverload< int >::of( &QComboBox::currentIndexChanged ), + this, + &ChoicePage::onEraseSwapChoiceChanged ); - CALAMARES_RETRANSLATE( - m_somethingElseButton->setText( tr( "Manual partitioning
" - "You can create or resize partitions yourself." ) ); - updateSwapChoicesTr( m_eraseSwapChoiceComboBox ); - ) + CALAMARES_RETRANSLATE( m_somethingElseButton->setText( tr( "Manual partitioning
" + "You can create or resize partitions yourself." ) ); + updateSwapChoicesTr( m_eraseSwapChoiceComboBox ); ) } @@ -331,9 +318,8 @@ Device* ChoicePage::selectedDevice() { Device* currentDevice = nullptr; - currentDevice = m_core->deviceModel()->deviceForIndex( - m_core->deviceModel()->index( - m_drivesCombo->currentIndex() ) ); + currentDevice + = m_core->deviceModel()->deviceForIndex( m_core->deviceModel()->index( m_drivesCombo->currentIndex() ) ); return currentDevice; } @@ -367,16 +353,13 @@ ChoicePage::applyDeviceChoice() if ( m_core->isDirty() ) { - ScanningDialog::run( QtConcurrent::run( [ = ] - { - QMutexLocker locker( &m_coreMutex ); - m_core->revertAllDevices(); - } ), - [ this ] - { - continueApplyDeviceChoice(); - }, - this ); + ScanningDialog::run( + QtConcurrent::run( [=] { + QMutexLocker locker( &m_coreMutex ); + m_core->revertAllDevices(); + } ), + [this] { continueApplyDeviceChoice(); }, + this ); } else { @@ -426,7 +409,8 @@ ChoicePage::onEraseSwapChoiceChanged() { if ( m_eraseSwapChoiceComboBox ) { - m_eraseSwapChoice = static_cast( m_eraseSwapChoiceComboBox->currentData().toInt() ); + m_eraseSwapChoice + = static_cast< PartitionActions::Choices::SwapChoice >( m_eraseSwapChoiceComboBox->currentData().toInt() ); onActionChanged(); } } @@ -434,85 +418,85 @@ ChoicePage::onEraseSwapChoiceChanged() void ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice ) { - m_beforePartitionBarsView->selectionModel()-> - disconnect( SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ) ); + m_beforePartitionBarsView->selectionModel()->disconnect( SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ) ); m_beforePartitionBarsView->selectionModel()->clearSelection(); m_beforePartitionBarsView->selectionModel()->clearCurrentIndex(); switch ( choice ) { case InstallChoice::Erase: + { + auto gs = Calamares::JobQueue::instance()->globalStorage(); + + PartitionActions::Choices::AutoPartitionOptions options { gs->value( "defaultFileSystemType" ).toString(), + m_encryptWidget->passphrase(), + gs->value( "efiSystemPartition" ).toString(), + CalamaresUtils::GiBtoBytes( + gs->value( "requiredStorageGiB" ).toDouble() ), + m_eraseSwapChoice }; + + if ( m_core->isDirty() ) { - auto gs = Calamares::JobQueue::instance()->globalStorage(); - - PartitionActions::Choices::AutoPartitionOptions options { - gs->value( "defaultFileSystemType" ).toString(), - m_encryptWidget->passphrase(), - gs->value( "efiSystemPartition" ).toString(), - CalamaresUtils::GiBtoBytes( gs->value( "requiredStorageGiB" ).toDouble() ), - m_eraseSwapChoice - }; - - if ( m_core->isDirty() ) - { - ScanningDialog::run( QtConcurrent::run( [ = ] - { + ScanningDialog::run( + QtConcurrent::run( [=] { QMutexLocker locker( &m_coreMutex ); m_core->revertDevice( selectedDevice() ); } ), - [ = ] - { + [=] { PartitionActions::doAutopartition( m_core, selectedDevice(), options ); emit deviceChosen(); }, this ); - } - else - { - PartitionActions::doAutopartition( m_core, selectedDevice(), options ); - emit deviceChosen(); - } } - break; + else + { + PartitionActions::doAutopartition( m_core, selectedDevice(), options ); + emit deviceChosen(); + } + } + break; case InstallChoice::Replace: if ( m_core->isDirty() ) { - ScanningDialog::run( QtConcurrent::run( [ = ] - { - QMutexLocker locker( &m_coreMutex ); - m_core->revertDevice( selectedDevice() ); - } ), - []{}, - this ); + ScanningDialog::run( + QtConcurrent::run( [=] { + QMutexLocker locker( &m_coreMutex ); + m_core->revertDevice( selectedDevice() ); + } ), + [] {}, + this ); } updateNextEnabled(); - connect( m_beforePartitionBarsView->selectionModel(), SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ), - this, SLOT( onPartitionToReplaceSelected( QModelIndex, QModelIndex ) ), + connect( m_beforePartitionBarsView->selectionModel(), + SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ), + this, + SLOT( onPartitionToReplaceSelected( QModelIndex, QModelIndex ) ), Qt::UniqueConnection ); break; case InstallChoice::Alongside: if ( m_core->isDirty() ) { - ScanningDialog::run( QtConcurrent::run( [ = ] - { - QMutexLocker locker( &m_coreMutex ); - m_core->revertDevice( selectedDevice() ); - } ), - [this] - { - // We need to reupdate after reverting because the splitter widget is - // not a true view. - updateActionChoicePreview( currentChoice() ); - updateNextEnabled(); - }, - this ); + ScanningDialog::run( + QtConcurrent::run( [=] { + QMutexLocker locker( &m_coreMutex ); + m_core->revertDevice( selectedDevice() ); + } ), + [this] { + // We need to reupdate after reverting because the splitter widget is + // not a true view. + updateActionChoicePreview( currentChoice() ); + updateNextEnabled(); + }, + this ); } updateNextEnabled(); - connect( m_beforePartitionBarsView->selectionModel(), SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ), - this, SLOT( doAlongsideSetupSplitter( QModelIndex, QModelIndex ) ), + connect( m_beforePartitionBarsView->selectionModel(), + SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ), + this, + SLOT( doAlongsideSetupSplitter( QModelIndex, QModelIndex ) ), Qt::UniqueConnection ); break; case InstallChoice::NoChoice: @@ -524,19 +508,24 @@ ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice ) void -ChoicePage::doAlongsideSetupSplitter( const QModelIndex& current, - const QModelIndex& previous ) +ChoicePage::doAlongsideSetupSplitter( const QModelIndex& current, const QModelIndex& previous ) { Q_UNUSED( previous ) if ( !current.isValid() ) + { return; + } if ( !m_afterPartitionSplitterWidget ) + { return; + } const PartitionModel* modl = qobject_cast< const PartitionModel* >( current.model() ); if ( !modl ) + { return; + } Partition* part = modl->partitionForIndex( current ); if ( !part ) @@ -545,21 +534,20 @@ ChoicePage::doAlongsideSetupSplitter( const QModelIndex& current, return; } - double requiredStorageGB = Calamares::JobQueue::instance() - ->globalStorage() - ->value( "requiredStorageGiB" ) - .toDouble(); + double requiredStorageGB + = Calamares::JobQueue::instance()->globalStorage()->value( "requiredStorageGiB" ).toDouble(); qint64 requiredStorageB = CalamaresUtils::GiBtoBytes( requiredStorageGB + 0.1 + 2.0 ); - m_afterPartitionSplitterWidget->setSplitPartition( - part->partitionPath(), - qRound64( part->used() * 1.1 ), - part->capacity() - requiredStorageB, - part->capacity() / 2 ); + m_afterPartitionSplitterWidget->setSplitPartition( part->partitionPath(), + qRound64( part->used() * 1.1 ), + part->capacity() - requiredStorageB, + part->capacity() / 2 ); if ( m_isEfi ) + { setupEfiSystemPartitionSelector(); + } cDebug() << "Partition selected for Alongside."; @@ -573,20 +561,17 @@ ChoicePage::onEncryptWidgetStateChanged() EncryptWidget::Encryption state = m_encryptWidget->state(); if ( m_choice == InstallChoice::Erase ) { - if ( state == EncryptWidget::Encryption::Confirmed || - state == EncryptWidget::Encryption::Disabled ) + if ( state == EncryptWidget::Encryption::Confirmed || state == EncryptWidget::Encryption::Disabled ) + { applyActionChoice( m_choice ); + } } else if ( m_choice == InstallChoice::Replace ) { - if ( m_beforePartitionBarsView && - m_beforePartitionBarsView->selectionModel()->currentIndex().isValid() && - ( state == EncryptWidget::Encryption::Confirmed || - state == EncryptWidget::Encryption::Disabled ) ) + if ( m_beforePartitionBarsView && m_beforePartitionBarsView->selectionModel()->currentIndex().isValid() + && ( state == EncryptWidget::Encryption::Confirmed || state == EncryptWidget::Encryption::Disabled ) ) { - doReplaceSelectedPartition( m_beforePartitionBarsView-> - selectionModel()-> - currentIndex() ); + doReplaceSelectedPartition( m_beforePartitionBarsView->selectionModel()->currentIndex() ); } } updateNextEnabled(); @@ -596,12 +581,10 @@ ChoicePage::onEncryptWidgetStateChanged() void ChoicePage::onHomeCheckBoxStateChanged() { - if ( currentChoice() == InstallChoice::Replace && - m_beforePartitionBarsView->selectionModel()->currentIndex().isValid() ) + if ( currentChoice() == InstallChoice::Replace + && m_beforePartitionBarsView->selectionModel()->currentIndex().isValid() ) { - doReplaceSelectedPartition( m_beforePartitionBarsView-> - selectionModel()-> - currentIndex() ); + doReplaceSelectedPartition( m_beforePartitionBarsView->selectionModel()->currentIndex() ); } } @@ -610,7 +593,9 @@ void ChoicePage::onLeave() { if ( m_choice == InstallChoice::Alongside ) + { doAlongsideApply(); + } if ( m_isEfi && ( m_choice == InstallChoice::Alongside || m_choice == InstallChoice::Replace ) ) { @@ -618,27 +603,22 @@ ChoicePage::onLeave() if ( efiSystemPartitions.count() == 1 ) { PartitionInfo::setMountPoint( - efiSystemPartitions.first(), - Calamares::JobQueue::instance()-> - globalStorage()-> - value( "efiSystemPartition" ).toString() ); + efiSystemPartitions.first(), + Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString() ); } else if ( efiSystemPartitions.count() > 1 && m_efiComboBox ) { PartitionInfo::setMountPoint( - efiSystemPartitions.at( m_efiComboBox->currentIndex() ), - Calamares::JobQueue::instance()-> - globalStorage()-> - value( "efiSystemPartition" ).toString() ); + efiSystemPartitions.at( m_efiComboBox->currentIndex() ), + Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString() ); } else { - cError() << "cannot set up EFI system partition.\nESP count:" - << efiSystemPartitions.count() << "\nm_efiComboBox:" - << m_efiComboBox; + cError() << "cannot set up EFI system partition.\nESP count:" << efiSystemPartitions.count() + << "\nm_efiComboBox:" << m_efiComboBox; } } - else // installPath is then passed to the bootloader module for MBR setup + else // installPath is then passed to the bootloader module for MBR setup { if ( !m_isEfi ) { @@ -646,15 +626,21 @@ ChoicePage::onLeave() { auto d_p = selectedDevice(); if ( d_p ) + { m_core->setBootLoaderInstallPath( d_p->deviceNode() ); + } else + { cWarning() << "No device selected for bootloader."; + } } else { QVariant var = m_bootloaderComboBox->currentData( BootLoaderModel::BootLoaderPathRole ); if ( !var.isValid() ) + { return; + } m_core->setBootLoaderInstallPath( var.toString() ); } } @@ -666,13 +652,14 @@ void ChoicePage::doAlongsideApply() { Q_ASSERT( m_afterPartitionSplitterWidget->splitPartitionSize() >= 0 ); - Q_ASSERT( m_afterPartitionSplitterWidget->newPartitionSize() >= 0 ); + Q_ASSERT( m_afterPartitionSplitterWidget->newPartitionSize() >= 0 ); QMutexLocker locker( &m_coreMutex ); - QString path = m_beforePartitionBarsView-> - selectionModel()-> - currentIndex().data( PartitionModel::PartitionPathRole ).toString(); + QString path = m_beforePartitionBarsView->selectionModel() + ->currentIndex() + .data( PartitionModel::PartitionPathRole ) + .toString(); DeviceModel* dm = m_core->deviceModel(); for ( int i = 0; i < dm->rowCount(); ++i ) @@ -683,15 +670,16 @@ ChoicePage::doAlongsideApply() { qint64 firstSector = candidate->firstSector(); qint64 oldLastSector = candidate->lastSector(); - qint64 newLastSector = firstSector + - m_afterPartitionSplitterWidget->splitPartitionSize() / - dev->logicalSize(); + qint64 newLastSector + = firstSector + m_afterPartitionSplitterWidget->splitPartitionSize() / dev->logicalSize(); m_core->resizePartition( dev, candidate, firstSector, newLastSector ); - m_core->layoutApply( dev, newLastSector + 2, oldLastSector, - m_encryptWidget->passphrase(), candidate->parent(), - candidate->roles() - ); + m_core->layoutApply( dev, + newLastSector + 2, + oldLastSector, + m_encryptWidget->passphrase(), + candidate->parent(), + candidate->roles() ); m_core->dumpQueue(); break; @@ -701,12 +689,13 @@ ChoicePage::doAlongsideApply() void -ChoicePage::onPartitionToReplaceSelected( const QModelIndex& current, - const QModelIndex& previous ) +ChoicePage::onPartitionToReplaceSelected( const QModelIndex& current, const QModelIndex& previous ) { Q_UNUSED( previous ) if ( !current.isValid() ) + { return; + } // Reset state on selection regardless of whether this will be used. m_reuseHomeCheckBox->setChecked( false ); @@ -719,111 +708,114 @@ void ChoicePage::doReplaceSelectedPartition( const QModelIndex& current ) { if ( !current.isValid() ) + { return; + } QString* homePartitionPath = new QString(); bool doReuseHomePartition = m_reuseHomeCheckBox->isChecked(); // NOTE: using by-ref captures because we need to write homePartitionPath and // doReuseHomePartition *after* the device revert, for later use. - ScanningDialog::run( QtConcurrent::run( - [ this, current ]( QString* homePartitionPath, bool doReuseHomePartition ) - { - QMutexLocker locker( &m_coreMutex ); + ScanningDialog::run( + QtConcurrent::run( + [this, current]( QString* homePartitionPath, bool doReuseHomePartition ) { + QMutexLocker locker( &m_coreMutex ); - if ( m_core->isDirty() ) - { - m_core->revertDevice( selectedDevice() ); - } - - // if the partition is unallocated(free space), we don't replace it but create new one - // with the same first and last sector - Partition* selectedPartition = - static_cast< Partition* >( current.data( PartitionModel::PartitionPtrRole ) - .value< void* >() ); - if ( isPartitionFreeSpace( selectedPartition ) ) - { - //NOTE: if the selected partition is free space, we don't deal with - // a separate /home partition at all because there's no existing - // rootfs to read it from. - PartitionRole newRoles = PartitionRole( PartitionRole::Primary ); - PartitionNode* newParent = selectedDevice()->partitionTable(); - - if ( selectedPartition->parent() ) - { - Partition* parent = dynamic_cast< Partition* >( selectedPartition->parent() ); - if ( parent && parent->roles().has( PartitionRole::Extended ) ) + if ( m_core->isDirty() ) { - newRoles = PartitionRole( PartitionRole::Logical ); - newParent = findPartitionByPath( { selectedDevice() }, parent->partitionPath() ); + m_core->revertDevice( selectedDevice() ); } - } - m_core->layoutApply( selectedDevice(), selectedPartition->firstSector(), - selectedPartition->lastSector(), - m_encryptWidget->passphrase(), newParent, newRoles - ); - } - else - { - // We can't use the PartitionPtrRole because we need to make changes to the - // main DeviceModel, not the immutable copy. - QString partPath = current.data( PartitionModel::PartitionPathRole ).toString(); - selectedPartition = findPartitionByPath( { selectedDevice() }, - partPath ); - if ( selectedPartition ) - { - // Find out is the selected partition has a rootfs. If yes, then make the - // m_reuseHomeCheckBox visible and set its text to something meaningful. - homePartitionPath->clear(); - for ( const OsproberEntry& osproberEntry : m_core->osproberEntries() ) - if ( osproberEntry.path == partPath ) - *homePartitionPath = osproberEntry.homePath; - if ( homePartitionPath->isEmpty() ) - doReuseHomePartition = false; - - Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - - PartitionActions::doReplacePartition( - m_core, - selectedDevice(), - selectedPartition, - { - gs->value( "defaultFileSystemType" ).toString(), - m_encryptWidget->passphrase() - } ); - Partition* homePartition = findPartitionByPath( { selectedDevice() }, - *homePartitionPath ); - - if ( homePartition && doReuseHomePartition ) + // if the partition is unallocated(free space), we don't replace it but create new one + // with the same first and last sector + Partition* selectedPartition + = static_cast< Partition* >( current.data( PartitionModel::PartitionPtrRole ).value< void* >() ); + if ( isPartitionFreeSpace( selectedPartition ) ) { - PartitionInfo::setMountPoint( homePartition, "/home" ); - gs->insert( "reuseHome", true ); + //NOTE: if the selected partition is free space, we don't deal with + // a separate /home partition at all because there's no existing + // rootfs to read it from. + PartitionRole newRoles = PartitionRole( PartitionRole::Primary ); + PartitionNode* newParent = selectedDevice()->partitionTable(); + + if ( selectedPartition->parent() ) + { + Partition* parent = dynamic_cast< Partition* >( selectedPartition->parent() ); + if ( parent && parent->roles().has( PartitionRole::Extended ) ) + { + newRoles = PartitionRole( PartitionRole::Logical ); + newParent = findPartitionByPath( { selectedDevice() }, parent->partitionPath() ); + } + } + + m_core->layoutApply( selectedDevice(), + selectedPartition->firstSector(), + selectedPartition->lastSector(), + m_encryptWidget->passphrase(), + newParent, + newRoles ); } else { - gs->insert( "reuseHome", false ); + // We can't use the PartitionPtrRole because we need to make changes to the + // main DeviceModel, not the immutable copy. + QString partPath = current.data( PartitionModel::PartitionPathRole ).toString(); + selectedPartition = findPartitionByPath( { selectedDevice() }, partPath ); + if ( selectedPartition ) + { + // Find out is the selected partition has a rootfs. If yes, then make the + // m_reuseHomeCheckBox visible and set its text to something meaningful. + homePartitionPath->clear(); + for ( const OsproberEntry& osproberEntry : m_core->osproberEntries() ) + if ( osproberEntry.path == partPath ) + { + *homePartitionPath = osproberEntry.homePath; + } + if ( homePartitionPath->isEmpty() ) + { + doReuseHomePartition = false; + } + + Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); + + PartitionActions::doReplacePartition( + m_core, + selectedDevice(), + selectedPartition, + { gs->value( "defaultFileSystemType" ).toString(), m_encryptWidget->passphrase() } ); + Partition* homePartition = findPartitionByPath( { selectedDevice() }, *homePartitionPath ); + + if ( homePartition && doReuseHomePartition ) + { + PartitionInfo::setMountPoint( homePartition, "/home" ); + gs->insert( "reuseHome", true ); + } + else + { + gs->insert( "reuseHome", false ); + } + } } - } - } - }, homePartitionPath, doReuseHomePartition ), - [ = ] - { - m_reuseHomeCheckBox->setVisible( !homePartitionPath->isEmpty() ); - if ( !homePartitionPath->isEmpty() ) - m_reuseHomeCheckBox->setText( tr( "Reuse %1 as home partition for %2." ) - .arg( *homePartitionPath ) - .arg( Calamares::Branding::instance()->shortProductName() ) ); - delete homePartitionPath; + }, + homePartitionPath, + doReuseHomePartition ), + [=] { + m_reuseHomeCheckBox->setVisible( !homePartitionPath->isEmpty() ); + if ( !homePartitionPath->isEmpty() ) + m_reuseHomeCheckBox->setText( tr( "Reuse %1 as home partition for %2." ) + .arg( *homePartitionPath ) + .arg( Calamares::Branding::instance()->shortProductName() ) ); + delete homePartitionPath; - if ( m_isEfi ) - setupEfiSystemPartitionSelector(); + if ( m_isEfi ) + setupEfiSystemPartitionSelector(); - updateNextEnabled(); - if ( !m_bootloaderComboBox.isNull() && - m_bootloaderComboBox->currentIndex() < 0 ) - m_bootloaderComboBox->setCurrentIndex( m_lastSelectedDeviceIndex ); - }, this ); + updateNextEnabled(); + if ( !m_bootloaderComboBox.isNull() && m_bootloaderComboBox->currentIndex() < 0 ) + m_bootloaderComboBox->setCurrentIndex( m_lastSelectedDeviceIndex ); + }, + this ); } @@ -847,17 +839,19 @@ ChoicePage::updateDeviceStatePreview() auto layout = m_previewBeforeFrame->layout(); if ( layout ) + { layout->deleteLater(); // Doesn't like nullptr + } layout = new QVBoxLayout; m_previewBeforeFrame->setLayout( layout ); CalamaresUtils::unmarginLayout( layout ); layout->setSpacing( 6 ); - PartitionBarsView::NestedPartitionsMode mode = Calamares::JobQueue::instance()->globalStorage()-> - value( "drawNestedPartitions" ).toBool() ? - PartitionBarsView::DrawNestedPartitions : - PartitionBarsView::NoNestedPartitions; + PartitionBarsView::NestedPartitionsMode mode + = Calamares::JobQueue::instance()->globalStorage()->value( "drawNestedPartitions" ).toBool() + ? PartitionBarsView::DrawNestedPartitions + : PartitionBarsView::NoNestedPartitions; m_beforePartitionBarsView = new PartitionBarsView( m_previewBeforeFrame ); m_beforePartitionBarsView->setNestedPartitionsMode( mode ); m_beforePartitionLabelsView = new PartitionLabelsView( m_previewBeforeFrame ); @@ -875,7 +869,9 @@ ChoicePage::updateDeviceStatePreview() auto sm = m_beforePartitionLabelsView->selectionModel(); m_beforePartitionLabelsView->setSelectionModel( m_beforePartitionBarsView->selectionModel() ); if ( sm ) + { sm->deleteLater(); + } switch ( m_choice ) { @@ -914,17 +910,19 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice ) auto oldlayout = m_previewAfterFrame->layout(); if ( oldlayout ) + { oldlayout->deleteLater(); + } QVBoxLayout* layout = new QVBoxLayout; m_previewAfterFrame->setLayout( layout ); CalamaresUtils::unmarginLayout( layout ); layout->setSpacing( 6 ); - PartitionBarsView::NestedPartitionsMode mode = Calamares::JobQueue::instance()->globalStorage()-> - value( "drawNestedPartitions" ).toBool() ? - PartitionBarsView::DrawNestedPartitions : - PartitionBarsView::NoNestedPartitions; + PartitionBarsView::NestedPartitionsMode mode + = Calamares::JobQueue::instance()->globalStorage()->value( "drawNestedPartitions" ).toBool() + ? PartitionBarsView::DrawNestedPartitions + : PartitionBarsView::NoNestedPartitions; m_reuseHomeCheckBox->hide(); Calamares::JobQueue::instance()->globalStorage()->insert( "reuseHome", false ); @@ -932,136 +930,142 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice ) switch ( choice ) { case InstallChoice::Alongside: + { + if ( m_enableEncryptionWidget ) { - if ( m_enableEncryptionWidget ) - m_encryptWidget->show(); - m_previewBeforeLabel->setText( tr( "Current:" ) ); - m_selectLabel->setText( tr( "Select a partition to shrink, " - "then drag the bottom bar to resize" ) ); - m_selectLabel->show(); + m_encryptWidget->show(); + } + m_previewBeforeLabel->setText( tr( "Current:" ) ); + m_selectLabel->setText( tr( "Select a partition to shrink, " + "then drag the bottom bar to resize" ) ); + m_selectLabel->show(); - m_afterPartitionSplitterWidget = new PartitionSplitterWidget( m_previewAfterFrame ); - m_afterPartitionSplitterWidget->init( selectedDevice(), mode == PartitionBarsView::DrawNestedPartitions ); - layout->addWidget( m_afterPartitionSplitterWidget ); + m_afterPartitionSplitterWidget = new PartitionSplitterWidget( m_previewAfterFrame ); + m_afterPartitionSplitterWidget->init( selectedDevice(), mode == PartitionBarsView::DrawNestedPartitions ); + layout->addWidget( m_afterPartitionSplitterWidget ); - QLabel* sizeLabel = new QLabel( m_previewAfterFrame ); - layout->addWidget( sizeLabel ); - sizeLabel->setWordWrap( true ); - connect( m_afterPartitionSplitterWidget, &PartitionSplitterWidget::partitionResized, this, - [ this, sizeLabel ]( const QString& path, qint64 size, qint64 sizeNext ) + QLabel* sizeLabel = new QLabel( m_previewAfterFrame ); + layout->addWidget( sizeLabel ); + sizeLabel->setWordWrap( true ); + connect( m_afterPartitionSplitterWidget, + &PartitionSplitterWidget::partitionResized, + this, + [this, sizeLabel]( const QString& path, qint64 size, qint64 sizeNext ) { + Q_UNUSED( path ) + sizeLabel->setText( + tr( "%1 will be shrunk to %2MiB and a new " + "%3MiB partition will be created for %4." ) + .arg( m_beforePartitionBarsView->selectionModel()->currentIndex().data().toString() ) + .arg( CalamaresUtils::BytesToMiB( size ) ) + .arg( CalamaresUtils::BytesToMiB( sizeNext ) ) + .arg( Calamares::Branding::instance()->shortProductName() ) ); + } ); + + m_previewAfterFrame->show(); + m_previewAfterLabel->show(); + + SelectionFilter filter = [this]( const QModelIndex& index ) { + return PartUtils::canBeResized( + static_cast< Partition* >( index.data( PartitionModel::PartitionPtrRole ).value< void* >() ) ); + }; + m_beforePartitionBarsView->setSelectionFilter( filter ); + m_beforePartitionLabelsView->setSelectionFilter( filter ); + + break; + } + case InstallChoice::Erase: + case InstallChoice::Replace: + { + if ( m_enableEncryptionWidget ) + { + m_encryptWidget->show(); + } + m_previewBeforeLabel->setText( tr( "Current:" ) ); + m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame ); + m_afterPartitionBarsView->setNestedPartitionsMode( mode ); + m_afterPartitionLabelsView = new PartitionLabelsView( m_previewAfterFrame ); + m_afterPartitionLabelsView->setExtendedPartitionHidden( mode == PartitionBarsView::NoNestedPartitions ); + m_afterPartitionLabelsView->setCustomNewRootLabel( + Calamares::Branding::instance()->string( Calamares::Branding::BootloaderEntryName ) ); + + PartitionModel* model = m_core->partitionModelForDevice( selectedDevice() ); + + // The QObject parents tree is meaningful for memory management here, + // see qDeleteAll above. + m_afterPartitionBarsView->setModel( model ); + m_afterPartitionLabelsView->setModel( model ); + m_afterPartitionBarsView->setSelectionMode( QAbstractItemView::NoSelection ); + m_afterPartitionLabelsView->setSelectionMode( QAbstractItemView::NoSelection ); + + layout->addWidget( m_afterPartitionBarsView ); + layout->addWidget( m_afterPartitionLabelsView ); + + if ( !m_isEfi ) + { + QWidget* eraseWidget = new QWidget; + + QHBoxLayout* eraseLayout = new QHBoxLayout; + eraseWidget->setLayout( eraseLayout ); + eraseLayout->setContentsMargins( 0, 0, 0, 0 ); + QLabel* eraseBootloaderLabel = new QLabel( eraseWidget ); + eraseLayout->addWidget( eraseBootloaderLabel ); + eraseBootloaderLabel->setText( tr( "Boot loader location:" ) ); + + m_bootloaderComboBox = createBootloaderComboBox( eraseWidget ); + connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, [this]() { + if ( !m_bootloaderComboBox.isNull() ) { - Q_UNUSED( path ) - sizeLabel->setText( tr( "%1 will be shrunk to %2MiB and a new " - "%3MiB partition will be created for %4." ) - .arg( m_beforePartitionBarsView->selectionModel()->currentIndex().data().toString() ) - .arg( CalamaresUtils::BytesToMiB( size ) ) - .arg( CalamaresUtils::BytesToMiB( sizeNext ) ) - .arg( Calamares::Branding::instance()->shortProductName() ) ); + Calamares::restoreSelectedBootLoader( *m_bootloaderComboBox, m_core->bootLoaderInstallPath() ); } - ); + } ); + connect( + m_core, + &PartitionCoreModule::deviceReverted, + this, + [this]( Device* dev ) { + Q_UNUSED( dev ) + if ( !m_bootloaderComboBox.isNull() ) + { + if ( m_bootloaderComboBox->model() != m_core->bootLoaderModel() ) + { + m_bootloaderComboBox->setModel( m_core->bootLoaderModel() ); + } - m_previewAfterFrame->show(); - m_previewAfterLabel->show(); + m_bootloaderComboBox->setCurrentIndex( m_lastSelectedDeviceIndex ); + } + }, + Qt::QueuedConnection ); + // ^ Must be Queued so it's sure to run when the widget is already visible. - SelectionFilter filter = [ this ]( const QModelIndex& index ) - { - return PartUtils::canBeResized( - static_cast< Partition* >( - index.data( PartitionModel::PartitionPtrRole ) - .value< void* >() ) ); + eraseLayout->addWidget( m_bootloaderComboBox ); + eraseBootloaderLabel->setBuddy( m_bootloaderComboBox ); + eraseLayout->addStretch(); + + layout->addWidget( eraseWidget ); + } + + m_previewAfterFrame->show(); + m_previewAfterLabel->show(); + + if ( m_choice == InstallChoice::Erase ) + { + m_selectLabel->hide(); + } + else + { + SelectionFilter filter = [this]( const QModelIndex& index ) { + return PartUtils::canBeReplaced( + static_cast< Partition* >( index.data( PartitionModel::PartitionPtrRole ).value< void* >() ) ); }; m_beforePartitionBarsView->setSelectionFilter( filter ); m_beforePartitionLabelsView->setSelectionFilter( filter ); - break; + m_selectLabel->show(); + m_selectLabel->setText( tr( "Select a partition to install on" ) ); } - case InstallChoice::Erase: - case InstallChoice::Replace: - { - if ( m_enableEncryptionWidget ) - m_encryptWidget->show(); - m_previewBeforeLabel->setText( tr( "Current:" ) ); - m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame ); - m_afterPartitionBarsView->setNestedPartitionsMode( mode ); - m_afterPartitionLabelsView = new PartitionLabelsView( m_previewAfterFrame ); - m_afterPartitionLabelsView->setExtendedPartitionHidden( mode == PartitionBarsView::NoNestedPartitions ); - m_afterPartitionLabelsView->setCustomNewRootLabel( Calamares::Branding::instance()->string(Calamares::Branding::BootloaderEntryName) ); - PartitionModel* model = m_core->partitionModelForDevice( selectedDevice() ); - - // The QObject parents tree is meaningful for memory management here, - // see qDeleteAll above. - m_afterPartitionBarsView->setModel( model ); - m_afterPartitionLabelsView->setModel( model ); - m_afterPartitionBarsView->setSelectionMode( QAbstractItemView::NoSelection ); - m_afterPartitionLabelsView->setSelectionMode( QAbstractItemView::NoSelection ); - - layout->addWidget( m_afterPartitionBarsView ); - layout->addWidget( m_afterPartitionLabelsView ); - - if ( !m_isEfi ) - { - QWidget* eraseWidget = new QWidget; - - QHBoxLayout* eraseLayout = new QHBoxLayout; - eraseWidget->setLayout( eraseLayout ); - eraseLayout->setContentsMargins( 0, 0, 0, 0 ); - QLabel* eraseBootloaderLabel = new QLabel( eraseWidget ); - eraseLayout->addWidget( eraseBootloaderLabel ); - eraseBootloaderLabel->setText( tr( "Boot loader location:" ) ); - - m_bootloaderComboBox = createBootloaderComboBox( eraseWidget ); - connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, - [ this ]() - { - if ( !m_bootloaderComboBox.isNull() ) - Calamares::restoreSelectedBootLoader( *m_bootloaderComboBox, m_core->bootLoaderInstallPath() ); - } - ); - connect( m_core, &PartitionCoreModule::deviceReverted, this, - [ this ]( Device* dev ) - { - Q_UNUSED( dev ) - if ( !m_bootloaderComboBox.isNull() ) - { - if ( m_bootloaderComboBox->model() != m_core->bootLoaderModel() ) - m_bootloaderComboBox->setModel( m_core->bootLoaderModel() ); - - m_bootloaderComboBox->setCurrentIndex( m_lastSelectedDeviceIndex ); - } - }, Qt::QueuedConnection ); - // ^ Must be Queued so it's sure to run when the widget is already visible. - - eraseLayout->addWidget( m_bootloaderComboBox ); - eraseBootloaderLabel->setBuddy( m_bootloaderComboBox ); - eraseLayout->addStretch(); - - layout->addWidget( eraseWidget ); - } - - m_previewAfterFrame->show(); - m_previewAfterLabel->show(); - - if ( m_choice == InstallChoice::Erase ) - m_selectLabel->hide(); - else - { - SelectionFilter filter = [ this ]( const QModelIndex& index ) - { - return PartUtils::canBeReplaced( - static_cast< Partition* >( - index.data( PartitionModel::PartitionPtrRole ) - .value< void* >() ) ); - }; - m_beforePartitionBarsView->setSelectionFilter( filter ); - m_beforePartitionLabelsView->setSelectionFilter( filter ); - - m_selectLabel->show(); - m_selectLabel->setText( tr( "Select a partition to install on" ) ); - } - - break; - } + break; + } case InstallChoice::NoChoice: case InstallChoice::Manual: m_selectLabel->hide(); @@ -1110,22 +1114,20 @@ ChoicePage::setupEfiSystemPartitionSelector() // Only the already existing ones: QList< Partition* > efiSystemPartitions = m_core->efiSystemPartitions(); - if ( efiSystemPartitions.count() == 0 ) //should never happen + if ( efiSystemPartitions.count() == 0 ) //should never happen { - m_efiLabel->setText( - tr( "An EFI system partition cannot be found anywhere " - "on this system. Please go back and use manual " - "partitioning to set up %1." ) - .arg( Calamares::Branding::instance()->shortProductName() ) ); + m_efiLabel->setText( tr( "An EFI system partition cannot be found anywhere " + "on this system. Please go back and use manual " + "partitioning to set up %1." ) + .arg( Calamares::Branding::instance()->shortProductName() ) ); updateNextEnabled(); } - else if ( efiSystemPartitions.count() == 1 ) //probably most usual situation + else if ( efiSystemPartitions.count() == 1 ) //probably most usual situation { - m_efiLabel->setText( - tr( "The EFI system partition at %1 will be used for " - "starting %2." ) - .arg( efiSystemPartitions.first()->partitionPath() ) - .arg( Calamares::Branding::instance()->shortProductName() ) ); + m_efiLabel->setText( tr( "The EFI system partition at %1 will be used for " + "starting %2." ) + .arg( efiSystemPartitions.first()->partitionPath() ) + .arg( Calamares::Branding::instance()->shortProductName() ) ); } else { @@ -1137,9 +1139,10 @@ ChoicePage::setupEfiSystemPartitionSelector() m_efiComboBox->addItem( efiPartition->partitionPath(), i ); // We pick an ESP on the currently selected device, if possible - if ( efiPartition->devicePath() == selectedDevice()->deviceNode() && - efiPartition->number() == 1 ) + if ( efiPartition->devicePath() == selectedDevice()->deviceNode() && efiPartition->number() == 1 ) + { m_efiComboBox->setCurrentIndex( i ); + } } } } @@ -1152,15 +1155,15 @@ ChoicePage::createBootloaderComboBox( QWidget* parent ) bcb->setModel( m_core->bootLoaderModel() ); // When the chosen bootloader device changes, we update the choice in the PCM - connect( bcb, QOverload::of( &QComboBox::currentIndexChanged ), - this, [this]( int newIndex ) - { + connect( bcb, QOverload< int >::of( &QComboBox::currentIndexChanged ), this, [this]( int newIndex ) { QComboBox* bcb = qobject_cast< QComboBox* >( sender() ); if ( bcb ) { QVariant var = bcb->itemData( newIndex, BootLoaderModel::BootLoaderPathRole ); if ( !var.isValid() ) + { return; + } m_core->setBootLoaderInstallPath( var.toString() ); } } ); @@ -1170,7 +1173,7 @@ ChoicePage::createBootloaderComboBox( QWidget* parent ) static inline void -force_uncheck(QButtonGroup* grp, PrettyRadioButton* button) +force_uncheck( QButtonGroup* grp, PrettyRadioButton* button ) { button->hide(); grp->setExclusive( false ); @@ -1179,7 +1182,7 @@ force_uncheck(QButtonGroup* grp, PrettyRadioButton* button) } static inline QDebug& -operator <<( QDebug& s, PartitionIterator& it ) +operator<<( QDebug& s, PartitionIterator& it ) { s << ( ( *it ) ? ( *it )->deviceNode() : QString( "" ) ); return s; @@ -1195,21 +1198,28 @@ void ChoicePage::setupActions() { Device* currentDevice = selectedDevice(); - OsproberEntryList osproberEntriesForCurrentDevice = - getOsproberEntriesForDevice( currentDevice ); + OsproberEntryList osproberEntriesForCurrentDevice = getOsproberEntriesForDevice( currentDevice ); - cDebug() << "Setting up actions for" << currentDevice->deviceNode() - << "with" << osproberEntriesForCurrentDevice.count() << "entries."; + cDebug() << "Setting up actions for" << currentDevice->deviceNode() << "with" + << osproberEntriesForCurrentDevice.count() << "entries."; if ( currentDevice->partitionTable() ) + { m_deviceInfoWidget->setPartitionTableType( currentDevice->partitionTable()->type() ); + } else + { m_deviceInfoWidget->setPartitionTableType( PartitionTable::unknownTableType ); + } if ( m_allowManualPartitioning ) + { m_somethingElseButton->show(); + } else + { force_uncheck( m_grp, m_somethingElseButton ); + } bool atLeastOneCanBeResized = false; bool atLeastOneCanBeReplaced = false; @@ -1217,16 +1227,15 @@ ChoicePage::setupActions() bool isInactiveRAID = false; #ifdef WITH_KPMCORE4API - if ( currentDevice->type() == Device::Type::SoftwareRAID_Device && - static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive ) + if ( currentDevice->type() == Device::Type::SoftwareRAID_Device + && static_cast< SoftwareRAID* >( currentDevice )->status() == SoftwareRAID::Status::Inactive ) { cDebug() << Logger::SubEntry << "part of an inactive RAID device"; isInactiveRAID = true; } #endif - for ( auto it = PartitionIterator::begin( currentDevice ); - it != PartitionIterator::end( currentDevice ); ++it ) + for ( auto it = PartitionIterator::begin( currentDevice ); it != PartitionIterator::end( currentDevice ); ++it ) { if ( PartUtils::canBeResized( *it ) ) { @@ -1238,7 +1247,7 @@ ChoicePage::setupActions() cDebug() << Logger::SubEntry << "contains replaceable" << it; atLeastOneCanBeReplaced = true; } - if ( (*it)->isMounted() ) + if ( ( *it )->isMounted() ) { atLeastOneIsMounted = true; } @@ -1259,12 +1268,11 @@ ChoicePage::setupActions() m_alongsideButton->setText( tr( "Install alongside
" "The installer will shrink a partition to make room for %1." ) - .arg( Calamares::Branding::instance()->shortVersionedName() ) ); + .arg( Calamares::Branding::instance()->shortVersionedName() ) ); m_replaceButton->setText( tr( "Replace a partition
" "Replaces a partition with %1." ) - .arg( Calamares::Branding::instance()->shortVersionedName() ) ); - ) + .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ) m_replaceButton->hide(); m_alongsideButton->hide(); @@ -1285,11 +1293,11 @@ ChoicePage::setupActions() "What would you like to do?
" "You will be able to review and confirm your choices " "before any change is made to the storage device." ) - .arg( osName ) ); + .arg( osName ) ); m_alongsideButton->setText( tr( "Install alongside
" "The installer will shrink a partition to make room for %1." ) - .arg( Calamares::Branding::instance()->shortVersionedName() ) ); + .arg( Calamares::Branding::instance()->shortVersionedName() ) ); m_eraseButton->setText( tr( "Erase disk
" "This will delete all data " @@ -1298,8 +1306,7 @@ ChoicePage::setupActions() m_replaceButton->setText( tr( "Replace a partition
" "Replaces a partition with %1." ) - .arg( Calamares::Branding::instance()->shortVersionedName() ) ); - ) + .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ) } else { @@ -1312,7 +1319,7 @@ ChoicePage::setupActions() m_alongsideButton->setText( tr( "Install alongside
" "The installer will shrink a partition to make room for %1." ) - .arg( Calamares::Branding::instance()->shortVersionedName() ) ); + .arg( Calamares::Branding::instance()->shortVersionedName() ) ); m_eraseButton->setText( tr( "Erase disk
" "This will delete all data " @@ -1320,8 +1327,7 @@ ChoicePage::setupActions() m_replaceButton->setText( tr( "Replace a partition
" "Replaces a partition with %1." ) - .arg( Calamares::Branding::instance()->shortVersionedName() ) ); - ) + .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ) } } else @@ -1338,7 +1344,7 @@ ChoicePage::setupActions() m_alongsideButton->setText( tr( "Install alongside
" "The installer will shrink a partition to make room for %1." ) - .arg( Calamares::Branding::instance()->shortVersionedName() ) ); + .arg( Calamares::Branding::instance()->shortVersionedName() ) ); m_eraseButton->setText( tr( "Erase disk
" "This will delete all data " @@ -1346,8 +1352,7 @@ ChoicePage::setupActions() m_replaceButton->setText( tr( "Replace a partition
" "Replaces a partition with %1." ) - .arg( Calamares::Branding::instance()->shortVersionedName() ) ); - ) + .arg( Calamares::Branding::instance()->shortVersionedName() ) ); ) } #ifdef DEBUG_PARTITION_UNSAFE @@ -1361,7 +1366,9 @@ ChoicePage::setupActions() #endif if ( atLeastOneCanBeReplaced ) + { m_replaceButton->show(); + } else { cDebug() << "Replace button suppressed because none can be replaced."; @@ -1369,7 +1376,9 @@ ChoicePage::setupActions() } if ( atLeastOneCanBeResized ) + { m_alongsideButton->show(); + } else { cDebug() << "Alongside button suppressed because none can be resized."; @@ -1377,12 +1386,13 @@ ChoicePage::setupActions() } if ( !atLeastOneIsMounted && !isInactiveRAID ) + { m_eraseButton->show(); // None mounted + } else { cDebug() << "Erase button suppressed" - << "mount?" << atLeastOneIsMounted - << "raid?" << isInactiveRAID; + << "mount?" << atLeastOneIsMounted << "raid?" << isInactiveRAID; force_uncheck( m_grp, m_eraseButton ); } @@ -1392,7 +1402,7 @@ ChoicePage::setupActions() if ( isEfi && !efiSystemPartitionFound ) { cWarning() << "System is EFI but there's no EFI system partition, " - "DISABLING alongside and replace features."; + "DISABLING alongside and replace features."; m_alongsideButton->hide(); m_replaceButton->hide(); } @@ -1406,7 +1416,9 @@ ChoicePage::getOsproberEntriesForDevice( Device* device ) const for ( const OsproberEntry& entry : m_core->osproberEntries() ) { if ( entry.path.startsWith( device->deviceNode() ) ) + { eList.append( entry ); + } } return eList; } @@ -1450,7 +1462,7 @@ ChoicePage::calculateNextEnabled() const enabled = true; } - if (!enabled) + if ( !enabled ) { cDebug() << "No valid choice made"; return false; @@ -1470,13 +1482,13 @@ ChoicePage::calculateNextEnabled() const { switch ( m_encryptWidget->state() ) { - case EncryptWidget::Encryption::Unconfirmed: - cDebug() << "No passphrase provided"; - return false; - case EncryptWidget::Encryption::Disabled: - case EncryptWidget::Encryption::Confirmed: - // Checkbox not checked, **or** passphrases match - break; + case EncryptWidget::Encryption::Unconfirmed: + cDebug() << "No passphrase provided"; + return false; + case EncryptWidget::Encryption::Disabled: + case EncryptWidget::Encryption::Confirmed: + // Checkbox not checked, **or** passphrases match + break; } } @@ -1497,12 +1509,14 @@ ChoicePage::updateNextEnabled() } void -ChoicePage::updateSwapChoicesTr(QComboBox* box) +ChoicePage::updateSwapChoicesTr( QComboBox* box ) { if ( !box ) + { return; + } - static_assert(SwapChoice::NoSwap == 0, "Enum values out-of-sync"); + static_assert( SwapChoice::NoSwap == 0, "Enum values out-of-sync" ); for ( int index = 0; index < box->count(); ++index ) { bool ok = false; @@ -1510,28 +1524,32 @@ ChoicePage::updateSwapChoicesTr(QComboBox* box) switch ( value = box->itemData( index ).toInt( &ok ) ) { - // case 0: - case SwapChoice::NoSwap: - // toInt() returns 0 on failure, so check for ok - if ( ok ) // It was explicitly set to 0 - box->setItemText( index, tr( "No Swap" ) ); - else - cWarning() << "Box item" << index << box->itemText( index ) << "has non-integer role."; - break; - case SwapChoice::ReuseSwap: - box->setItemText( index, tr( "Reuse Swap" ) ); - break; - case SwapChoice::SmallSwap: - box->setItemText( index, tr( "Swap (no Hibernate)" ) ); - break; - case SwapChoice::FullSwap: - box->setItemText( index, tr( "Swap (with Hibernate)" ) ); - break; - case SwapChoice::SwapFile: - box->setItemText( index, tr( "Swap to file" ) ); - break; - default: - cWarning() << "Box item" << index << box->itemText( index ) << "has role" << value; + // case 0: + case SwapChoice::NoSwap: + // toInt() returns 0 on failure, so check for ok + if ( ok ) // It was explicitly set to 0 + { + box->setItemText( index, tr( "No Swap" ) ); + } + else + { + cWarning() << "Box item" << index << box->itemText( index ) << "has non-integer role."; + } + break; + case SwapChoice::ReuseSwap: + box->setItemText( index, tr( "Reuse Swap" ) ); + break; + case SwapChoice::SmallSwap: + box->setItemText( index, tr( "Swap (no Hibernate)" ) ); + break; + case SwapChoice::FullSwap: + box->setItemText( index, tr( "Swap (with Hibernate)" ) ); + break; + case SwapChoice::SwapFile: + box->setItemText( index, tr( "Swap to file" ) ); + break; + default: + cWarning() << "Box item" << index << box->itemText( index ) << "has role" << value; } } } diff --git a/src/modules/partition/gui/ChoicePage.h b/src/modules/partition/gui/ChoicePage.h index af8ee9060..7c364cc1f 100644 --- a/src/modules/partition/gui/ChoicePage.h +++ b/src/modules/partition/gui/ChoicePage.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2018-2019, Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CHOICEPAGE_H diff --git a/src/modules/partition/gui/ChoicePage.ui b/src/modules/partition/gui/ChoicePage.ui index 0eca520b3..95b8d145a 100644 --- a/src/modules/partition/gui/ChoicePage.ui +++ b/src/modules/partition/gui/ChoicePage.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + ChoicePage diff --git a/src/modules/partition/gui/CreatePartitionDialog.cpp b/src/modules/partition/gui/CreatePartitionDialog.cpp index a73441bc3..3b51010b8 100644 --- a/src/modules/partition/gui/CreatePartitionDialog.cpp +++ b/src/modules/partition/gui/CreatePartitionDialog.cpp @@ -1,39 +1,30 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac - * Copyright 2018, 2020, Adriaan de Groot - * Copyright 2018, Andrius Štikonas - * Copyright 2018, Caio Carvalho + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Andrius Štikonas + * SPDX-FileCopyrightText: 2018 Caio Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CreatePartitionDialog.h" #include "ui_CreatePartitionDialog.h" #include "core/ColorUtils.h" -#include "core/PartitionInfo.h" -#include "core/PartUtils.h" #include "core/KPMHelpers.h" +#include "core/PartUtils.h" +#include "core/PartitionInfo.h" #include "gui/PartitionDialogHelpers.h" #include "gui/PartitionSizeController.h" #include "GlobalStorage.h" #include "JobQueue.h" -#include "partition/PartitionQuery.h" #include "partition/FileSystem.h" +#include "partition/PartitionQuery.h" #include "utils/Logger.h" #include @@ -53,16 +44,17 @@ using CalamaresUtils::Partition::untranslatedFS; using CalamaresUtils::Partition::userVisibleFS; -static QSet< FileSystem::Type > s_unmountableFS( -{ - FileSystem::Unformatted, - FileSystem::LinuxSwap, - FileSystem::Extended, - FileSystem::Unknown, - FileSystem::Lvm2_PV -} ); +static QSet< FileSystem::Type > s_unmountableFS( { FileSystem::Unformatted, + FileSystem::LinuxSwap, + FileSystem::Extended, + FileSystem::Unknown, + FileSystem::Lvm2_PV } ); -CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* parentPartition, Partition* partition, const QStringList& usedMountPoints, QWidget* parentWidget ) +CreatePartitionDialog::CreatePartitionDialog( Device* device, + PartitionNode* parentPartition, + Partition* partition, + const QStringList& usedMountPoints, + QWidget* parentWidget ) : QDialog( parentWidget ) , m_ui( new Ui_CreatePartitionDialog ) , m_partitionSizeController( new PartitionSizeController( this ) ) @@ -74,33 +66,38 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par m_ui->encryptWidget->setText( tr( "En&crypt" ) ); m_ui->encryptWidget->hide(); - if (m_device->type() != Device::Type::LVM_Device) { + if ( m_device->type() != Device::Type::LVM_Device ) + { m_ui->lvNameLabel->hide(); m_ui->lvNameLineEdit->hide(); } - if (m_device->type() == Device::Type::LVM_Device) { + if ( m_device->type() == Device::Type::LVM_Device ) + { /* LVM logical volume name can consist of: letters numbers _ . - + * It cannot start with underscore _ and must not be equal to . or .. or any entry in /dev/ * QLineEdit accepts QValidator::Intermediate, so we just disable . at the beginning */ - QRegularExpression re(QStringLiteral(R"(^(?!_|\.)[\w\-.+]+)")); - QRegularExpressionValidator *validator = new QRegularExpressionValidator(re, this); - m_ui->lvNameLineEdit->setValidator(validator); + QRegularExpression re( QStringLiteral( R"(^(?!_|\.)[\w\-.+]+)" ) ); + QRegularExpressionValidator* validator = new QRegularExpressionValidator( re, this ); + m_ui->lvNameLineEdit->setValidator( validator ); } - standardMountPoints( *(m_ui->mountPointComboBox), partition ? PartitionInfo::mountPoint( partition ) : QString() ); + standardMountPoints( *( m_ui->mountPointComboBox ), + partition ? PartitionInfo::mountPoint( partition ) : QString() ); - if ( device->partitionTable()->type() == PartitionTable::msdos || - device->partitionTable()->type() == PartitionTable::msdos_sectorbased ) + if ( device->partitionTable()->type() == PartitionTable::msdos + || device->partitionTable()->type() == PartitionTable::msdos_sectorbased ) + { initMbrPartitionTypeUi(); + } else + { initGptPartitionTypeUi(); + } // File system; the config value is translated (best-effort) to a type FileSystem::Type defaultFSType; QString untranslatedFSName = PartUtils::findFS( - Calamares::JobQueue::instance()-> - globalStorage()-> - value( "defaultFileSystemType" ).toString(), &defaultFSType ); + Calamares::JobQueue::instance()->globalStorage()->value( "defaultFileSystemType" ).toString(), &defaultFSType ); if ( defaultFSType == FileSystem::Type::Unknown ) { defaultFSType = FileSystem::Type::Ext4; @@ -111,12 +108,13 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par QStringList fsNames; for ( auto fs : FileSystemFactory::map() ) { - if ( fs->supportCreate() != FileSystem::cmdSupportNone && - fs->type() != FileSystem::Extended ) + if ( fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended ) { fsNames << userVisibleFS( fs ); // This is put into the combobox if ( fs->type() == defaultFSType ) + { defaultFsIndex = fsCounter; + } fsCounter++; } } @@ -126,26 +124,30 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par connect( m_ui->fsComboBox, SIGNAL( activated( int ) ), SLOT( updateMountPointUi() ) ); connect( m_ui->extendedRadioButton, SIGNAL( toggled( bool ) ), SLOT( updateMountPointUi() ) ); - connect( m_ui->mountPointComboBox, &QComboBox::currentTextChanged, this, &CreatePartitionDialog::checkMountPointSelection ); + connect( m_ui->mountPointComboBox, + &QComboBox::currentTextChanged, + this, + &CreatePartitionDialog::checkMountPointSelection ); // Select a default m_ui->fsComboBox->setCurrentIndex( defaultFsIndex ); updateMountPointUi(); - setFlagList( *(m_ui->m_listFlags), static_cast< PartitionTable::Flags >( ~PartitionTable::Flags::Int(0) ), partition ? PartitionInfo::flags( partition ) : PartitionTable::Flags() ); + setFlagList( *( m_ui->m_listFlags ), + static_cast< PartitionTable::Flags >( ~PartitionTable::Flags::Int( 0 ) ), + partition ? PartitionInfo::flags( partition ) : PartitionTable::Flags() ); // Checks the initial selection. checkMountPointSelection(); } -CreatePartitionDialog::~CreatePartitionDialog() -{} +CreatePartitionDialog::~CreatePartitionDialog() {} PartitionTable::Flags CreatePartitionDialog::newFlags() const { - return flagsFromList( *(m_ui->m_listFlags) ); + return flagsFromList( *( m_ui->m_listFlags ) ); } void @@ -165,7 +167,9 @@ CreatePartitionDialog::initMbrPartitionTypeUi() } if ( fixedPartitionString.isEmpty() ) + { m_ui->fixedPartitionLabel->hide(); + } else { m_ui->fixedPartitionLabel->setText( fixedPartitionString ); @@ -188,44 +192,33 @@ CreatePartitionDialog::createPartition() { if ( m_role.roles() == PartitionRole::None ) { - m_role = PartitionRole( - m_ui->extendedRadioButton->isChecked() - ? PartitionRole::Extended - : PartitionRole::Primary - ); + m_role = PartitionRole( m_ui->extendedRadioButton->isChecked() ? PartitionRole::Extended + : PartitionRole::Primary ); } qint64 first = m_partitionSizeController->firstSector(); qint64 last = m_partitionSizeController->lastSector(); FileSystem::Type fsType = m_role.has( PartitionRole::Extended ) - ? FileSystem::Extended - : FileSystem::typeForName( m_ui->fsComboBox->currentText() ); + ? FileSystem::Extended + : FileSystem::typeForName( m_ui->fsComboBox->currentText() ); Partition* partition = nullptr; QString luksPassphrase = m_ui->encryptWidget->passphrase(); - if ( m_ui->encryptWidget->state() == EncryptWidget::Encryption::Confirmed && - !luksPassphrase.isEmpty() ) + if ( m_ui->encryptWidget->state() == EncryptWidget::Encryption::Confirmed && !luksPassphrase.isEmpty() ) { partition = KPMHelpers::createNewEncryptedPartition( - m_parent, - *m_device, - m_role, - fsType, first, last, luksPassphrase, newFlags() - ); + m_parent, *m_device, m_role, fsType, first, last, luksPassphrase, newFlags() ); } else { - partition = KPMHelpers::createNewPartition( - m_parent, - *m_device, - m_role, - fsType, first, last, newFlags() - ); + partition = KPMHelpers::createNewPartition( m_parent, *m_device, m_role, fsType, first, last, newFlags() ); } - if (m_device->type() == Device::Type::LVM_Device) { - partition->setPartitionPath(m_device->deviceNode() + QStringLiteral("/") + m_ui->lvNameLineEdit->text().trimmed()); + if ( m_device->type() == Device::Type::LVM_Device ) + { + partition->setPartitionPath( m_device->deviceNode() + QStringLiteral( "/" ) + + m_ui->lvNameLineEdit->text().trimmed() ); } PartitionInfo::setMountPoint( partition, selectedMountPoint( m_ui->mountPointComboBox ) ); @@ -244,9 +237,8 @@ CreatePartitionDialog::updateMountPointUi() FileSystem::Type type = FileSystem::typeForName( m_ui->fsComboBox->currentText() ); enabled = !s_unmountableFS.contains( type ); - if ( FileSystemFactory::map()[FileSystem::Type::Luks]->supportCreate() && - FS::luks::canEncryptType( type ) && - !m_role.has( PartitionRole::Extended ) ) + if ( FileSystemFactory::map()[ FileSystem::Type::Luks ]->supportCreate() && FS::luks::canEncryptType( type ) + && !m_role.has( PartitionRole::Extended ) ) { m_ui->encryptWidget->show(); m_ui->encryptWidget->reset(); @@ -260,7 +252,9 @@ CreatePartitionDialog::updateMountPointUi() m_ui->mountPointLabel->setEnabled( enabled ); m_ui->mountPointComboBox->setEnabled( enabled ); if ( !enabled ) + { m_ui->mountPointComboBox->setCurrentText( QString() ); + } } void @@ -282,8 +276,8 @@ void CreatePartitionDialog::initPartResizerWidget( Partition* partition ) { QColor color = CalamaresUtils::Partition::isPartitionFreeSpace( partition ) - ? ColorUtils::colorForPartitionInFreeSpace( partition ) - : ColorUtils::colorForPartition( partition ); + ? ColorUtils::colorForPartitionInFreeSpace( partition ) + : ColorUtils::colorForPartition( partition ); m_partitionSizeController->init( m_device, partition, color ); m_partitionSizeController->setPartResizerWidget( m_ui->partResizerWidget ); m_partitionSizeController->setSpinBox( m_ui->sizeSpinBox ); diff --git a/src/modules/partition/gui/CreatePartitionDialog.h b/src/modules/partition/gui/CreatePartitionDialog.h index 2f3cc14a5..dc756d352 100644 --- a/src/modules/partition/gui/CreatePartitionDialog.h +++ b/src/modules/partition/gui/CreatePartitionDialog.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CREATEPARTITIONDIALOG_H @@ -49,7 +40,11 @@ public: * For the (unlikely) case that a newly created partition is being re-edited, * pass a pointer to that @p partition, otherwise pass nullptr. */ - CreatePartitionDialog( Device* device, PartitionNode* parentPartition, Partition* partition, const QStringList& usedMountPoints, QWidget* parentWidget = nullptr ); + CreatePartitionDialog( Device* device, + PartitionNode* parentPartition, + Partition* partition, + const QStringList& usedMountPoints, + QWidget* parentWidget = nullptr ); ~CreatePartitionDialog(); /** diff --git a/src/modules/partition/gui/CreatePartitionDialog.ui b/src/modules/partition/gui/CreatePartitionDialog.ui index ac355c880..24e05e2e1 100644 --- a/src/modules/partition/gui/CreatePartitionDialog.ui +++ b/src/modules/partition/gui/CreatePartitionDialog.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + CreatePartitionDialog diff --git a/src/modules/partition/gui/CreatePartitionTableDialog.ui b/src/modules/partition/gui/CreatePartitionTableDialog.ui index ca1255e41..4f9fe5917 100644 --- a/src/modules/partition/gui/CreatePartitionTableDialog.ui +++ b/src/modules/partition/gui/CreatePartitionTableDialog.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + CreatePartitionTableDialog diff --git a/src/modules/partition/gui/CreateVolumeGroupDialog.cpp b/src/modules/partition/gui/CreateVolumeGroupDialog.cpp index a255e9902..d0eacb725 100644 --- a/src/modules/partition/gui/CreateVolumeGroupDialog.cpp +++ b/src/modules/partition/gui/CreateVolumeGroupDialog.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CreateVolumeGroupDialog.h" diff --git a/src/modules/partition/gui/CreateVolumeGroupDialog.h b/src/modules/partition/gui/CreateVolumeGroupDialog.h index 02ca6410c..4712a9106 100644 --- a/src/modules/partition/gui/CreateVolumeGroupDialog.h +++ b/src/modules/partition/gui/CreateVolumeGroupDialog.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CREATEVOLUMEGROUPDIALOG_H @@ -39,4 +30,4 @@ private: qint64& m_peSize; }; -#endif // CREATEVOLUMEGROUPDIALOG_H +#endif // CREATEVOLUMEGROUPDIALOG_H diff --git a/src/modules/partition/gui/DeviceInfoWidget.cpp b/src/modules/partition/gui/DeviceInfoWidget.cpp index ea318e85c..80eacd05b 100644 --- a/src/modules/partition/gui/DeviceInfoWidget.cpp +++ b/src/modules/partition/gui/DeviceInfoWidget.cpp @@ -1,33 +1,24 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "DeviceInfoWidget.h" +#include "GlobalStorage.h" +#include "JobQueue.h" #include "utils/CalamaresUtilsGui.h" #include "utils/Logger.h" #include "utils/Retranslator.h" -#include "JobQueue.h" -#include "GlobalStorage.h" #include -#include #include +#include DeviceInfoWidget::DeviceInfoWidget( QWidget* parent ) : QWidget( parent ) @@ -39,8 +30,8 @@ DeviceInfoWidget::DeviceInfoWidget( QWidget* parent ) setLayout( mainLayout ); CalamaresUtils::unmarginLayout( mainLayout ); - m_ptLabel->setObjectName("deviceInfoLabel"); - m_ptIcon->setObjectName("deviceInfoIcon"); + m_ptLabel->setObjectName( "deviceInfoLabel" ); + m_ptIcon->setObjectName( "deviceInfoIcon" ); mainLayout->addWidget( m_ptIcon ); mainLayout->addWidget( m_ptLabel ); @@ -49,16 +40,14 @@ DeviceInfoWidget::DeviceInfoWidget( QWidget* parent ) m_ptIcon->setMargin( 0 ); m_ptIcon->setFixedSize( iconSize ); m_ptIcon->setPixmap( - CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionTable, - CalamaresUtils::Original, - iconSize ) ); + CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionTable, CalamaresUtils::Original, iconSize ) ); QFontMetrics fm = QFontMetrics( QFont() ); m_ptLabel->setMinimumWidth( fm.boundingRect( "Amiga" ).width() + CalamaresUtils::defaultFontHeight() / 2 ); m_ptLabel->setAlignment( Qt::AlignCenter ); QPalette palette; - palette.setBrush( QPalette::Foreground, QColor( "#4D4D4D" ) ); //dark grey + palette.setBrush( QPalette::Foreground, QColor( "#4D4D4D" ) ); //dark grey m_ptIcon->setAutoFillBackground( true ); m_ptLabel->setAutoFillBackground( true ); @@ -107,7 +96,7 @@ DeviceInfoWidget::retranslateUi() QString toolTipString = tr( "This device has a %1 partition " "table." ) - .arg( typeString ); + .arg( typeString ); switch ( m_tableType ) { @@ -149,11 +138,11 @@ DeviceInfoWidget::retranslateUi() m_ptLabel->setToolTip( toolTipString ); m_ptIcon->setToolTip( tr( "The type of partition table on the " - "selected storage device.

" - "The only way to change the partition table type is to " - "erase and recreate the partition table from scratch, " - "which destroys all data on the storage device.
" - "This installer will keep the current partition table " - "unless you explicitly choose otherwise.
" - "If unsure, on modern systems GPT is preferred." ) ); + "selected storage device.

" + "The only way to change the partition table type is to " + "erase and recreate the partition table from scratch, " + "which destroys all data on the storage device.
" + "This installer will keep the current partition table " + "unless you explicitly choose otherwise.
" + "If unsure, on modern systems GPT is preferred." ) ); } diff --git a/src/modules/partition/gui/DeviceInfoWidget.h b/src/modules/partition/gui/DeviceInfoWidget.h index b1769c19d..a69251be1 100644 --- a/src/modules/partition/gui/DeviceInfoWidget.h +++ b/src/modules/partition/gui/DeviceInfoWidget.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ @@ -43,4 +34,4 @@ private: PartitionTable::TableType m_tableType; }; -#endif // DEVICEINFOWIDGET_H +#endif // DEVICEINFOWIDGET_H diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.cpp b/src/modules/partition/gui/EditExistingPartitionDialog.cpp index 37868c7ff..1e66c539c 100644 --- a/src/modules/partition/gui/EditExistingPartitionDialog.cpp +++ b/src/modules/partition/gui/EditExistingPartitionDialog.cpp @@ -1,34 +1,25 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac - * Copyright 2018, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2008-2009 Volker Lanz + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2016 Andrius Štikonas + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Flags handling originally from KDE Partition Manager, - * Copyright 2008-2009, Volker Lanz - * Copyright 2016, Andrius Štikonas + * Flags handling originally from KDE Partition Manager. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "EditExistingPartitionDialog.h" #include "ui_EditExistingPartitionDialog.h" #include "core/ColorUtils.h" +#include "core/PartUtils.h" #include "core/PartitionCoreModule.h" #include "core/PartitionInfo.h" -#include "core/PartUtils.h" #include "gui/PartitionDialogHelpers.h" #include "gui/PartitionSizeController.h" @@ -48,7 +39,10 @@ using CalamaresUtils::Partition::untranslatedFS; using CalamaresUtils::Partition::userVisibleFS; -EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, Partition* partition, const QStringList& usedMountPoints, QWidget* parentWidget ) +EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, + Partition* partition, + const QStringList& usedMountPoints, + QWidget* parentWidget ) : QDialog( parentWidget ) , m_ui( new Ui_EditExistingPartitionDialog ) , m_device( device ) @@ -57,51 +51,50 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, Partit , m_usedMountPoints( usedMountPoints ) { m_ui->setupUi( this ); - standardMountPoints( *(m_ui->mountPointComboBox), PartitionInfo::mountPoint( partition ) ); + standardMountPoints( *( m_ui->mountPointComboBox ), PartitionInfo::mountPoint( partition ) ); QColor color = ColorUtils::colorForPartition( m_partition ); m_partitionSizeController->init( m_device, m_partition, color ); m_partitionSizeController->setSpinBox( m_ui->sizeSpinBox ); - connect( m_ui->mountPointComboBox, &QComboBox::currentTextChanged, - this, &EditExistingPartitionDialog::checkMountPointSelection ); + connect( m_ui->mountPointComboBox, + &QComboBox::currentTextChanged, + this, + &EditExistingPartitionDialog::checkMountPointSelection ); replacePartResizerWidget(); - connect( m_ui->formatRadioButton, &QAbstractButton::toggled, - [ this ]( bool doFormat ) - { + connect( m_ui->formatRadioButton, &QAbstractButton::toggled, [this]( bool doFormat ) { replacePartResizerWidget(); m_ui->fileSystemLabel->setEnabled( doFormat ); m_ui->fileSystemComboBox->setEnabled( doFormat ); if ( !doFormat ) + { m_ui->fileSystemComboBox->setCurrentText( userVisibleFS( m_partition->fileSystem() ) ); + } updateMountPointPicker(); } ); - connect( m_ui->fileSystemComboBox, &QComboBox::currentTextChanged, - [ this ]( QString ) - { - updateMountPointPicker(); - } ); + connect( + m_ui->fileSystemComboBox, &QComboBox::currentTextChanged, [this]( QString ) { updateMountPointPicker(); } ); // File system QStringList fsNames; for ( auto fs : FileSystemFactory::map() ) { if ( fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended ) - fsNames << userVisibleFS( fs ); // For the combo box + { + fsNames << userVisibleFS( fs ); // For the combo box + } } m_ui->fileSystemComboBox->addItems( fsNames ); FileSystem::Type defaultFSType; QString untranslatedFSName = PartUtils::findFS( - Calamares::JobQueue::instance()-> - globalStorage()-> - value( "defaultFileSystemType" ).toString(), &defaultFSType ); + Calamares::JobQueue::instance()->globalStorage()->value( "defaultFileSystemType" ).toString(), &defaultFSType ); if ( defaultFSType == FileSystem::Type::Unknown ) { defaultFSType = FileSystem::Type::Ext4; @@ -109,39 +102,40 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, Partit QString thisFSNameForUser = userVisibleFS( m_partition->fileSystem() ); if ( fsNames.contains( thisFSNameForUser ) ) + { m_ui->fileSystemComboBox->setCurrentText( thisFSNameForUser ); + } else + { m_ui->fileSystemComboBox->setCurrentText( FileSystem::nameForType( defaultFSType ) ); + } m_ui->fileSystemLabel->setEnabled( m_ui->formatRadioButton->isChecked() ); m_ui->fileSystemComboBox->setEnabled( m_ui->formatRadioButton->isChecked() ); - setFlagList( *(m_ui->m_listFlags), m_partition->availableFlags(), PartitionInfo::flags( m_partition ) ); + setFlagList( *( m_ui->m_listFlags ), m_partition->availableFlags(), PartitionInfo::flags( m_partition ) ); } -EditExistingPartitionDialog::~EditExistingPartitionDialog() -{} +EditExistingPartitionDialog::~EditExistingPartitionDialog() {} PartitionTable::Flags EditExistingPartitionDialog::newFlags() const { - return flagsFromList( *(m_ui->m_listFlags) ); + return flagsFromList( *( m_ui->m_listFlags ) ); } void EditExistingPartitionDialog::applyChanges( PartitionCoreModule* core ) { - PartitionInfo::setMountPoint( m_partition, selectedMountPoint(m_ui->mountPointComboBox) ); + PartitionInfo::setMountPoint( m_partition, selectedMountPoint( m_ui->mountPointComboBox ) ); qint64 newFirstSector = m_partitionSizeController->firstSector(); - qint64 newLastSector = m_partitionSizeController->lastSector(); - bool partResizedMoved = newFirstSector != m_partition->firstSector() || - newLastSector != m_partition->lastSector(); + qint64 newLastSector = m_partitionSizeController->lastSector(); + bool partResizedMoved = newFirstSector != m_partition->firstSector() || newLastSector != m_partition->lastSector(); - cDebug() << "old boundaries:" << m_partition->firstSector() - << m_partition->lastSector() << m_partition->length(); + cDebug() << "old boundaries:" << m_partition->firstSector() << m_partition->lastSector() << m_partition->length(); cDebug() << "new boundaries:" << newFirstSector << newLastSector; cDebug() << "dirty status:" << m_partitionSizeController->isDirty(); @@ -149,22 +143,21 @@ EditExistingPartitionDialog::applyChanges( PartitionCoreModule* core ) if ( m_ui->formatRadioButton->isChecked() ) { fsType = m_partition->roles().has( PartitionRole::Extended ) - ? FileSystem::Extended - : FileSystem::typeForName( m_ui->fileSystemComboBox->currentText() ); + ? FileSystem::Extended + : FileSystem::typeForName( m_ui->fileSystemComboBox->currentText() ); } if ( partResizedMoved ) { if ( m_ui->formatRadioButton->isChecked() ) { - Partition* newPartition = KPMHelpers::createNewPartition( - m_partition->parent(), - *m_device, - m_partition->roles(), - fsType, - newFirstSector, - newLastSector, - newFlags() ); + Partition* newPartition = KPMHelpers::createNewPartition( m_partition->parent(), + *m_device, + m_partition->roles(), + fsType, + newFirstSector, + newLastSector, + newFlags() ); PartitionInfo::setMountPoint( newPartition, PartitionInfo::mountPoint( m_partition ) ); PartitionInfo::setFormat( newPartition, true ); @@ -174,12 +167,11 @@ EditExistingPartitionDialog::applyChanges( PartitionCoreModule* core ) } else { - core->resizePartition( m_device, - m_partition, - newFirstSector, - newLastSector ); + core->resizePartition( m_device, m_partition, newFirstSector, newLastSector ); if ( m_partition->activeFlags() != newFlags() ) + { core->setPartitionFlags( m_device, m_partition, newFlags() ); + } } } else @@ -192,18 +184,19 @@ EditExistingPartitionDialog::applyChanges( PartitionCoreModule* core ) { core->formatPartition( m_device, m_partition ); if ( m_partition->activeFlags() != newFlags() ) + { core->setPartitionFlags( m_device, m_partition, newFlags() ); + } } - else // otherwise, we delete and recreate the partition with new fs type + else // otherwise, we delete and recreate the partition with new fs type { - Partition* newPartition = KPMHelpers::createNewPartition( - m_partition->parent(), - *m_device, - m_partition->roles(), - fsType, - m_partition->firstSector(), - m_partition->lastSector(), - newFlags() ); + Partition* newPartition = KPMHelpers::createNewPartition( m_partition->parent(), + *m_device, + m_partition->roles(), + fsType, + m_partition->firstSector(), + m_partition->lastSector(), + newFlags() ); PartitionInfo::setMountPoint( newPartition, PartitionInfo::mountPoint( m_partition ) ); PartitionInfo::setFormat( newPartition, true ); @@ -216,7 +209,9 @@ EditExistingPartitionDialog::applyChanges( PartitionCoreModule* core ) { core->refreshPartition( m_device, m_partition ); if ( m_partition->activeFlags() != newFlags() ) + { core->setPartitionFlags( m_device, m_partition, newFlags() ); + } } } } @@ -255,11 +250,8 @@ EditExistingPartitionDialog::updateMountPointPicker() fsType = m_partition->fileSystem().type(); } bool canMount = true; - if ( fsType == FileSystem::Extended || - fsType == FileSystem::LinuxSwap || - fsType == FileSystem::Unformatted || - fsType == FileSystem::Unknown || - fsType == FileSystem::Lvm2_PV ) + if ( fsType == FileSystem::Extended || fsType == FileSystem::LinuxSwap || fsType == FileSystem::Unformatted + || fsType == FileSystem::Unknown || fsType == FileSystem::Lvm2_PV ) { canMount = false; } @@ -267,7 +259,9 @@ EditExistingPartitionDialog::updateMountPointPicker() m_ui->mountPointLabel->setEnabled( canMount ); m_ui->mountPointComboBox->setEnabled( canMount ); if ( !canMount ) + { setSelectedMountPoint( m_ui->mountPointComboBox, QString() ); + } } void diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.h b/src/modules/partition/gui/EditExistingPartitionDialog.h index e98563bc0..96cc2c4c4 100644 --- a/src/modules/partition/gui/EditExistingPartitionDialog.h +++ b/src/modules/partition/gui/EditExistingPartitionDialog.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef EDITEXISTINGPARTITIONDIALOG_H @@ -41,7 +32,10 @@ class EditExistingPartitionDialog : public QDialog { Q_OBJECT public: - EditExistingPartitionDialog( Device* device, Partition* partition, const QStringList& usedMountPoints, QWidget* parentWidget = nullptr ); + EditExistingPartitionDialog( Device* device, + Partition* partition, + const QStringList& usedMountPoints, + QWidget* parentWidget = nullptr ); ~EditExistingPartitionDialog(); void applyChanges( PartitionCoreModule* module ); diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.ui b/src/modules/partition/gui/EditExistingPartitionDialog.ui index c242e3bbc..9c0c996f6 100644 --- a/src/modules/partition/gui/EditExistingPartitionDialog.ui +++ b/src/modules/partition/gui/EditExistingPartitionDialog.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + EditExistingPartitionDialog diff --git a/src/modules/partition/gui/EncryptWidget.cpp b/src/modules/partition/gui/EncryptWidget.cpp index 5e44c15fd..3ac56575b 100644 --- a/src/modules/partition/gui/EncryptWidget.cpp +++ b/src/modules/partition/gui/EncryptWidget.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ diff --git a/src/modules/partition/gui/EncryptWidget.h b/src/modules/partition/gui/EncryptWidget.h index 79beb1fa7..5c24d68e6 100644 --- a/src/modules/partition/gui/EncryptWidget.h +++ b/src/modules/partition/gui/EncryptWidget.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ @@ -25,7 +16,7 @@ namespace Ui { - class EncryptWidget; +class EncryptWidget; } class EncryptWidget : public QWidget diff --git a/src/modules/partition/gui/EncryptWidget.ui b/src/modules/partition/gui/EncryptWidget.ui index 65af6999e..212300291 100644 --- a/src/modules/partition/gui/EncryptWidget.ui +++ b/src/modules/partition/gui/EncryptWidget.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + EncryptWidget diff --git a/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.cpp b/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.cpp index cd480aa55..1e8a9e573 100644 --- a/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.cpp +++ b/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ListPhysicalVolumeWidgetItem.h" @@ -21,11 +12,12 @@ #include ListPhysicalVolumeWidgetItem::ListPhysicalVolumeWidgetItem( const Partition* partition, bool checked ) - : QListWidgetItem(QString("%1 | %2").arg( partition->deviceNode(), Capacity::formatByteSize( partition->capacity() ))) - , m_partition(partition) + : QListWidgetItem( + QString( "%1 | %2" ).arg( partition->deviceNode(), Capacity::formatByteSize( partition->capacity() ) ) ) + , m_partition( partition ) { setToolTip( partition->deviceNode() ); - setSizeHint( QSize(0, 32) ); + setSizeHint( QSize( 0, 32 ) ); setCheckState( checked ? Qt::Checked : Qt::Unchecked ); } diff --git a/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.h b/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.h index 44ba8c3bf..6e0b1c85a 100644 --- a/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.h +++ b/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef LISTPHYSICALVOLUMEWIDGETITEM_H @@ -34,4 +25,4 @@ private: const Partition* m_partition; }; -#endif // LISTPHYSICALVOLUMEWIDGETITEM_H +#endif // LISTPHYSICALVOLUMEWIDGETITEM_H diff --git a/src/modules/partition/gui/PartitionBarsView.cpp b/src/modules/partition/gui/PartitionBarsView.cpp index b7c21473c..81f518acc 100644 --- a/src/modules/partition/gui/PartitionBarsView.cpp +++ b/src/modules/partition/gui/PartitionBarsView.cpp @@ -1,25 +1,16 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "gui/PartitionBarsView.h" -#include "core/PartitionModel.h" #include "core/ColorUtils.h" +#include "core/PartitionModel.h" #include "utils/CalamaresUtilsGui.h" #include "utils/Logger.h" @@ -32,8 +23,9 @@ #include -static const int VIEW_HEIGHT = qMax( CalamaresUtils::defaultFontHeight() + 8, // wins out with big fonts - int( CalamaresUtils::defaultFontHeight() * 0.6 ) + 22 ); // wins out with small fonts +static const int VIEW_HEIGHT + = qMax( CalamaresUtils::defaultFontHeight() + 8, // wins out with big fonts + int( CalamaresUtils::defaultFontHeight() * 0.6 ) + 22 ); // wins out with small fonts static constexpr int CORNER_RADIUS = 3; static const int EXTENDED_PARTITION_MARGIN = qMax( 4, VIEW_HEIGHT / 6 ); @@ -45,8 +37,8 @@ static const int EXTENDED_PARTITION_MARGIN = qMax( 4, VIEW_HEIGHT / 6 ); // and the extended partition box (the "- 2" part). // At worst, on low DPI systems, this will mean in order: // 1px outer rect, 1 px gap, 1px selection rect, 1px gap, 1px extended partition rect. -static const int SELECTION_MARGIN = qMin( ( EXTENDED_PARTITION_MARGIN - 2 ) / 2, - ( EXTENDED_PARTITION_MARGIN - 2 ) - 2 ); +static const int SELECTION_MARGIN + = qMin( ( EXTENDED_PARTITION_MARGIN - 2 ) / 2, ( EXTENDED_PARTITION_MARGIN - 2 ) - 2 ); PartitionBarsView::PartitionBarsView( QWidget* parent ) @@ -55,25 +47,21 @@ PartitionBarsView::PartitionBarsView( QWidget* parent ) , canBeSelected( []( const QModelIndex& ) { return true; } ) , m_hoveredIndex( QModelIndex() ) { - this->setObjectName("partitionBarView"); + this->setObjectName( "partitionBarView" ); setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); setFrameStyle( QFrame::NoFrame ); setSelectionBehavior( QAbstractItemView::SelectRows ); setSelectionMode( QAbstractItemView::SingleSelection ); // Debug - connect( this, &PartitionBarsView::clicked, - this, [=]( const QModelIndex& index ) - { + connect( this, &PartitionBarsView::clicked, this, [=]( const QModelIndex& index ) { cDebug() << "Clicked row" << index.row(); } ); setMouseTracking( true ); } -PartitionBarsView::~PartitionBarsView() -{ -} +PartitionBarsView::~PartitionBarsView() {} void @@ -117,12 +105,9 @@ PartitionBarsView::paintEvent( QPaintEvent* event ) void PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, int width, const QModelIndex& index ) { - QColor color = index.isValid() ? - index.data( Qt::DecorationRole ).value< QColor >() : - ColorUtils::unknownDisklabelColor(); - bool isFreeSpace = index.isValid() ? - index.data( PartitionModel::IsFreeSpaceRole ).toBool() : - true; + QColor color + = index.isValid() ? index.data( Qt::DecorationRole ).value< QColor >() : ColorUtils::unknownDisklabelColor(); + bool isFreeSpace = index.isValid() ? index.data( PartitionModel::IsFreeSpaceRole ).toBool() : true; QRect rect = rect_; const int y = rect.y(); @@ -134,14 +119,17 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in rect.adjust( 0, 0, -1, -1 ); - if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection - m_hoveredIndex.isValid() && - index == m_hoveredIndex ) + if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection + m_hoveredIndex.isValid() && index == m_hoveredIndex ) { if ( canBeSelected( index ) ) + { painter->setBrush( color.lighter( 115 ) ); + } else + { painter->setBrush( color ); + } } else { @@ -156,7 +144,9 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in // Draw shade if ( !isFreeSpace ) + { rect.adjust( 2, 2, -2, -2 ); + } QLinearGradient gradient( 0, 0, 0, height / 2 ); @@ -169,11 +159,8 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in painter->setBrush( gradient ); painter->drawRoundedRect( rect, radius, radius ); - if ( selectionMode() != QAbstractItemView::NoSelection && - index.isValid() && - selectionModel() && - !selectionModel()->selectedIndexes().isEmpty() && - selectionModel()->selectedIndexes().first() == index ) + if ( selectionMode() != QAbstractItemView::NoSelection && index.isValid() && selectionModel() + && !selectionModel()->selectedIndexes().isEmpty() && selectionModel()->selectedIndexes().first() == index ) { painter->setPen( QPen( borderColor, 1 ) ); QColor highlightColor = QPalette().highlight().color(); @@ -183,22 +170,21 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in QRect selectionRect = rect; selectionRect.setX( x + 1 ); - selectionRect.setWidth( width - 3 ); //account for the previous rect.adjust + selectionRect.setWidth( width - 3 ); //account for the previous rect.adjust - if ( rect.x() > selectionRect.x() ) //hack for first item + if ( rect.x() > selectionRect.x() ) //hack for first item + { selectionRect.adjust( rect.x() - selectionRect.x(), 0, 0, 0 ); + } - if ( rect.right() < selectionRect.right() ) //hack for last item - selectionRect.adjust( 0, 0, - ( selectionRect.right() - rect.right() ), 0 ); + if ( rect.right() < selectionRect.right() ) //hack for last item + { + selectionRect.adjust( 0, 0, -( selectionRect.right() - rect.right() ), 0 ); + } - selectionRect.adjust( SELECTION_MARGIN, - SELECTION_MARGIN, - -SELECTION_MARGIN, - -SELECTION_MARGIN ); + selectionRect.adjust( SELECTION_MARGIN, SELECTION_MARGIN, -SELECTION_MARGIN, -SELECTION_MARGIN ); - painter->drawRoundedRect( selectionRect, - radius - 1, - radius - 1 ); + painter->drawRoundedRect( selectionRect, radius - 1, radius - 1 ); } painter->translate( -0.5, -0.5 ); @@ -210,7 +196,9 @@ PartitionBarsView::drawPartitions( QPainter* painter, const QRect& rect, const Q { PartitionModel* modl = qobject_cast< PartitionModel* >( model() ); if ( !modl ) + { return; + } const int totalWidth = rect.width(); auto pair = computeItemsVector( parent ); @@ -222,29 +210,29 @@ PartitionBarsView::drawPartitions( QPainter* painter, const QRect& rect, const Q const auto& item = items[ row ]; int width; if ( row < items.count() - 1 ) + { width = totalWidth * ( item.size / total ); + } else - // Make sure we fill the last pixel column + // Make sure we fill the last pixel column + { width = rect.right() - x + 1; + } drawSection( painter, rect, x, width, item.index ); - if ( m_nestedPartitionsMode == DrawNestedPartitions && - modl->hasChildren( item.index ) ) + if ( m_nestedPartitionsMode == DrawNestedPartitions && modl->hasChildren( item.index ) ) { - QRect subRect( - x + EXTENDED_PARTITION_MARGIN, - rect.y() + EXTENDED_PARTITION_MARGIN, - width - 2 * EXTENDED_PARTITION_MARGIN, - rect.height() - 2 * EXTENDED_PARTITION_MARGIN - ); + QRect subRect( x + EXTENDED_PARTITION_MARGIN, + rect.y() + EXTENDED_PARTITION_MARGIN, + width - 2 * EXTENDED_PARTITION_MARGIN, + rect.height() - 2 * EXTENDED_PARTITION_MARGIN ); drawPartitions( painter, subRect, item.index ); } x += width; } - if ( !items.count() && - !modl->device()->partitionTable() ) // No disklabel or unknown + if ( !items.count() && !modl->device()->partitionTable() ) // No disklabel or unknown { int width = rect.right() - rect.x() + 1; drawSection( painter, rect, rect.x(), width, QModelIndex() ); @@ -260,13 +248,13 @@ PartitionBarsView::indexAt( const QPoint& point ) const QModelIndex -PartitionBarsView::indexAt( const QPoint &point, - const QRect &rect, - const QModelIndex& parent ) const +PartitionBarsView::indexAt( const QPoint& point, const QRect& rect, const QModelIndex& parent ) const { PartitionModel* modl = qobject_cast< PartitionModel* >( model() ); if ( !modl ) + { return QModelIndex(); + } const int totalWidth = rect.width(); auto pair = computeItemsVector( parent ); @@ -278,23 +266,24 @@ PartitionBarsView::indexAt( const QPoint &point, const auto& item = items[ row ]; int width; if ( row < items.count() - 1 ) + { width = totalWidth * ( item.size / total ); + } else - // Make sure we fill the last pixel column + // Make sure we fill the last pixel column + { width = rect.right() - x + 1; + } QRect thisItemRect( x, rect.y(), width, rect.height() ); if ( thisItemRect.contains( point ) ) { - if ( m_nestedPartitionsMode == DrawNestedPartitions && - modl->hasChildren( item.index ) ) + if ( m_nestedPartitionsMode == DrawNestedPartitions && modl->hasChildren( item.index ) ) { - QRect subRect( - x + EXTENDED_PARTITION_MARGIN, - rect.y() + EXTENDED_PARTITION_MARGIN, - width - 2 * EXTENDED_PARTITION_MARGIN, - rect.height() - 2 * EXTENDED_PARTITION_MARGIN - ); + QRect subRect( x + EXTENDED_PARTITION_MARGIN, + rect.y() + EXTENDED_PARTITION_MARGIN, + width - 2 * EXTENDED_PARTITION_MARGIN, + rect.height() - 2 * EXTENDED_PARTITION_MARGIN ); if ( subRect.contains( point ) ) { @@ -302,7 +291,7 @@ PartitionBarsView::indexAt( const QPoint &point, } return item.index; } - else // contains but no children, we win + else // contains but no children, we win { return item.index; } @@ -322,13 +311,13 @@ PartitionBarsView::visualRect( const QModelIndex& index ) const QRect -PartitionBarsView::visualRect( const QModelIndex& index, - const QRect& rect, - const QModelIndex& parent ) const +PartitionBarsView::visualRect( const QModelIndex& index, const QRect& rect, const QModelIndex& parent ) const { PartitionModel* modl = qobject_cast< PartitionModel* >( model() ); if ( !modl ) + { return QRect(); + } const int totalWidth = rect.width(); auto pair = computeItemsVector( parent ); @@ -340,29 +329,34 @@ PartitionBarsView::visualRect( const QModelIndex& index, const auto& item = items[ row ]; int width; if ( row < items.count() - 1 ) + { width = totalWidth * ( item.size / total ); + } else - // Make sure we fill the last pixel column + // Make sure we fill the last pixel column + { width = rect.right() - x + 1; + } QRect thisItemRect( x, rect.y(), width, rect.height() ); if ( item.index == index ) - return thisItemRect; - - if ( m_nestedPartitionsMode == DrawNestedPartitions && - modl->hasChildren( item.index ) && - index.parent() == item.index ) { - QRect subRect( - x + EXTENDED_PARTITION_MARGIN, - rect.y() + EXTENDED_PARTITION_MARGIN, - width - 2 * EXTENDED_PARTITION_MARGIN, - rect.height() - 2 * EXTENDED_PARTITION_MARGIN - ); + return thisItemRect; + } + + if ( m_nestedPartitionsMode == DrawNestedPartitions && modl->hasChildren( item.index ) + && index.parent() == item.index ) + { + QRect subRect( x + EXTENDED_PARTITION_MARGIN, + rect.y() + EXTENDED_PARTITION_MARGIN, + width - 2 * EXTENDED_PARTITION_MARGIN, + rect.height() - 2 * EXTENDED_PARTITION_MARGIN ); QRect candidateVisualRect = visualRect( index, subRect, item.index ); if ( !candidateVisualRect.isNull() ) + { return candidateVisualRect; + } } x += width; @@ -405,23 +399,18 @@ void PartitionBarsView::setSelectionModel( QItemSelectionModel* selectionModel ) { QAbstractItemView::setSelectionModel( selectionModel ); - connect( selectionModel, &QItemSelectionModel::selectionChanged, - this, [=] - { - viewport()->repaint(); - } ); + connect( selectionModel, &QItemSelectionModel::selectionChanged, this, [=] { viewport()->repaint(); } ); } void -PartitionBarsView::setSelectionFilter( std::function< bool ( const QModelIndex& ) > canBeSelected ) +PartitionBarsView::setSelectionFilter( std::function< bool( const QModelIndex& ) > canBeSelected ) { this->canBeSelected = canBeSelected; } -QModelIndex -PartitionBarsView::moveCursor( CursorAction, Qt::KeyboardModifiers ) +QModelIndex PartitionBarsView::moveCursor( CursorAction, Qt::KeyboardModifiers ) { return QModelIndex(); } @@ -456,7 +445,9 @@ PartitionBarsView::setSelection( const QRect& rect, QItemSelectionModel::Selecti QModelIndex eventIndex = indexAt( QPoint( x2, y2 ) ); if ( canBeSelected( eventIndex ) ) + { selectionModel()->select( eventIndex, flags ); + } viewport()->repaint(); } @@ -480,9 +471,13 @@ PartitionBarsView::mouseMoveEvent( QMouseEvent* event ) if ( oldHoveredIndex != m_hoveredIndex ) { if ( m_hoveredIndex.isValid() && !canBeSelected( m_hoveredIndex ) ) + { QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor ); + } else + { QGuiApplication::restoreOverrideCursor(); + } viewport()->repaint(); } @@ -506,16 +501,20 @@ PartitionBarsView::mousePressEvent( QMouseEvent* event ) { QModelIndex candidateIndex = indexAt( event->pos() ); if ( canBeSelected( candidateIndex ) ) + { QAbstractItemView::mousePressEvent( event ); + } else + { event->accept(); + } } void PartitionBarsView::updateGeometries() { - updateGeometry(); //get a new rect() for redrawing all the labels + updateGeometry(); //get a new rect() for redrawing all the labels } @@ -529,11 +528,9 @@ PartitionBarsView::computeItemsVector( const QModelIndex& parent ) const for ( int row = 0; row < count; ++row ) { QModelIndex index = model()->index( row, 0, parent ); - if ( m_nestedPartitionsMode == NoNestedPartitions && - model()->hasChildren( index ) ) + if ( m_nestedPartitionsMode == NoNestedPartitions && model()->hasChildren( index ) ) { - QPair< QVector< PartitionBarsView::Item >, qreal > childVect = - computeItemsVector( index ); + QPair< QVector< PartitionBarsView::Item >, qreal > childVect = computeItemsVector( index ); items += childVect.first; total += childVect.second; } @@ -552,8 +549,9 @@ PartitionBarsView::computeItemsVector( const QModelIndex& parent ) const qreal adjustedTotal = total; for ( int row = 0; row < count; ++row ) { - if ( items[ row ].size < 0.01 * total ) // If this item is smaller than 1% of everything, - { // force its width to 1%. + if ( items[ row ].size < 0.01 * total ) // If this item is smaller than 1% of everything, + { + // force its width to 1%. adjustedTotal -= items[ row ].size; items[ row ].size = 0.01 * total; adjustedTotal += items[ row ].size; @@ -562,4 +560,3 @@ PartitionBarsView::computeItemsVector( const QModelIndex& parent ) const return qMakePair( items, adjustedTotal ); } - diff --git a/src/modules/partition/gui/PartitionBarsView.h b/src/modules/partition/gui/PartitionBarsView.h index 0d5051b41..4dacaaae5 100644 --- a/src/modules/partition/gui/PartitionBarsView.h +++ b/src/modules/partition/gui/PartitionBarsView.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONPREVIEW_H #define PARTITIONPREVIEW_H diff --git a/src/modules/partition/gui/PartitionDialogHelpers.cpp b/src/modules/partition/gui/PartitionDialogHelpers.cpp index 112d12cea..c5c35279d 100644 --- a/src/modules/partition/gui/PartitionDialogHelpers.cpp +++ b/src/modules/partition/gui/PartitionDialogHelpers.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac - * Copyright 2018-2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PartitionDialogHelpers.h" @@ -32,16 +23,18 @@ QStringList standardMountPoints() { - QStringList mountPoints{ "/", "/boot", "/home", "/opt", "/srv", "/usr", "/var" }; + QStringList mountPoints { "/", "/boot", "/home", "/opt", "/srv", "/usr", "/var" }; if ( PartUtils::isEfiSystem() ) + { mountPoints << Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString(); + } mountPoints.removeDuplicates(); mountPoints.sort(); return mountPoints; } void -standardMountPoints(QComboBox& combo) +standardMountPoints( QComboBox& combo ) { combo.clear(); combo.addItem( QObject::tr( "(no mount point)" ) ); @@ -49,25 +42,29 @@ standardMountPoints(QComboBox& combo) } void -standardMountPoints(QComboBox& combo, const QString& selected) +standardMountPoints( QComboBox& combo, const QString& selected ) { standardMountPoints( combo ); setSelectedMountPoint( combo, selected ); } QString -selectedMountPoint(QComboBox& combo) +selectedMountPoint( QComboBox& combo ) { if ( combo.currentIndex() == 0 ) + { return QString(); + } return combo.currentText(); } void -setSelectedMountPoint(QComboBox& combo, const QString& selected) +setSelectedMountPoint( QComboBox& combo, const QString& selected ) { if ( selected.isEmpty() ) + { combo.setCurrentIndex( 0 ); // (no mount point) + } else { for ( int i = 0; i < combo.count(); ++i ) @@ -77,7 +74,7 @@ setSelectedMountPoint(QComboBox& combo, const QString& selected) return; } combo.addItem( selected ); - combo.setCurrentIndex( combo.count() - 1); + combo.setCurrentIndex( combo.count() - 1 ); } } @@ -89,8 +86,9 @@ flagsFromList( const QListWidget& list ) for ( int i = 0; i < list.count(); i++ ) if ( list.item( i )->checkState() == Qt::Checked ) - flags |= static_cast< PartitionTable::Flag >( - list.item( i )->data( Qt::UserRole ).toInt() ); + { + flags |= static_cast< PartitionTable::Flag >( list.item( i )->data( Qt::UserRole ).toInt() ); + } return flags; } @@ -108,9 +106,7 @@ setFlagList( QListWidget& list, PartitionTable::Flags available, PartitionTable: list.addItem( item ); item->setFlags( Qt::ItemIsUserCheckable | Qt::ItemIsEnabled ); item->setData( Qt::UserRole, f ); - item->setCheckState( ( checked & f ) ? - Qt::Checked : - Qt::Unchecked ); + item->setCheckState( ( checked & f ) ? Qt::Checked : Qt::Unchecked ); } f <<= 1; diff --git a/src/modules/partition/gui/PartitionDialogHelpers.h b/src/modules/partition/gui/PartitionDialogHelpers.h index 594142993..7761004b5 100644 --- a/src/modules/partition/gui/PartitionDialogHelpers.h +++ b/src/modules/partition/gui/PartitionDialogHelpers.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITION_GUI_PARTITIONDIALOGHELPERS @@ -54,10 +45,18 @@ void standardMountPoints( QComboBox&, const QString& selected ); * to blank, to allow easy detection of no-mount-selected. */ QString selectedMountPoint( QComboBox& combo ); -static inline QString selectedMountPoint(QComboBox* combo) { return selectedMountPoint(*combo); } +static inline QString +selectedMountPoint( QComboBox* combo ) +{ + return selectedMountPoint( *combo ); +} void setSelectedMountPoint( QComboBox& combo, const QString& selected ); -static inline void setSelectedMountPoint(QComboBox* combo, const QString& selected) { setSelectedMountPoint( *combo, selected); } +static inline void +setSelectedMountPoint( QComboBox* combo, const QString& selected ) +{ + setSelectedMountPoint( *combo, selected ); +} /** * Get the flags that have been checked in the list widget. diff --git a/src/modules/partition/gui/PartitionLabelsView.cpp b/src/modules/partition/gui/PartitionLabelsView.cpp index 270710e02..7e861d994 100644 --- a/src/modules/partition/gui/PartitionLabelsView.cpp +++ b/src/modules/partition/gui/PartitionLabelsView.cpp @@ -1,26 +1,17 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PartitionLabelsView.h" -#include "core/PartitionModel.h" #include "core/ColorUtils.h" +#include "core/PartitionModel.h" #include "utils/CalamaresUtilsGui.h" #include "utils/Logger.h" @@ -39,8 +30,7 @@ using CalamaresUtils::operator""_MiB; static const int LAYOUT_MARGIN = 4; -static const int LABEL_PARTITION_SQUARE_MARGIN = - qMax( QFontMetrics( CalamaresUtils::defaultFont() ).ascent() - 2, 18 ); +static const int LABEL_PARTITION_SQUARE_MARGIN = qMax( QFontMetrics( CalamaresUtils::defaultFont() ).ascent() - 2, 18 ); static const int LABELS_MARGIN = LABEL_PARTITION_SQUARE_MARGIN; static const int CORNER_RADIUS = 2; @@ -63,14 +53,12 @@ PartitionLabelsView::PartitionLabelsView( QWidget* parent ) setFrameStyle( QFrame::NoFrame ); setSelectionBehavior( QAbstractItemView::SelectRows ); setSelectionMode( QAbstractItemView::SingleSelection ); - this->setObjectName("partitionLabel"); + this->setObjectName( "partitionLabel" ); setMouseTracking( true ); } -PartitionLabelsView::~PartitionLabelsView() -{ -} +PartitionLabelsView::~PartitionLabelsView() {} QSize @@ -80,7 +68,6 @@ PartitionLabelsView::minimumSizeHint() const } - QSize PartitionLabelsView::sizeHint() const { @@ -150,7 +137,9 @@ PartitionLabelsView::getIndexesToDraw( const QModelIndex& parent ) const QAbstractItemModel* modl = model(); if ( !modl ) + { return list; + } for ( int row = 0; row < modl->rowCount( parent ); ++row ) { @@ -160,15 +149,21 @@ PartitionLabelsView::getIndexesToDraw( const QModelIndex& parent ) const // To save vertical space, we choose to hide short instances of free space. // Arbitrary limit: 10MiB. const qint64 maxHiddenB = 10_MiB; - if ( index.data( PartitionModel::IsFreeSpaceRole ).toBool() && - index.data( PartitionModel::SizeRole ).toLongLong() < maxHiddenB ) + if ( index.data( PartitionModel::IsFreeSpaceRole ).toBool() + && index.data( PartitionModel::SizeRole ).toLongLong() < maxHiddenB ) + { continue; + } if ( !modl->hasChildren( index ) || !m_extendedPartitionHidden ) + { list.append( index ); + } if ( modl->hasChildren( index ) ) + { list.append( getIndexesToDraw( index ) ); + } } return list; } @@ -189,64 +184,74 @@ PartitionLabelsView::buildTexts( const QModelIndex& index ) const } else { - QString mountPoint = index.sibling( index.row(), - PartitionModel::MountPointColumn ) - .data().toString(); + QString mountPoint = index.sibling( index.row(), PartitionModel::MountPointColumn ).data().toString(); if ( mountPoint == "/" ) - firstLine = m_customNewRootLabel.isEmpty() ? - tr( "Root" ) : - m_customNewRootLabel; + { + firstLine = m_customNewRootLabel.isEmpty() ? tr( "Root" ) : m_customNewRootLabel; + } else if ( mountPoint == "/home" ) + { firstLine = tr( "Home" ); + } else if ( mountPoint == "/boot" ) + { firstLine = tr( "Boot" ); - else if ( mountPoint.contains( "/efi" ) && - index.data( PartitionModel::FileSystemTypeRole ).toInt() == FileSystem::Fat32 ) + } + else if ( mountPoint.contains( "/efi" ) + && index.data( PartitionModel::FileSystemTypeRole ).toInt() == FileSystem::Fat32 ) + { firstLine = tr( "EFI system" ); + } else if ( index.data( PartitionModel::FileSystemTypeRole ).toInt() == FileSystem::LinuxSwap ) + { firstLine = tr( "Swap" ); + } else if ( !mountPoint.isEmpty() ) + { firstLine = tr( "New partition for %1" ).arg( mountPoint ); + } else + { firstLine = tr( "New partition" ); + } } } else if ( index.data( PartitionModel::OsproberNameRole ).toString().isEmpty() ) { firstLine = index.data().toString(); if ( firstLine.startsWith( "/dev/" ) ) - firstLine.remove( 0, 5 ); // "/dev/" + { + firstLine.remove( 0, 5 ); // "/dev/" + } } else + { firstLine = index.data( PartitionModel::OsproberNameRole ).toString(); + } - if ( index.data( PartitionModel::IsFreeSpaceRole ).toBool() || - index.data( PartitionModel::FileSystemTypeRole ).toInt() == FileSystem::Extended ) - secondLine = index.sibling( index.row(), - PartitionModel::SizeColumn ) - .data().toString(); + if ( index.data( PartitionModel::IsFreeSpaceRole ).toBool() + || index.data( PartitionModel::FileSystemTypeRole ).toInt() == FileSystem::Extended ) + { + secondLine = index.sibling( index.row(), PartitionModel::SizeColumn ).data().toString(); + } else //: size[number] filesystem[name] secondLine = tr( "%1 %2" ) - .arg( index.sibling( index.row(), - PartitionModel::SizeColumn ) - .data().toString() ) - .arg( index.sibling( index.row(), - PartitionModel::FileSystemColumn ) - .data().toString() ); + .arg( index.sibling( index.row(), PartitionModel::SizeColumn ).data().toString() ) + .arg( index.sibling( index.row(), PartitionModel::FileSystemColumn ).data().toString() ); return { firstLine, secondLine }; } void -PartitionLabelsView::drawLabels( QPainter* painter, - const QRect& rect, - const QModelIndex& parent ) +PartitionLabelsView::drawLabels( QPainter* painter, const QRect& rect, const QModelIndex& parent ) { PartitionModel* modl = qobject_cast< PartitionModel* >( model() ); if ( !modl ) + { return; + } const QModelIndexList indexesToDraw = getIndexesToDraw( parent ); @@ -260,20 +265,19 @@ PartitionLabelsView::drawLabels( QPainter* painter, QColor labelColor = index.data( Qt::DecorationRole ).value< QColor >(); - if ( label_x + labelSize.width() > rect.width() ) //wrap to new line if overflow + if ( label_x + labelSize.width() > rect.width() ) //wrap to new line if overflow { label_x = rect.x(); label_y += labelSize.height() + labelSize.height() / 4; } // Draw hover - if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection - m_hoveredIndex.isValid() && - index == m_hoveredIndex ) + if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection + m_hoveredIndex.isValid() && index == m_hoveredIndex ) { painter->save(); QRect labelRect( QPoint( label_x, label_y ), labelSize ); - labelRect.adjust( 0, -LAYOUT_MARGIN, 0, -2*LAYOUT_MARGIN ); + labelRect.adjust( 0, -LAYOUT_MARGIN, 0, -2 * LAYOUT_MARGIN ); painter->translate( 0.5, 0.5 ); QRect hoverRect = labelRect.adjusted( 0, 0, -1, -1 ); painter->setBrush( QPalette().window().color().lighter( 102 ) ); @@ -285,19 +289,15 @@ PartitionLabelsView::drawLabels( QPainter* painter, } // Is this element the selected one? - bool sel = selectionMode() != QAbstractItemView::NoSelection && - index.isValid() && - selectionModel() && - !selectionModel()->selectedIndexes().isEmpty() && - selectionModel()->selectedIndexes().first() == index; + bool sel = selectionMode() != QAbstractItemView::NoSelection && index.isValid() && selectionModel() + && !selectionModel()->selectedIndexes().isEmpty() && selectionModel()->selectedIndexes().first() == index; drawLabel( painter, texts, labelColor, QPoint( label_x, label_y ), sel ); label_x += labelSize.width() + LABELS_MARGIN; } - if ( !modl->rowCount() && - !modl->device()->partitionTable() ) // No disklabel or unknown + if ( !modl->rowCount() && !modl->device()->partitionTable() ) // No disklabel or unknown { QStringList texts = buildUnknownDisklabelTexts( modl->device() ); QColor labelColor = ColorUtils::unknownDisklabelColor(); @@ -311,7 +311,9 @@ PartitionLabelsView::sizeForAllLabels( int maxLineWidth ) const { PartitionModel* modl = qobject_cast< PartitionModel* >( model() ); if ( !modl ) + { return QSize(); + } const QModelIndexList indexesToDraw = getIndexesToDraw( QModelIndex() ); @@ -337,15 +339,12 @@ PartitionLabelsView::sizeForAllLabels( int maxLineWidth ) const singleLabelHeight = qMax( singleLabelHeight, labelSize.height() ); } - if ( !modl->rowCount() && - !modl->device()->partitionTable() ) // Unknown or no disklabel + if ( !modl->rowCount() && !modl->device()->partitionTable() ) // Unknown or no disklabel { - singleLabelHeight = sizeForLabel( buildUnknownDisklabelTexts( modl->device() ) ) - .height(); + singleLabelHeight = sizeForLabel( buildUnknownDisklabelTexts( modl->device() ) ).height(); } - int totalHeight = numLines * singleLabelHeight + - ( numLines - 1 ) * singleLabelHeight / 4; //spacings + int totalHeight = numLines * singleLabelHeight + ( numLines - 1 ) * singleLabelHeight / 4; //spacings return QSize( maxLineWidth, totalHeight ); } @@ -363,7 +362,7 @@ PartitionLabelsView::sizeForLabel( const QStringList& text ) const vertOffset += textSize.height(); width = qMax( width, textSize.width() ); } - width += LABEL_PARTITION_SQUARE_MARGIN; //for the color square + width += LABEL_PARTITION_SQUARE_MARGIN; //for the color square return QSize( width, vertOffset ); } @@ -381,22 +380,21 @@ PartitionLabelsView::drawLabel( QPainter* painter, for ( const QString& textLine : text ) { QSize textSize = painter->fontMetrics().size( Qt::TextSingleLine, textLine ); - painter->drawText( pos.x()+LABEL_PARTITION_SQUARE_MARGIN, - pos.y() + vertOffset + textSize.height() / 2, - textLine ); + painter->drawText( + pos.x() + LABEL_PARTITION_SQUARE_MARGIN, pos.y() + vertOffset + textSize.height() / 2, textLine ); vertOffset += textSize.height(); painter->setPen( Qt::gray ); width = qMax( width, textSize.width() ); } - QRect partitionSquareRect( pos.x(), - pos.y() - 3, - LABEL_PARTITION_SQUARE_MARGIN - 5, - LABEL_PARTITION_SQUARE_MARGIN - 5 ); + QRect partitionSquareRect( + pos.x(), pos.y() - 3, LABEL_PARTITION_SQUARE_MARGIN - 5, LABEL_PARTITION_SQUARE_MARGIN - 5 ); drawPartitionSquare( painter, partitionSquareRect, color ); if ( selected ) + { drawSelectionSquare( painter, partitionSquareRect.adjusted( 2, 2, -2, -2 ), color ); + } painter->setPen( Qt::black ); } @@ -407,7 +405,9 @@ PartitionLabelsView::indexAt( const QPoint& point ) const { PartitionModel* modl = qobject_cast< PartitionModel* >( model() ); if ( !modl ) + { return QModelIndex(); + } const QModelIndexList indexesToDraw = getIndexesToDraw( QModelIndex() ); @@ -420,7 +420,7 @@ PartitionLabelsView::indexAt( const QPoint& point ) const QSize labelSize = sizeForLabel( texts ); - if ( label_x + labelSize.width() > rect.width() ) //wrap to new line if overflow + if ( label_x + labelSize.width() > rect.width() ) //wrap to new line if overflow { label_x = rect.x(); label_y += labelSize.height() + labelSize.height() / 4; @@ -428,7 +428,9 @@ PartitionLabelsView::indexAt( const QPoint& point ) const QRect labelRect( QPoint( label_x, label_y ), labelSize ); if ( labelRect.contains( point ) ) + { return index; + } label_x += labelSize.width() + LABELS_MARGIN; } @@ -442,7 +444,9 @@ PartitionLabelsView::visualRect( const QModelIndex& idx ) const { PartitionModel* modl = qobject_cast< PartitionModel* >( model() ); if ( !modl ) + { return QRect(); + } const QModelIndexList indexesToDraw = getIndexesToDraw( QModelIndex() ); @@ -455,14 +459,16 @@ PartitionLabelsView::visualRect( const QModelIndex& idx ) const QSize labelSize = sizeForLabel( texts ); - if ( label_x + labelSize.width() > rect.width() ) //wrap to new line if overflow + if ( label_x + labelSize.width() > rect.width() ) //wrap to new line if overflow { label_x = rect.x(); label_y += labelSize.height() + labelSize.height() / 4; } if ( idx.isValid() && idx == index ) + { return QRect( QPoint( label_x, label_y ), labelSize ); + } label_x += labelSize.width() + LABELS_MARGIN; } @@ -514,11 +520,7 @@ void PartitionLabelsView::setSelectionModel( QItemSelectionModel* selectionModel ) { QAbstractItemView::setSelectionModel( selectionModel ); - connect( selectionModel, &QItemSelectionModel::selectionChanged, - this, [=] - { - viewport()->repaint(); - } ); + connect( selectionModel, &QItemSelectionModel::selectionChanged, this, [=] { viewport()->repaint(); } ); } @@ -560,7 +562,9 @@ PartitionLabelsView::setSelection( const QRect& rect, QItemSelectionModel::Selec { QModelIndex eventIndex = indexAt( rect.topLeft() ); if ( m_canBeSelected( eventIndex ) ) + { selectionModel()->select( eventIndex, flags ); + } } @@ -582,9 +586,13 @@ PartitionLabelsView::mouseMoveEvent( QMouseEvent* event ) if ( oldHoveredIndex != m_hoveredIndex ) { if ( m_hoveredIndex.isValid() && !m_canBeSelected( m_hoveredIndex ) ) + { QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor ); + } else + { QGuiApplication::restoreOverrideCursor(); + } viewport()->repaint(); } @@ -610,14 +618,18 @@ PartitionLabelsView::mousePressEvent( QMouseEvent* event ) { QModelIndex candidateIndex = indexAt( event->pos() ); if ( m_canBeSelected( candidateIndex ) ) + { QAbstractItemView::mousePressEvent( event ); + } else + { event->accept(); + } } void PartitionLabelsView::updateGeometries() { - updateGeometry(); //get a new rect() for redrawing all the labels + updateGeometry(); //get a new rect() for redrawing all the labels } diff --git a/src/modules/partition/gui/PartitionLabelsView.h b/src/modules/partition/gui/PartitionLabelsView.h index e461a8dd8..ac7a272ad 100644 --- a/src/modules/partition/gui/PartitionLabelsView.h +++ b/src/modules/partition/gui/PartitionLabelsView.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONLABELSVIEW_H @@ -79,8 +70,7 @@ private: void drawLabels( QPainter* painter, const QRect& rect, const QModelIndex& parent ); QSize sizeForAllLabels( int maxLineWidth ) const; QSize sizeForLabel( const QStringList& text ) const; - void drawLabel( QPainter* painter, const QStringList& text, const QColor& color, - const QPoint& pos , bool selected ); + void drawLabel( QPainter* painter, const QStringList& text, const QColor& color, const QPoint& pos, bool selected ); QModelIndexList getIndexesToDraw( const QModelIndex& parent ) const; QStringList buildTexts( const QModelIndex& index ) const; @@ -91,4 +81,4 @@ private: QPersistentModelIndex m_hoveredIndex; }; -#endif // PARTITIONLABELSVIEW_H +#endif // PARTITIONLABELSVIEW_H diff --git a/src/modules/partition/gui/PartitionPage.cpp b/src/modules/partition/gui/PartitionPage.cpp index d2ad49c23..b9930504f 100644 --- a/src/modules/partition/gui/PartitionPage.cpp +++ b/src/modules/partition/gui/PartitionPage.cpp @@ -1,24 +1,15 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac - * Copyright 2018-2019, Adriaan de Groot - * Copyright 2018, Andrius Štikonas - * Copyright 2018, Caio Jordão Carvalho - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Andrius Štikonas + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PartitionPage.h" @@ -26,19 +17,19 @@ // Local #include "core/BootLoaderModel.h" #include "core/DeviceModel.h" +#include "core/KPMHelpers.h" +#include "core/PartUtils.h" #include "core/PartitionCoreModule.h" #include "core/PartitionInfo.h" #include "core/PartitionModel.h" -#include "core/PartUtils.h" -#include "core/KPMHelpers.h" #include "gui/CreatePartitionDialog.h" #include "gui/CreateVolumeGroupDialog.h" #include "gui/EditExistingPartitionDialog.h" #include "gui/ResizeVolumeGroupDialog.h" #include "gui/ScanningDialog.h" -#include "ui_PartitionPage.h" #include "ui_CreatePartitionTableDialog.h" +#include "ui_PartitionPage.h" #include "GlobalStorage.h" #include "JobQueue.h" @@ -58,34 +49,34 @@ #include // Qt +#include +#include #include #include #include #include -#include -#include #include PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent ) : QWidget( parent ) , m_ui( new Ui_PartitionPage ) , m_core( core ) - , m_lastSelectedBootLoaderIndex(-1) + , m_lastSelectedBootLoaderIndex( -1 ) , m_isEfi( false ) { m_isEfi = PartUtils::isEfiSystem(); m_ui->setupUi( this ); m_ui->partitionLabelsView->setVisible( - Calamares::JobQueue::instance()->globalStorage()-> - value( "alwaysShowPartitionLabels" ).toBool() ); + Calamares::JobQueue::instance()->globalStorage()->value( "alwaysShowPartitionLabels" ).toBool() ); m_ui->deviceComboBox->setModel( m_core->deviceModel() ); m_ui->bootLoaderComboBox->setModel( m_core->bootLoaderModel() ); - connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, this, &PartitionPage::restoreSelectedBootLoader ); - PartitionBarsView::NestedPartitionsMode mode = Calamares::JobQueue::instance()->globalStorage()-> - value( "drawNestedPartitions" ).toBool() ? - PartitionBarsView::DrawNestedPartitions : - PartitionBarsView::NoNestedPartitions; + connect( + m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, this, &PartitionPage::restoreSelectedBootLoader ); + PartitionBarsView::NestedPartitionsMode mode + = Calamares::JobQueue::instance()->globalStorage()->value( "drawNestedPartitions" ).toBool() + ? PartitionBarsView::DrawNestedPartitions + : PartitionBarsView::NoNestedPartitions; m_ui->partitionBarsView->setNestedPartitionsMode( mode ); updateButtons(); updateBootLoaderInstallPath(); @@ -93,23 +84,35 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent ) updateFromCurrentDevice(); connect( m_ui->deviceComboBox, &QComboBox::currentTextChanged, this, &PartitionPage::updateFromCurrentDevice ); - connect( m_ui->bootLoaderComboBox, QOverload::of(&QComboBox::activated), this, &PartitionPage::updateSelectedBootLoaderIndex ); - connect( m_ui->bootLoaderComboBox, &QComboBox::currentTextChanged, this, &PartitionPage::updateBootLoaderInstallPath ); + connect( m_ui->bootLoaderComboBox, + QOverload< int >::of( &QComboBox::activated ), + this, + &PartitionPage::updateSelectedBootLoaderIndex ); + connect( + m_ui->bootLoaderComboBox, &QComboBox::currentTextChanged, this, &PartitionPage::updateBootLoaderInstallPath ); connect( m_core, &PartitionCoreModule::isDirtyChanged, m_ui->revertButton, &QWidget::setEnabled ); - connect( m_ui->partitionTreeView, &QAbstractItemView::doubleClicked, this, &PartitionPage::onPartitionViewActivated ); + connect( + m_ui->partitionTreeView, &QAbstractItemView::doubleClicked, this, &PartitionPage::onPartitionViewActivated ); connect( m_ui->revertButton, &QAbstractButton::clicked, this, &PartitionPage::onRevertClicked ); connect( m_ui->newVolumeGroupButton, &QAbstractButton::clicked, this, &PartitionPage::onNewVolumeGroupClicked ); - connect( m_ui->resizeVolumeGroupButton, &QAbstractButton::clicked, this, &PartitionPage::onResizeVolumeGroupClicked ); - connect( m_ui->deactivateVolumeGroupButton, &QAbstractButton::clicked, this, &PartitionPage::onDeactivateVolumeGroupClicked ); - connect( m_ui->removeVolumeGroupButton, &QAbstractButton::clicked, this, &PartitionPage::onRemoveVolumeGroupClicked ); - connect( m_ui->newPartitionTableButton, &QAbstractButton::clicked, this, &PartitionPage::onNewPartitionTableClicked ); + connect( + m_ui->resizeVolumeGroupButton, &QAbstractButton::clicked, this, &PartitionPage::onResizeVolumeGroupClicked ); + connect( m_ui->deactivateVolumeGroupButton, + &QAbstractButton::clicked, + this, + &PartitionPage::onDeactivateVolumeGroupClicked ); + connect( + m_ui->removeVolumeGroupButton, &QAbstractButton::clicked, this, &PartitionPage::onRemoveVolumeGroupClicked ); + connect( + m_ui->newPartitionTableButton, &QAbstractButton::clicked, this, &PartitionPage::onNewPartitionTableClicked ); connect( m_ui->createButton, &QAbstractButton::clicked, this, &PartitionPage::onCreateClicked ); connect( m_ui->editButton, &QAbstractButton::clicked, this, &PartitionPage::onEditClicked ); connect( m_ui->deleteButton, &QAbstractButton::clicked, this, &PartitionPage::onDeleteClicked ); - if ( m_isEfi ) { + if ( m_isEfi ) + { m_ui->bootLoaderComboBox->hide(); m_ui->label_3->hide(); } @@ -117,14 +120,13 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent ) CALAMARES_RETRANSLATE( m_ui->retranslateUi( this ); ) } -PartitionPage::~PartitionPage() -{ -} +PartitionPage::~PartitionPage() {} void PartitionPage::updateButtons() { - bool create = false, createTable = false, edit = false, del = false, currentDeviceIsVG = false, isDeactivable = false; + bool create = false, createTable = false, edit = false, del = false, currentDeviceIsVG = false, + isDeactivable = false; bool isRemovable = false, isVGdeactivated = false; QModelIndex index = m_ui->partitionTreeView->currentIndex(); @@ -157,16 +159,20 @@ PartitionPage::updateButtons() Device* device = nullptr; QModelIndex deviceIndex = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 ); if ( deviceIndex.isValid() ) + { device = m_core->deviceModel()->deviceForIndex( deviceIndex ); + } if ( !device ) + { cWarning() << "Device for updateButtons is nullptr"; + } else if ( device->type() != Device::Type::LVM_Device ) { createTable = true; #ifdef WITH_KPMCORE4API - if ( device->type() == Device::Type::SoftwareRAID_Device && - static_cast< SoftwareRAID* >(device)->status() == SoftwareRAID::Status::Inactive ) + if ( device->type() == Device::Type::SoftwareRAID_Device + && static_cast< SoftwareRAID* >( device )->status() == SoftwareRAID::Status::Inactive ) { createTable = false; create = false; @@ -177,7 +183,7 @@ PartitionPage::updateButtons() { currentDeviceIsVG = true; - LvmDevice* lvmDevice = dynamic_cast(m_core->deviceModel()->deviceForIndex( deviceIndex )); + LvmDevice* lvmDevice = dynamic_cast< LvmDevice* >( m_core->deviceModel()->deviceForIndex( deviceIndex ) ); isDeactivable = DeactivateVolumeGroupOperation::isDeactivatable( lvmDevice ); isRemovable = RemoveVolumeGroupOperation::isRemovable( lvmDevice ); @@ -185,7 +191,9 @@ PartitionPage::updateButtons() isVGdeactivated = m_core->isVGdeactivated( lvmDevice ); if ( isVGdeactivated ) + { m_ui->revertButton->setEnabled( true ); + } } } @@ -205,14 +213,18 @@ PartitionPage::onNewPartitionTableClicked() Q_ASSERT( index.isValid() ); Device* device = m_core->deviceModel()->deviceForIndex( index ); - QPointer dlg = new QDialog( this ); + QPointer< QDialog > dlg = new QDialog( this ); Ui_CreatePartitionTableDialog ui; ui.setupUi( dlg.data() ); QString areYouSure = tr( "Are you sure you want to create a new partition table on %1?" ).arg( device->name() ); if ( PartUtils::isEfiSystem() ) + { ui.gptRadioButton->setChecked( true ); + } else + { ui.mbrRadioButton->setChecked( true ); + } ui.areYouSureLabel->setText( areYouSure ); if ( dlg->exec() == QDialog::Accepted ) @@ -231,22 +243,27 @@ PartitionPage::checkCanCreate( Device* device ) { auto table = device->partitionTable(); - if ( table->type() == PartitionTable::msdos ||table->type() == PartitionTable::msdos_sectorbased ) + if ( table->type() == PartitionTable::msdos || table->type() == PartitionTable::msdos_sectorbased ) { cDebug() << "Checking MSDOS partition" << table->numPrimaries() << "primaries, max" << table->maxPrimaries(); if ( ( table->numPrimaries() >= table->maxPrimaries() ) && !table->hasExtended() ) { - QMessageBox::warning( this, tr( "Can not create new partition" ), + QMessageBox::warning( + this, + tr( "Can not create new partition" ), tr( "The partition table on %1 already has %2 primary partitions, and no more can be added. " - "Please remove one primary partition and add an extended partition, instead." ).arg( device->name() ).arg( table->numPrimaries() ) - ); + "Please remove one primary partition and add an extended partition, instead." ) + .arg( device->name() ) + .arg( table->numPrimaries() ) ); return false; } return true; } else + { return true; // GPT is fine + } } void @@ -260,13 +277,12 @@ PartitionPage::onNewVolumeGroupClicked() for ( const Partition* p : m_core->lvmPVs() ) if ( !m_core->isInVG( p ) ) + { availablePVs << p; + } - QPointer< CreateVolumeGroupDialog > dlg = new CreateVolumeGroupDialog( vgName, - selectedPVs, - availablePVs, - peSize, - this ); + QPointer< CreateVolumeGroupDialog > dlg + = new CreateVolumeGroupDialog( vgName, selectedPVs, availablePVs, peSize, this ); if ( dlg->exec() == QDialog::Accepted ) { @@ -282,7 +298,9 @@ PartitionPage::onNewVolumeGroupClicked() // Disable delete button if current partition was selected to be in VG // TODO: Should Calamares edit LVM PVs which are in VGs? if ( selectedPVs.contains( partition ) ) + { m_ui->deleteButton->setEnabled( false ); + } } QModelIndex deviceIndex = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 ); @@ -297,7 +315,7 @@ PartitionPage::onNewVolumeGroupClicked() // is needed to set the current index in deviceComboBox as the previous one int previousIndex = m_ui->deviceComboBox->findData( previousIndexDeviceData, Qt::ToolTipRole ); - m_ui->deviceComboBox->setCurrentIndex( ( previousIndex < 0 ) ? 0 : previousIndex ); + m_ui->deviceComboBox->setCurrentIndex( ( previousIndex < 0 ) ? 0 : previousIndex ); updateFromCurrentDevice(); } @@ -317,15 +335,16 @@ PartitionPage::onResizeVolumeGroupClicked() for ( const Partition* p : m_core->lvmPVs() ) if ( !m_core->isInVG( p ) ) + { availablePVs << p; + } - QPointer< ResizeVolumeGroupDialog > dlg = new ResizeVolumeGroupDialog( device, - availablePVs, - selectedPVs, - this ); + QPointer< ResizeVolumeGroupDialog > dlg = new ResizeVolumeGroupDialog( device, availablePVs, selectedPVs, this ); if ( dlg->exec() == QDialog::Accepted ) + { m_core->resizeVolumeGroup( device, selectedPVs ); + } delete dlg; } @@ -368,14 +387,11 @@ PartitionPage::onCreateClicked() Q_ASSERT( partition ); if ( !checkCanCreate( model->device() ) ) + { return; + } - CreatePartitionDialog dlg( - model->device(), - partition->parent(), - nullptr, - getCurrentUsedMountpoints(), - this ); + CreatePartitionDialog dlg( model->device(), partition->parent(), nullptr, getCurrentUsedMountpoints(), this ); dlg.initFromFreeSpace( partition ); if ( dlg.exec() == QDialog::Accepted ) { @@ -395,10 +411,13 @@ PartitionPage::onEditClicked() Q_ASSERT( partition ); if ( CalamaresUtils::Partition::isPartitionNew( partition ) ) + { updatePartitionToCreate( model->device(), partition ); + } else + { editExistingPartition( model->device(), partition ); - + } } void @@ -419,18 +438,18 @@ void PartitionPage::onRevertClicked() { ScanningDialog::run( - QtConcurrent::run( [ this ] - { + QtConcurrent::run( [this] { QMutexLocker locker( &m_revertMutex ); int oldIndex = m_ui->deviceComboBox->currentIndex(); m_core->revertAllDevices(); - m_ui->deviceComboBox->setCurrentIndex( ( oldIndex < 0 ) ? 0 : oldIndex ); + m_ui->deviceComboBox->setCurrentIndex( ( oldIndex < 0 ) ? 0 : oldIndex ); updateFromCurrentDevice(); } ), - [ this ]{ + [this] { m_lastSelectedBootLoaderIndex = -1; - if( m_ui->bootLoaderComboBox->currentIndex() < 0 ) { + if ( m_ui->bootLoaderComboBox->currentIndex() < 0 ) + { m_ui->bootLoaderComboBox->setCurrentIndex( 0 ); } }, @@ -442,7 +461,9 @@ PartitionPage::onPartitionViewActivated() { QModelIndex index = m_ui->partitionTreeView->currentIndex(); if ( !index.isValid() ) + { return; + } const PartitionModel* model = static_cast< const PartitionModel* >( index.model() ); Q_ASSERT( model ); @@ -455,9 +476,13 @@ PartitionPage::onPartitionViewActivated() // action from multiple UI elements in this page, so it does not feel worth // the price. if ( CalamaresUtils::Partition::isPartitionFreeSpace( partition ) ) + { m_ui->createButton->click(); + } else + { m_ui->editButton->click(); + } } void @@ -466,11 +491,8 @@ PartitionPage::updatePartitionToCreate( Device* device, Partition* partition ) QStringList mountPoints = getCurrentUsedMountpoints(); mountPoints.removeOne( PartitionInfo::mountPoint( partition ) ); - QPointer< CreatePartitionDialog > dlg = new CreatePartitionDialog( device, - partition->parent(), - partition, - mountPoints, - this ); + QPointer< CreatePartitionDialog > dlg + = new CreatePartitionDialog( device, partition->parent(), partition, mountPoints, this ); dlg->initFromPartitionToCreate( partition ); if ( dlg->exec() == QDialog::Accepted ) { @@ -487,9 +509,12 @@ PartitionPage::editExistingPartition( Device* device, Partition* partition ) QStringList mountPoints = getCurrentUsedMountpoints(); mountPoints.removeOne( PartitionInfo::mountPoint( partition ) ); - QPointer dlg = new EditExistingPartitionDialog( device, partition, mountPoints, this ); + QPointer< EditExistingPartitionDialog > dlg + = new EditExistingPartitionDialog( device, partition, mountPoints, this ); if ( dlg->exec() == QDialog::Accepted ) + { dlg->applyChanges( m_core ); + } delete dlg; } @@ -497,11 +522,15 @@ void PartitionPage::updateBootLoaderInstallPath() { if ( m_isEfi || !m_ui->bootLoaderComboBox->isVisible() ) + { return; + } QVariant var = m_ui->bootLoaderComboBox->currentData( BootLoaderModel::BootLoaderPathRole ); if ( !var.isValid() ) + { return; + } cDebug() << "PartitionPage::updateBootLoaderInstallPath" << var.toString(); m_core->setBootLoaderInstallPath( var.toString() ); } @@ -516,7 +545,7 @@ PartitionPage::updateSelectedBootLoaderIndex() void PartitionPage::restoreSelectedBootLoader() { - Calamares::restoreSelectedBootLoader( *(m_ui->bootLoaderComboBox), m_core->bootLoaderInstallPath() ); + Calamares::restoreSelectedBootLoader( *( m_ui->bootLoaderComboBox ), m_core->bootLoaderInstallPath() ); } @@ -525,13 +554,17 @@ PartitionPage::updateFromCurrentDevice() { QModelIndex index = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 ); if ( !index.isValid() ) + { return; + } Device* device = m_core->deviceModel()->deviceForIndex( index ); QAbstractItemModel* oldModel = m_ui->partitionTreeView->model(); if ( oldModel ) + { disconnect( oldModel, nullptr, this, nullptr ); + } PartitionModel* model = m_core->partitionModelForDevice( device ); m_ui->partitionBarsView->setModel( model ); @@ -540,10 +573,8 @@ PartitionPage::updateFromCurrentDevice() m_ui->partitionTreeView->expandAll(); // Make all views use the same selection model. - if ( m_ui->partitionBarsView->selectionModel() != - m_ui->partitionTreeView->selectionModel() || - m_ui->partitionBarsView->selectionModel() != - m_ui->partitionLabelsView->selectionModel() ) + if ( m_ui->partitionBarsView->selectionModel() != m_ui->partitionTreeView->selectionModel() + || m_ui->partitionBarsView->selectionModel() != m_ui->partitionLabelsView->selectionModel() ) { // Tree view QItemSelectionModel* selectionModel = m_ui->partitionTreeView->selectionModel(); @@ -559,14 +590,17 @@ PartitionPage::updateFromCurrentDevice() // This is necessary because even with the same selection model it might happen that // a !=0 column is selected in the tree view, which for some reason doesn't trigger a // timely repaint in the bars view. - connect( m_ui->partitionBarsView->selectionModel(), &QItemSelectionModel::currentChanged, - this, [=] - { - QModelIndex selectedIndex = m_ui->partitionBarsView->selectionModel()->currentIndex(); - selectedIndex = selectedIndex.sibling( selectedIndex.row(), 0 ); - m_ui->partitionBarsView->setCurrentIndex( selectedIndex ); - m_ui->partitionLabelsView->setCurrentIndex( selectedIndex ); - }, Qt::UniqueConnection ); + connect( + m_ui->partitionBarsView->selectionModel(), + &QItemSelectionModel::currentChanged, + this, + [=] { + QModelIndex selectedIndex = m_ui->partitionBarsView->selectionModel()->currentIndex(); + selectedIndex = selectedIndex.sibling( selectedIndex.row(), 0 ); + m_ui->partitionBarsView->setCurrentIndex( selectedIndex ); + m_ui->partitionLabelsView->setCurrentIndex( selectedIndex ); + }, + Qt::UniqueConnection ); // Must be done here because we need to have a model set to define // individual column resize mode @@ -577,11 +611,9 @@ PartitionPage::updateFromCurrentDevice() updateButtons(); // Establish connection here because selection model is destroyed when // model changes - connect( m_ui->partitionTreeView->selectionModel(), &QItemSelectionModel::currentChanged, - [ this ]( const QModelIndex&, const QModelIndex& ) - { - updateButtons(); - } ); + connect( m_ui->partitionTreeView->selectionModel(), + &QItemSelectionModel::currentChanged, + [this]( const QModelIndex&, const QModelIndex& ) { updateButtons(); } ); connect( model, &QAbstractItemModel::modelReset, this, &PartitionPage::onPartitionModelReset ); } @@ -597,7 +629,8 @@ void PartitionPage::updateBootLoaderIndex() { // set bootloader back to user selected index - if ( m_lastSelectedBootLoaderIndex >= 0 && m_ui->bootLoaderComboBox->count() ) { + if ( m_lastSelectedBootLoaderIndex >= 0 && m_ui->bootLoaderComboBox->count() ) + { m_ui->bootLoaderComboBox->setCurrentIndex( m_lastSelectedBootLoaderIndex ); } } @@ -605,10 +638,11 @@ PartitionPage::updateBootLoaderIndex() QStringList PartitionPage::getCurrentUsedMountpoints() { - QModelIndex index = m_core->deviceModel()->index( - m_ui->deviceComboBox->currentIndex(), 0 ); + QModelIndex index = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 ); if ( !index.isValid() ) + { return QStringList(); + } Device* device = m_core->deviceModel()->deviceForIndex( index ); QStringList mountPoints; @@ -617,7 +651,9 @@ PartitionPage::getCurrentUsedMountpoints() { const QString& mountPoint = PartitionInfo::mountPoint( partition ); if ( !mountPoint.isEmpty() ) + { mountPoints << mountPoint; + } } return mountPoints; @@ -630,7 +666,7 @@ PartitionPage::selectedDeviceIndex() } void -PartitionPage::selectDeviceByIndex ( int index ) +PartitionPage::selectDeviceByIndex( int index ) { - m_ui->deviceComboBox->setCurrentIndex( index ); + m_ui->deviceComboBox->setCurrentIndex( index ); } diff --git a/src/modules/partition/gui/PartitionPage.h b/src/modules/partition/gui/PartitionPage.h index e8a96a4cf..26c7dbccf 100644 --- a/src/modules/partition/gui/PartitionPage.h +++ b/src/modules/partition/gui/PartitionPage.h @@ -1,29 +1,20 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2018-2019, Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONPAGE_H #define PARTITIONPAGE_H -#include -#include #include +#include +#include class PartitionCoreModule; class Ui_PartitionPage; @@ -90,8 +81,8 @@ private: QStringList getCurrentUsedMountpoints(); QMutex m_revertMutex; - int m_lastSelectedBootLoaderIndex; - bool m_isEfi; + int m_lastSelectedBootLoaderIndex; + bool m_isEfi; }; -#endif // PARTITIONPAGE_H +#endif // PARTITIONPAGE_H diff --git a/src/modules/partition/gui/PartitionPage.ui b/src/modules/partition/gui/PartitionPage.ui index c028eb513..556c2289d 100644 --- a/src/modules/partition/gui/PartitionPage.ui +++ b/src/modules/partition/gui/PartitionPage.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + PartitionPage diff --git a/src/modules/partition/gui/PartitionSizeController.cpp b/src/modules/partition/gui/PartitionSizeController.cpp index 39879dab9..b7757c32d 100644 --- a/src/modules/partition/gui/PartitionSizeController.cpp +++ b/src/modules/partition/gui/PartitionSizeController.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "gui/PartitionSizeController.h" @@ -36,7 +27,8 @@ PartitionSizeController::PartitionSizeController( QObject* parent ) : QObject( parent ) -{} +{ +} void PartitionSizeController::init( Device* device, Partition* partition, const QColor& color ) @@ -58,7 +50,9 @@ PartitionSizeController::setPartResizerWidget( PartResizerWidget* widget, bool f Q_ASSERT( m_device ); if ( m_partResizerWidget ) + { disconnect( m_partResizerWidget, nullptr, this, nullptr ); + } m_dirty = false; m_currentSpinBoxValue = -1; @@ -108,7 +102,9 @@ void PartitionSizeController::setSpinBox( QSpinBox* spinBox ) { if ( m_spinBox ) + { disconnect( m_spinBox, nullptr, this, nullptr ); + } m_spinBox = spinBox; m_spinBox->setMaximum( std::numeric_limits< int >::max() ); connectWidgets(); @@ -118,7 +114,9 @@ void PartitionSizeController::connectWidgets() { if ( !m_spinBox || !m_partResizerWidget ) + { return; + } connect( m_spinBox, SIGNAL( editingFinished() ), SLOT( updatePartResizerWidget() ) ); connect( m_partResizerWidget, SIGNAL( firstSectorChanged( qint64 ) ), SLOT( updateSpinBox() ) ); @@ -132,9 +130,13 @@ void PartitionSizeController::updatePartResizerWidget() { if ( m_updating ) + { return; + } if ( m_spinBox->value() == m_currentSpinBoxValue ) + { return; + } m_updating = true; qint64 sectorSize = qint64( m_spinBox->value() ) * 1024 * 1024 / m_device->logicalSize(); @@ -148,8 +150,7 @@ PartitionSizeController::updatePartResizerWidget() } void -PartitionSizeController::doAlignAndUpdatePartResizerWidget( qint64 firstSector, - qint64 lastSector ) +PartitionSizeController::doAlignAndUpdatePartResizerWidget( qint64 firstSector, qint64 lastSector ) { if ( lastSector > m_partResizerWidget->maximumLastSector() ) { @@ -176,7 +177,9 @@ void PartitionSizeController::updateSpinBox() { if ( m_updating ) + { return; + } m_updating = true; doUpdateSpinBox(); m_updating = false; @@ -186,12 +189,16 @@ void PartitionSizeController::doUpdateSpinBox() { if ( !m_spinBox ) + { return; + } int mbSize = CalamaresUtils::BytesToMiB( m_partition->length() * m_device->logicalSize() ); m_spinBox->setValue( mbSize ); - if ( m_currentSpinBoxValue != -1 && //if it's not the first time we're setting it - m_currentSpinBoxValue != mbSize ) //and the operation changes the SB value + if ( m_currentSpinBoxValue != -1 && //if it's not the first time we're setting it + m_currentSpinBoxValue != mbSize ) //and the operation changes the SB value + { m_dirty = true; + } m_currentSpinBoxValue = mbSize; } diff --git a/src/modules/partition/gui/PartitionSizeController.h b/src/modules/partition/gui/PartitionSizeController.h index 7337968f5..69cf2ef21 100644 --- a/src/modules/partition/gui/PartitionSizeController.h +++ b/src/modules/partition/gui/PartitionSizeController.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONSIZECONTROLLER_H diff --git a/src/modules/partition/gui/PartitionSplitterWidget.cpp b/src/modules/partition/gui/PartitionSplitterWidget.cpp index b8a8017ab..93c77bb69 100644 --- a/src/modules/partition/gui/PartitionSplitterWidget.cpp +++ b/src/modules/partition/gui/PartitionSplitterWidget.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PartitionSplitterWidget.h" diff --git a/src/modules/partition/gui/PartitionSplitterWidget.h b/src/modules/partition/gui/PartitionSplitterWidget.h index ed4f0d112..474ea313e 100644 --- a/src/modules/partition/gui/PartitionSplitterWidget.h +++ b/src/modules/partition/gui/PartitionSplitterWidget.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONSPLITTERWIDGET_H @@ -57,10 +48,7 @@ public: void init( Device* dev, bool drawNestedPartitions ); - void setSplitPartition( const QString& path, - qint64 minSize, - qint64 maxSize, - qint64 preferredSize ); + void setSplitPartition( const QString& path, qint64 minSize, qint64 maxSize, qint64 preferredSize ); qint64 splitPartitionSize() const; qint64 newPartitionSize() const; @@ -80,20 +68,15 @@ protected: private: void setupItems( const QVector< PartitionSplitterItem >& items ); - void drawPartitions( QPainter* painter, - const QRect& rect, - const QVector< PartitionSplitterItem >& itemList ); - void drawSection( QPainter* painter, const QRect& rect_, int x, int width, - const PartitionSplitterItem& item ); - void drawResizeHandle( QPainter* painter, - const QRect& rect_, - int x ); + void drawPartitions( QPainter* painter, const QRect& rect, const QVector< PartitionSplitterItem >& itemList ); + void drawSection( QPainter* painter, const QRect& rect_, int x, int width, const PartitionSplitterItem& item ); + void drawResizeHandle( QPainter* painter, const QRect& rect_, int x ); PartitionSplitterItem _findItem( QVector< PartitionSplitterItem >& items, - std::function< bool ( PartitionSplitterItem& ) > condition ) const; + std::function< bool( PartitionSplitterItem& ) > condition ) const; int _eachItem( QVector< PartitionSplitterItem >& items, - std::function< bool ( PartitionSplitterItem& ) > operation ) const; + std::function< bool( PartitionSplitterItem& ) > operation ) const; QPair< QVector< PartitionSplitterItem >, qreal > computeItemsVector( const QVector< PartitionSplitterItem >& originalItems ) const; @@ -114,4 +97,4 @@ private: bool m_drawNestedPartitions; }; -#endif // PARTITIONSPLITTERWIDGET_H +#endif // PARTITIONSPLITTERWIDGET_H diff --git a/src/modules/partition/gui/PartitionViewSelectionFilter.h b/src/modules/partition/gui/PartitionViewSelectionFilter.h index 75572a5bb..fc2f5bcb3 100644 --- a/src/modules/partition/gui/PartitionViewSelectionFilter.h +++ b/src/modules/partition/gui/PartitionViewSelectionFilter.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONVIEWSELECTIONFILTER_H @@ -25,4 +16,4 @@ typedef std::function< bool( const QModelIndex& ) > SelectionFilter; -#endif // PARTITIONVIEWSELECTIONFILTER_H +#endif // PARTITIONVIEWSELECTIONFILTER_H diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index c05ed3177..1b70124dd 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -1,23 +1,14 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2018-2019, 2020, Adriaan de Groot - * Copyright 2019, Collabora Ltd - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018-2019 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-FileCopyrightText: 2020 Anke Boersma . */ #include "gui/PartitionViewStep.h" @@ -172,12 +163,10 @@ PartitionViewStep::createSummaryWidget() const .arg( branding->shortVersionedName() ); break; case ChoicePage::InstallChoice::Erase: - modeText - = tr( "Erase disk and install %1." ).arg( branding->shortVersionedName() ); + modeText = tr( "Erase disk and install %1." ).arg( branding->shortVersionedName() ); break; case ChoicePage::InstallChoice::Replace: - modeText - = tr( "Replace a partition with %1." ).arg( branding->shortVersionedName() ); + modeText = tr( "Replace a partition with %1." ).arg( branding->shortVersionedName() ); break; case ChoicePage::InstallChoice::NoChoice: case ChoicePage::InstallChoice::Manual: @@ -259,7 +248,8 @@ PartitionViewStep::createSummaryWidget() const previewLabels->setModel( info.partitionModelAfter ); preview->setSelectionMode( QAbstractItemView::NoSelection ); previewLabels->setSelectionMode( QAbstractItemView::NoSelection ); - previewLabels->setCustomNewRootLabel( Calamares::Branding::instance()->string( Calamares::Branding::BootloaderEntryName )); + previewLabels->setCustomNewRootLabel( + Calamares::Branding::instance()->string( Calamares::Branding::BootloaderEntryName ) ); info.partitionModelAfter->setParent( widget ); field = new QVBoxLayout; CalamaresUtils::unmarginLayout( field ); @@ -350,7 +340,7 @@ PartitionViewStep::isNextEnabled() const } void -PartitionViewStep::nextPossiblyChanged(bool) +PartitionViewStep::nextPossiblyChanged( bool ) { emit nextStatusChanged( isNextEnabled() ); } @@ -378,7 +368,8 @@ PartitionViewStep::isAtEnd() const { if ( m_widget->currentWidget() == m_choicePage ) { - if ( m_choicePage->currentChoice() == ChoicePage::InstallChoice::Erase || m_choicePage->currentChoice() == ChoicePage::InstallChoice::Replace + if ( m_choicePage->currentChoice() == ChoicePage::InstallChoice::Erase + || m_choicePage->currentChoice() == ChoicePage::InstallChoice::Replace || m_choicePage->currentChoice() == ChoicePage::InstallChoice::Alongside ) { return true; @@ -395,7 +386,8 @@ PartitionViewStep::onActivate() m_config->updateGlobalStorage(); // if we're coming back to PVS from the next VS - if ( m_widget->currentWidget() == m_choicePage && m_choicePage->currentChoice() == ChoicePage::InstallChoice::Alongside ) + if ( m_widget->currentWidget() == m_choicePage + && m_choicePage->currentChoice() == ChoicePage::InstallChoice::Alongside ) { m_choicePage->applyActionChoice( ChoicePage::InstallChoice::Alongside ); // m_choicePage->reset(); @@ -475,17 +467,17 @@ PartitionViewStep::onLeave() QString message = tr( "Option to use GPT on BIOS" ); QString description = tr( "A GPT partition table is the best option for all " - "systems. This installer supports such a setup for " - "BIOS systems too." - "

" - "To configure a GPT partition table on BIOS, " - "(if not done so already) go back " - "and set the partition table to GPT, next create a 8 MB " - "unformatted partition with the " - "bios_grub flag enabled.

" - "An unformatted 8 MB partition is necessary " - "to start %1 on a BIOS system with GPT." ) - .arg( branding->shortProductName() ); + "systems. This installer supports such a setup for " + "BIOS systems too." + "

" + "To configure a GPT partition table on BIOS, " + "(if not done so already) go back " + "and set the partition table to GPT, next create a 8 MB " + "unformatted partition with the " + "bios_grub flag enabled.

" + "An unformatted 8 MB partition is necessary " + "to start %1 on a BIOS system with GPT." ) + .arg( branding->shortProductName() ); QMessageBox::information( m_manualPartitionPage, message, description ); } diff --git a/src/modules/partition/gui/PartitionViewStep.h b/src/modules/partition/gui/PartitionViewStep.h index 1b0baf142..6ece9a2b1 100644 --- a/src/modules/partition/gui/PartitionViewStep.h +++ b/src/modules/partition/gui/PartitionViewStep.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONVIEWSTEP_H @@ -36,7 +27,8 @@ class PartitionCoreModule; class QStackedWidget; class WaitingWidget; -template class QFutureWatcher; +template < typename T > +class QFutureWatcher; /** * The starting point of the module. Instantiates PartitionCoreModule, @@ -83,14 +75,14 @@ private: Config* m_config; PartitionCoreModule* m_core; - QStackedWidget* m_widget; - ChoicePage* m_choicePage; - PartitionPage* m_manualPartitionPage; + QStackedWidget* m_widget; + ChoicePage* m_choicePage; + PartitionPage* m_manualPartitionPage; WaitingWidget* m_waitingWidget; - QFutureWatcher* m_future; + QFutureWatcher< void >* m_future; }; CALAMARES_PLUGIN_FACTORY_DECLARATION( PartitionViewStepFactory ) -#endif // PARTITIONVIEWSTEP_H +#endif // PARTITIONVIEWSTEP_H diff --git a/src/modules/partition/gui/ReplaceWidget.cpp b/src/modules/partition/gui/ReplaceWidget.cpp index 8594a3e15..7e4fb48d6 100644 --- a/src/modules/partition/gui/ReplaceWidget.cpp +++ b/src/modules/partition/gui/ReplaceWidget.cpp @@ -1,29 +1,20 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2014, Aurélien Gâteau - * Copyright 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ReplaceWidget.h" #include "ui_ReplaceWidget.h" #include "core/DeviceModel.h" -#include "core/PartitionCoreModule.h" #include "core/PartitionActions.h" +#include "core/PartitionCoreModule.h" #include "core/PartitionInfo.h" #include "Branding.h" @@ -41,9 +32,7 @@ using CalamaresUtils::Partition::untranslatedFS; using CalamaresUtils::Partition::userVisibleFS; -ReplaceWidget::ReplaceWidget( PartitionCoreModule* core, - QComboBox* devicesComboBox, - QWidget* parent ) +ReplaceWidget::ReplaceWidget( PartitionCoreModule* core, QComboBox* devicesComboBox, QWidget* parent ) : QWidget( parent ) , m_ui( new Ui_ReplaceWidget ) , m_core( core ) @@ -57,20 +46,15 @@ ReplaceWidget::ReplaceWidget( PartitionCoreModule* core, m_ui->bootStatusLabel->clear(); updateFromCurrentDevice( devicesComboBox ); - connect( devicesComboBox, &QComboBox::currentTextChanged, - this, [=]( const QString& /* text */ ) - { + connect( devicesComboBox, &QComboBox::currentTextChanged, this, [=]( const QString& /* text */ ) { updateFromCurrentDevice( devicesComboBox ); } ); - CALAMARES_RETRANSLATE( - onPartitionSelected(); - ) + CALAMARES_RETRANSLATE( onPartitionSelected(); ) } -ReplaceWidget::~ReplaceWidget() -{} +ReplaceWidget::~ReplaceWidget() {} bool @@ -101,23 +85,20 @@ ReplaceWidget::applyChanges() Device* dev = model->device(); PartitionActions::doReplacePartition( - m_core, dev, partition, - { gs->value( "defaultFileSystemType" ).toString(), QString() } ); + m_core, dev, partition, { gs->value( "defaultFileSystemType" ).toString(), QString() } ); if ( m_isEfi ) { QList< Partition* > efiSystemPartitions = m_core->efiSystemPartitions(); if ( efiSystemPartitions.count() == 1 ) { - PartitionInfo::setMountPoint( - efiSystemPartitions.first(), - gs->value( "efiSystemPartition" ).toString() ); + PartitionInfo::setMountPoint( efiSystemPartitions.first(), + gs->value( "efiSystemPartition" ).toString() ); } else if ( efiSystemPartitions.count() > 1 ) { - PartitionInfo::setMountPoint( - efiSystemPartitions.at( m_ui->bootComboBox->currentIndex() ), - gs->value( "efiSystemPartition" ).toString() ); + PartitionInfo::setMountPoint( efiSystemPartitions.at( m_ui->bootComboBox->currentIndex() ), + gs->value( "efiSystemPartition" ).toString() ); } } @@ -131,7 +112,9 @@ void ReplaceWidget::onPartitionSelected() { if ( Calamares::JobQueue::instance()->globalStorage()->value( "firmwareType" ) == "efi" ) + { m_isEfi = true; + } const auto* branding = Calamares::Branding::instance(); if ( m_ui->partitionTreeView->currentIndex() == QModelIndex() ) @@ -146,24 +129,20 @@ ReplaceWidget::onPartitionSelected() } bool ok = false; - double requiredSpaceB = Calamares::JobQueue::instance() - ->globalStorage() - ->value( "requiredStorageGiB" ) - .toDouble( &ok ) * 1024 * 1024 * 1024; + double requiredSpaceB + = Calamares::JobQueue::instance()->globalStorage()->value( "requiredStorageGiB" ).toDouble( &ok ) * 1024 * 1024 + * 1024; PartitionModel* model = qobject_cast< PartitionModel* >( m_ui->partitionTreeView->model() ); if ( model && ok ) { - const QStringList osproberLines = Calamares::JobQueue::instance() - ->globalStorage() - ->value( "osproberLines" ).toStringList(); + const QStringList osproberLines + = Calamares::JobQueue::instance()->globalStorage()->value( "osproberLines" ).toStringList(); Partition* partition = model->partitionForIndex( m_ui->partitionTreeView->currentIndex() ); - if ( !partition || - partition->state() != KPM_PARTITION_STATE(None) ) + if ( !partition || partition->state() != KPM_PARTITION_STATE( None ) ) { - updateStatus( CalamaresUtils::Fail, - tr( "The selected item does not appear to be a valid partition." ) ); + updateStatus( CalamaresUtils::Fail, tr( "The selected item does not appear to be a valid partition." ) ); setNextEnabled( false ); return; } @@ -173,7 +152,7 @@ ReplaceWidget::onPartitionSelected() updateStatus( CalamaresUtils::Fail, tr( "%1 cannot be installed on empty space. Please select an " "existing partition." ) - .arg( branding->versionedName() ) ); + .arg( branding->versionedName() ) ); setNextEnabled( false ); return; } @@ -183,7 +162,7 @@ ReplaceWidget::onPartitionSelected() updateStatus( CalamaresUtils::Fail, tr( "%1 cannot be installed on an extended partition. Please select an " "existing primary or logical partition." ) - .arg( branding->versionedName() ) ); + .arg( branding->versionedName() ) ); setNextEnabled( false ); return; } @@ -191,8 +170,7 @@ ReplaceWidget::onPartitionSelected() if ( partition->partitionPath().isEmpty() ) { updateStatus( CalamaresUtils::Fail, - tr( "%1 cannot be installed on this partition." ) - .arg( branding->versionedName() ) ); + tr( "%1 cannot be installed on this partition." ).arg( branding->versionedName() ) ); setNextEnabled( false ); return; } @@ -208,20 +186,23 @@ ReplaceWidget::onPartitionSelected() { QString osName; if ( !lineColumns.value( 1 ).simplified().isEmpty() ) + { osName = lineColumns.value( 1 ).simplified(); + } else if ( !lineColumns.value( 2 ).simplified().isEmpty() ) + { osName = lineColumns.value( 2 ).simplified(); + } if ( osName.isEmpty() ) { - prettyName = tr( "Unknown system partition (%1)" ) - .arg( fsNameForUser ); + prettyName = tr( "Unknown system partition (%1)" ).arg( fsNameForUser ); } else { - prettyName = tr ( "%1 system partition (%2)" ) - .arg( osName.replace( 0, 1, osName.at( 0 ).toUpper() ) ) - .arg( fsNameForUser ); + prettyName = tr( "%1 system partition (%2)" ) + .arg( osName.replace( 0, 1, osName.at( 0 ).toUpper() ) ) + .arg( fsNameForUser ); } break; } @@ -233,11 +214,10 @@ ReplaceWidget::onPartitionSelected() tr( "%4

" "The partition %1 is too small for %2. Please select a partition " "with capacity at least %3 GiB." ) - .arg( partition->partitionPath() ) - .arg( branding->versionedName() ) - .arg( requiredSpaceB / ( 1024. * 1024. * 1024. ), - 0, 'f', 1 ) - .arg( prettyName ) ); + .arg( partition->partitionPath() ) + .arg( branding->versionedName() ) + .arg( requiredSpaceB / ( 1024. * 1024. * 1024. ), 0, 'f', 1 ) + .arg( prettyName ) ); setNextEnabled( false ); return; } @@ -257,8 +237,8 @@ ReplaceWidget::onPartitionSelected() "An EFI system partition cannot be found anywhere " "on this system. Please go back and use manual " "partitioning to set up %1." ) - .arg( branding->shortProductName() ) - .arg( prettyName ) ); + .arg( branding->shortProductName() ) + .arg( prettyName ) ); setNextEnabled( false ); } else if ( efiSystemPartitions.count() == 1 ) @@ -267,15 +247,14 @@ ReplaceWidget::onPartitionSelected() tr( "%3

" "%1 will be installed on %2.
" "Warning: all data on partition " - "%2 will be lost.") - .arg( branding->versionedName() ) - .arg( partition->partitionPath() ) - .arg( prettyName ) ); + "%2 will be lost." ) + .arg( branding->versionedName() ) + .arg( partition->partitionPath() ) + .arg( prettyName ) ); m_ui->bootStatusLabel->show(); - m_ui->bootStatusLabel->setText( - tr( "The EFI system partition at %1 will be used for starting %2." ) - .arg( efiSystemPartitions.first()->partitionPath() ) - .arg( branding->shortProductName() ) ); + m_ui->bootStatusLabel->setText( tr( "The EFI system partition at %1 will be used for starting %2." ) + .arg( efiSystemPartitions.first()->partitionPath() ) + .arg( branding->shortProductName() ) ); setNextEnabled( true ); } else @@ -284,10 +263,10 @@ ReplaceWidget::onPartitionSelected() tr( "%3

" "%1 will be installed on %2.
" "Warning: all data on partition " - "%2 will be lost.") - .arg( branding->versionedName() ) - .arg( partition->partitionPath() ) - .arg( prettyName ) ); + "%2 will be lost." ) + .arg( branding->versionedName() ) + .arg( partition->partitionPath() ) + .arg( prettyName ) ); m_ui->bootStatusLabel->show(); m_ui->bootStatusLabel->setText( tr( "EFI system partition:" ) ); m_ui->bootComboBox->show(); @@ -295,9 +274,10 @@ ReplaceWidget::onPartitionSelected() { Partition* efiPartition = efiSystemPartitions.at( i ); m_ui->bootComboBox->addItem( efiPartition->partitionPath(), i ); - if ( efiPartition->devicePath() == partition->devicePath() && - efiPartition->number() == 1 ) + if ( efiPartition->devicePath() == partition->devicePath() && efiPartition->number() == 1 ) + { m_ui->bootComboBox->setCurrentIndex( i ); + } } setNextEnabled( true ); } @@ -308,10 +288,10 @@ ReplaceWidget::onPartitionSelected() tr( "%3

" "%1 will be installed on %2.
" "Warning: all data on partition " - "%2 will be lost.") - .arg( branding->versionedName() ) - .arg( partition->partitionPath() ) - .arg( prettyName ) ); + "%2 will be lost." ) + .arg( branding->versionedName() ) + .arg( partition->partitionPath() ) + .arg( prettyName ) ); setNextEnabled( true ); } } @@ -322,7 +302,9 @@ void ReplaceWidget::setNextEnabled( bool enabled ) { if ( enabled == m_nextEnabled ) + { return; + } m_nextEnabled = enabled; emit nextStatusChanged( enabled ); @@ -333,27 +315,29 @@ void ReplaceWidget::updateStatus( CalamaresUtils::ImageType imageType, const QString& text ) { int iconSize = CalamaresUtils::defaultFontHeight() * 6; - m_ui->selectedIconLabel->setPixmap( CalamaresUtils::defaultPixmap( imageType, - CalamaresUtils::Original, - QSize( iconSize, iconSize ) ) ); + m_ui->selectedIconLabel->setPixmap( + CalamaresUtils::defaultPixmap( imageType, CalamaresUtils::Original, QSize( iconSize, iconSize ) ) ); m_ui->selectedIconLabel->setFixedHeight( iconSize ); m_ui->selectedStatusLabel->setText( text ); } - void ReplaceWidget::updateFromCurrentDevice( QComboBox* devicesComboBox ) { QModelIndex index = m_core->deviceModel()->index( devicesComboBox->currentIndex(), 0 ); if ( !index.isValid() ) + { return; + } Device* device = m_core->deviceModel()->deviceForIndex( index ); QAbstractItemModel* oldModel = m_ui->partitionTreeView->model(); if ( oldModel ) + { disconnect( oldModel, nullptr, this, nullptr ); + } PartitionModel* model = m_core->partitionModelForDevice( device ); m_ui->partitionTreeView->setModel( model ); @@ -368,8 +352,10 @@ ReplaceWidget::updateFromCurrentDevice( QComboBox* devicesComboBox ) //updateButtons(); // Establish connection here because selection model is destroyed when // model changes - connect( m_ui->partitionTreeView->selectionModel(), &QItemSelectionModel::currentRowChanged, - this, &ReplaceWidget::onPartitionViewActivated ); + connect( m_ui->partitionTreeView->selectionModel(), + &QItemSelectionModel::currentRowChanged, + this, + &ReplaceWidget::onPartitionViewActivated ); connect( model, &QAbstractItemModel::modelReset, this, &ReplaceWidget::onPartitionModelReset ); } @@ -380,7 +366,9 @@ ReplaceWidget::onPartitionViewActivated() { QModelIndex index = m_ui->partitionTreeView->currentIndex(); if ( !index.isValid() ) + { return; + } const PartitionModel* model = static_cast< const PartitionModel* >( index.model() ); Q_ASSERT( model ); diff --git a/src/modules/partition/gui/ReplaceWidget.h b/src/modules/partition/gui/ReplaceWidget.h index c09c604b1..5277e5626 100644 --- a/src/modules/partition/gui/ReplaceWidget.h +++ b/src/modules/partition/gui/ReplaceWidget.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2014, Aurélien Gâteau - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef REPLACEWIDGET_H @@ -23,8 +14,8 @@ #include "utils/CalamaresUtilsGui.h" -#include #include +#include class Ui_ReplaceWidget; class QComboBox; @@ -35,9 +26,7 @@ class ReplaceWidget : public QWidget { Q_OBJECT public: - explicit ReplaceWidget( PartitionCoreModule* core, - QComboBox* devicesComboBox, - QWidget* parent = nullptr ); + explicit ReplaceWidget( PartitionCoreModule* core, QComboBox* devicesComboBox, QWidget* parent = nullptr ); virtual ~ReplaceWidget(); bool isNextEnabled() const; @@ -69,4 +58,4 @@ private: void onPartitionModelReset(); }; -#endif // REPLACEWIDGET_H +#endif // REPLACEWIDGET_H diff --git a/src/modules/partition/gui/ReplaceWidget.ui b/src/modules/partition/gui/ReplaceWidget.ui index 3f8f604b4..14f520f49 100644 --- a/src/modules/partition/gui/ReplaceWidget.ui +++ b/src/modules/partition/gui/ReplaceWidget.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + ReplaceWidget diff --git a/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp b/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp index 2de999360..d0103954d 100644 --- a/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp +++ b/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ResizeVolumeGroupDialog.h" @@ -29,7 +20,7 @@ #include #include -ResizeVolumeGroupDialog::ResizeVolumeGroupDialog( LvmDevice *device, +ResizeVolumeGroupDialog::ResizeVolumeGroupDialog( LvmDevice* device, const PartitionVector& availablePVs, PartitionVector& selectedPVs, QWidget* parent ) @@ -39,12 +30,17 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog( LvmDevice *device, setWindowTitle( tr( "Resize Volume Group" ) ); for ( int i = 0; i < pvList()->count(); i++ ) - pvList()->item(i)->setCheckState( Qt::Checked ); + { + pvList()->item( i )->setCheckState( Qt::Checked ); + } for ( const Partition* p : availablePVs ) + { pvList()->addItem( new ListPhysicalVolumeWidgetItem( p, false ) ); + } - peSize()->setValue( static_cast( device->peSize() / Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::MiB) ) ); + peSize()->setValue( + static_cast< int >( device->peSize() / Capacity::unitFactor( Capacity::Unit::Byte, Capacity::Unit::MiB ) ) ); vgName()->setEnabled( false ); peSize()->setEnabled( false ); diff --git a/src/modules/partition/gui/ResizeVolumeGroupDialog.h b/src/modules/partition/gui/ResizeVolumeGroupDialog.h index bc088de4d..7b8ecf6d6 100644 --- a/src/modules/partition/gui/ResizeVolumeGroupDialog.h +++ b/src/modules/partition/gui/ResizeVolumeGroupDialog.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef RESIZEVOLUMEGROUPDIALOG_H @@ -30,7 +21,7 @@ class ResizeVolumeGroupDialog : public VolumeGroupBaseDialog public: using PartitionVector = QVector< const Partition* >; - ResizeVolumeGroupDialog( LvmDevice *device, + ResizeVolumeGroupDialog( LvmDevice* device, const PartitionVector& availablePVs, PartitionVector& selectedPVs, QWidget* parent ); @@ -41,4 +32,4 @@ private: PartitionVector& m_selectedPVs; }; -#endif // RESIZEVOLUMEGROUPDIALOG_H +#endif // RESIZEVOLUMEGROUPDIALOG_H diff --git a/src/modules/partition/gui/ScanningDialog.cpp b/src/modules/partition/gui/ScanningDialog.cpp index 85479fbb3..cd22bb861 100644 --- a/src/modules/partition/gui/ScanningDialog.cpp +++ b/src/modules/partition/gui/ScanningDialog.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ScanningDialog.h" @@ -22,14 +13,12 @@ #include "3rdparty/waitingspinnerwidget.h" #include -#include #include +#include #include -ScanningDialog::ScanningDialog( const QString& text, - const QString& windowTitle, - QWidget* parent ) +ScanningDialog::ScanningDialog( const QString& text, const QString& windowTitle, QWidget* parent ) : QDialog( parent ) { setModal( true ); @@ -42,8 +31,7 @@ ScanningDialog::ScanningDialog( const QString& text, dialogLayout->addWidget( spinner ); spinner->start(); - QLabel* rescanningLabel = new QLabel( text, - this ); + QLabel* rescanningLabel = new QLabel( text, this ); dialogLayout->addWidget( rescanningLabel ); } @@ -55,16 +43,11 @@ ScanningDialog::run( const QFuture< void >& future, const std::function< void() >& callback, QWidget* parent ) { - ScanningDialog* theDialog = - new ScanningDialog( text, - windowTitle, - parent ); + ScanningDialog* theDialog = new ScanningDialog( text, windowTitle, parent ); theDialog->show(); QFutureWatcher< void >* watcher = new QFutureWatcher< void >(); - connect( watcher, &QFutureWatcher< void >::finished, - theDialog, [ watcher, theDialog, callback ] - { + connect( watcher, &QFutureWatcher< void >::finished, theDialog, [watcher, theDialog, callback] { watcher->deleteLater(); theDialog->hide(); theDialog->deleteLater(); @@ -76,18 +59,13 @@ ScanningDialog::run( const QFuture< void >& future, void -ScanningDialog::run( const QFuture< void >& future, - const std::function< void() >& callback, - QWidget* parent ) +ScanningDialog::run( const QFuture< void >& future, const std::function< void() >& callback, QWidget* parent ) { - ScanningDialog::run( future, - tr( "Scanning storage devices..." ), - tr( "Partitioning" ), - callback, - parent ); + ScanningDialog::run( future, tr( "Scanning storage devices..." ), tr( "Partitioning" ), callback, parent ); } -void ScanningDialog::setVisible(bool visible) +void +ScanningDialog::setVisible( bool visible ) { QDialog::setVisible( visible ); emit visibilityChanged(); diff --git a/src/modules/partition/gui/ScanningDialog.h b/src/modules/partition/gui/ScanningDialog.h index 4f5254590..757b94eb6 100644 --- a/src/modules/partition/gui/ScanningDialog.h +++ b/src/modules/partition/gui/ScanningDialog.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef SCANNINGDIALOG_H @@ -28,19 +19,19 @@ class ScanningDialog : public QDialog { Q_OBJECT public: - explicit ScanningDialog( const QString& text, - const QString& windowTitle, - QWidget* parent = nullptr ); + explicit ScanningDialog( const QString& text, const QString& windowTitle, QWidget* parent = nullptr ); - static void run( const QFuture< void >& future, - const QString& text, - const QString& windowTitle, - const std::function< void() >& callback = []{}, - QWidget* parent = nullptr ); + static void run( + const QFuture< void >& future, + const QString& text, + const QString& windowTitle, + const std::function< void() >& callback = [] {}, + QWidget* parent = nullptr ); - static void run( const QFuture< void >& future, - const std::function< void() >& callback = []{}, - QWidget* parent = nullptr ); + static void run( + const QFuture< void >& future, + const std::function< void() >& callback = [] {}, + QWidget* parent = nullptr ); public slots: void setVisible( bool visible ) override; @@ -49,4 +40,4 @@ signals: void visibilityChanged(); }; -#endif // SCANNINGDIALOG_H +#endif // SCANNINGDIALOG_H diff --git a/src/modules/partition/gui/VolumeGroupBaseDialog.cpp b/src/modules/partition/gui/VolumeGroupBaseDialog.cpp index 8078253b3..6277c30e5 100644 --- a/src/modules/partition/gui/VolumeGroupBaseDialog.cpp +++ b/src/modules/partition/gui/VolumeGroupBaseDialog.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "VolumeGroupBaseDialog.h" @@ -30,46 +21,42 @@ #include #include -VolumeGroupBaseDialog::VolumeGroupBaseDialog( QString& vgName, - QVector< const Partition* > pvList, - QWidget *parent ) - : QDialog(parent) - , ui(new Ui::VolumeGroupBaseDialog) - , m_vgNameValue(vgName) - , m_totalSizeValue(0) - , m_usedSizeValue(0) +VolumeGroupBaseDialog::VolumeGroupBaseDialog( QString& vgName, QVector< const Partition* > pvList, QWidget* parent ) + : QDialog( parent ) + , ui( new Ui::VolumeGroupBaseDialog ) + , m_vgNameValue( vgName ) + , m_totalSizeValue( 0 ) + , m_usedSizeValue( 0 ) { - ui->setupUi(this); + ui->setupUi( this ); for ( const Partition* p : pvList ) + { ui->pvList->addItem( new ListPhysicalVolumeWidgetItem( p, false ) ); + } - ui->vgType->addItems( QStringList() << "LVM" << "RAID" ); - ui->vgType->setCurrentIndex(0); + ui->vgType->addItems( QStringList() << "LVM" + << "RAID" ); + ui->vgType->setCurrentIndex( 0 ); - QRegularExpression re(R"(^(?!_|\.)[\w\-.+]+)"); + QRegularExpression re( R"(^(?!_|\.)[\w\-.+]+)" ); ui->vgName->setValidator( new QRegularExpressionValidator( re, this ) ); ui->vgName->setText( m_vgNameValue ); updateOkButton(); updateTotalSize(); - connect( ui->pvList, &QListWidget::itemChanged, this, - [&](QListWidgetItem*) { - updateTotalSize(); - updateOkButton(); - } ); + connect( ui->pvList, &QListWidget::itemChanged, this, [&]( QListWidgetItem* ) { + updateTotalSize(); + updateOkButton(); + } ); - connect( ui->peSize, qOverload(&QSpinBox::valueChanged), this, - [&](int) { - updateTotalSectors(); - updateOkButton(); - }); + connect( ui->peSize, qOverload< int >( &QSpinBox::valueChanged ), this, [&]( int ) { + updateTotalSectors(); + updateOkButton(); + } ); - connect( ui->vgName, &QLineEdit::textChanged, this, - [&](const QString&) { - updateOkButton(); - }); + connect( ui->vgName, &QLineEdit::textChanged, this, [&]( const QString& ) { updateOkButton(); } ); } VolumeGroupBaseDialog::~VolumeGroupBaseDialog() @@ -82,11 +69,14 @@ VolumeGroupBaseDialog::checkedItems() const { QVector< const Partition* > items; - for ( int i = 0; i < ui->pvList->count(); i++) { - ListPhysicalVolumeWidgetItem* item = dynamic_cast< ListPhysicalVolumeWidgetItem* >( ui->pvList->item(i) ); + for ( int i = 0; i < ui->pvList->count(); i++ ) + { + ListPhysicalVolumeWidgetItem* item = dynamic_cast< ListPhysicalVolumeWidgetItem* >( ui->pvList->item( i ) ); if ( item && item->checkState() == Qt::Checked ) + { items << item->partition(); + } } return items; @@ -101,10 +91,8 @@ VolumeGroupBaseDialog::isSizeValid() const void VolumeGroupBaseDialog::updateOkButton() { - okButton()->setEnabled(isSizeValid() && - !checkedItems().empty() && - !ui->vgName->text().isEmpty() && - ui->peSize->value() > 0); + okButton()->setEnabled( isSizeValid() && !checkedItems().empty() && !ui->vgName->text().isEmpty() + && ui->peSize->value() > 0 ); } void @@ -112,7 +100,7 @@ VolumeGroupBaseDialog::setUsedSizeValue( qint64 usedSize ) { m_usedSizeValue = usedSize; - ui->usedSize->setText( Capacity::formatByteSize(m_usedSizeValue) ); + ui->usedSize->setText( Capacity::formatByteSize( m_usedSizeValue ) ); } void @@ -126,10 +114,14 @@ VolumeGroupBaseDialog::updateTotalSize() { m_totalSizeValue = 0; - for ( const Partition *p : checkedItems()) - m_totalSizeValue += p->capacity() - p->capacity() % (ui->peSize->value() * Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::MiB)); + for ( const Partition* p : checkedItems() ) + { + m_totalSizeValue += p->capacity() + - p->capacity() + % ( ui->peSize->value() * Capacity::unitFactor( Capacity::Unit::Byte, Capacity::Unit::MiB ) ); + } - ui->totalSize->setText(Capacity::formatByteSize(m_totalSizeValue)); + ui->totalSize->setText( Capacity::formatByteSize( m_totalSizeValue ) ); updateTotalSectors(); } @@ -139,10 +131,12 @@ VolumeGroupBaseDialog::updateTotalSectors() { qint64 totalSectors = 0; - qint64 extentSize = ui->peSize->value() * Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::MiB); + qint64 extentSize = ui->peSize->value() * Capacity::unitFactor( Capacity::Unit::Byte, Capacity::Unit::MiB ); if ( extentSize > 0 ) + { totalSectors = m_totalSizeValue / extentSize; + } ui->totalSectors->setText( QString::number( totalSectors ) ); } diff --git a/src/modules/partition/gui/VolumeGroupBaseDialog.h b/src/modules/partition/gui/VolumeGroupBaseDialog.h index e6011ce62..253160d97 100644 --- a/src/modules/partition/gui/VolumeGroupBaseDialog.h +++ b/src/modules/partition/gui/VolumeGroupBaseDialog.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef VOLUMEGROUPBASEDIALOG_H @@ -23,7 +14,8 @@ #include -namespace Ui { +namespace Ui +{ class VolumeGroupBaseDialog; } @@ -37,9 +29,7 @@ class VolumeGroupBaseDialog : public QDialog Q_OBJECT public: - explicit VolumeGroupBaseDialog( QString& vgName, - QVector< const Partition* > pvList, - QWidget* parent = nullptr ); + explicit VolumeGroupBaseDialog( QString& vgName, QVector< const Partition* > pvList, QWidget* parent = nullptr ); ~VolumeGroupBaseDialog(); protected: @@ -78,4 +68,4 @@ private: qint64 m_usedSizeValue; }; -#endif // VOLUMEGROUPBASEDIALOG_H +#endif // VOLUMEGROUPBASEDIALOG_H diff --git a/src/modules/partition/gui/VolumeGroupBaseDialog.ui b/src/modules/partition/gui/VolumeGroupBaseDialog.ui index 0640eca00..f1bb6b251 100644 --- a/src/modules/partition/gui/VolumeGroupBaseDialog.ui +++ b/src/modules/partition/gui/VolumeGroupBaseDialog.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2018 Caio <caiojcarvalho@gmail.com> +SPDX-License-Identifier: GPL-3.0-or-later + VolumeGroupBaseDialog diff --git a/src/modules/partition/jobs/ClearMountsJob.cpp b/src/modules/partition/jobs/ClearMountsJob.cpp index 29f00ebd2..825c82ec1 100644 --- a/src/modules/partition/jobs/ClearMountsJob.cpp +++ b/src/modules/partition/jobs/ClearMountsJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot - * Copyright 2019, Kevin Kofler + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Kevin Kofler + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ClearMountsJob.h" diff --git a/src/modules/partition/jobs/ClearMountsJob.h b/src/modules/partition/jobs/ClearMountsJob.h index 2accc652d..99a7b4844 100644 --- a/src/modules/partition/jobs/ClearMountsJob.h +++ b/src/modules/partition/jobs/ClearMountsJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CLEARMOUNTSJOB_H diff --git a/src/modules/partition/jobs/ClearTempMountsJob.cpp b/src/modules/partition/jobs/ClearTempMountsJob.cpp index cf2c71f0c..2f90278fe 100644 --- a/src/modules/partition/jobs/ClearTempMountsJob.cpp +++ b/src/modules/partition/jobs/ClearTempMountsJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ClearTempMountsJob.h" diff --git a/src/modules/partition/jobs/ClearTempMountsJob.h b/src/modules/partition/jobs/ClearTempMountsJob.h index 433cfd8ad..0726975c7 100644 --- a/src/modules/partition/jobs/ClearTempMountsJob.h +++ b/src/modules/partition/jobs/ClearTempMountsJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CLEARTEMPMOUNTSJOB_H diff --git a/src/modules/partition/jobs/CreatePartitionJob.cpp b/src/modules/partition/jobs/CreatePartitionJob.cpp index fd322a94e..a4fa195ee 100644 --- a/src/modules/partition/jobs/CreatePartitionJob.cpp +++ b/src/modules/partition/jobs/CreatePartitionJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac - * Copyright 2017, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CreatePartitionJob.h" diff --git a/src/modules/partition/jobs/CreatePartitionJob.h b/src/modules/partition/jobs/CreatePartitionJob.h index f315e24fb..3d6199804 100644 --- a/src/modules/partition/jobs/CreatePartitionJob.h +++ b/src/modules/partition/jobs/CreatePartitionJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CREATEPARTITIONJOB_H diff --git a/src/modules/partition/jobs/CreatePartitionTableJob.cpp b/src/modules/partition/jobs/CreatePartitionTableJob.cpp index 79675c324..0913a1cfc 100644 --- a/src/modules/partition/jobs/CreatePartitionTableJob.cpp +++ b/src/modules/partition/jobs/CreatePartitionTableJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CreatePartitionTableJob.h" diff --git a/src/modules/partition/jobs/CreatePartitionTableJob.h b/src/modules/partition/jobs/CreatePartitionTableJob.h index e0ed6f918..ee1ba0a38 100644 --- a/src/modules/partition/jobs/CreatePartitionTableJob.h +++ b/src/modules/partition/jobs/CreatePartitionTableJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CREATEPARTITIONTABLEJOB_H diff --git a/src/modules/partition/jobs/CreateVolumeGroupJob.cpp b/src/modules/partition/jobs/CreateVolumeGroupJob.cpp index 28a08f5ad..af9997df6 100644 --- a/src/modules/partition/jobs/CreateVolumeGroupJob.cpp +++ b/src/modules/partition/jobs/CreateVolumeGroupJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CreateVolumeGroupJob.h" diff --git a/src/modules/partition/jobs/CreateVolumeGroupJob.h b/src/modules/partition/jobs/CreateVolumeGroupJob.h index 9ed5e24e2..e9682043c 100644 --- a/src/modules/partition/jobs/CreateVolumeGroupJob.h +++ b/src/modules/partition/jobs/CreateVolumeGroupJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CREATEVOLUMEGROUPJOB_H diff --git a/src/modules/partition/jobs/DeactivateVolumeGroupJob.cpp b/src/modules/partition/jobs/DeactivateVolumeGroupJob.cpp index 77df64e3d..92086015d 100644 --- a/src/modules/partition/jobs/DeactivateVolumeGroupJob.cpp +++ b/src/modules/partition/jobs/DeactivateVolumeGroupJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "DeactivateVolumeGroupJob.h" diff --git a/src/modules/partition/jobs/DeactivateVolumeGroupJob.h b/src/modules/partition/jobs/DeactivateVolumeGroupJob.h index 7b1c9c473..a6bdd4ddb 100644 --- a/src/modules/partition/jobs/DeactivateVolumeGroupJob.h +++ b/src/modules/partition/jobs/DeactivateVolumeGroupJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef DEACTIVATEVOLUMEGROUPJOB_H diff --git a/src/modules/partition/jobs/DeletePartitionJob.cpp b/src/modules/partition/jobs/DeletePartitionJob.cpp index 9b2d4f37d..913fd8cd6 100644 --- a/src/modules/partition/jobs/DeletePartitionJob.cpp +++ b/src/modules/partition/jobs/DeletePartitionJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "DeletePartitionJob.h" diff --git a/src/modules/partition/jobs/DeletePartitionJob.h b/src/modules/partition/jobs/DeletePartitionJob.h index f68a4ea8f..6d5ff1377 100644 --- a/src/modules/partition/jobs/DeletePartitionJob.h +++ b/src/modules/partition/jobs/DeletePartitionJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef DELETEPARTITIONJOB_H diff --git a/src/modules/partition/jobs/FillGlobalStorageJob.cpp b/src/modules/partition/jobs/FillGlobalStorageJob.cpp index e3f696bbc..f26b70a97 100644 --- a/src/modules/partition/jobs/FillGlobalStorageJob.cpp +++ b/src/modules/partition/jobs/FillGlobalStorageJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac - * Copyright 2017, 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 2019-2020, Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "FillGlobalStorageJob.h" diff --git a/src/modules/partition/jobs/FillGlobalStorageJob.h b/src/modules/partition/jobs/FillGlobalStorageJob.h index e3850da37..c1256de12 100644 --- a/src/modules/partition/jobs/FillGlobalStorageJob.h +++ b/src/modules/partition/jobs/FillGlobalStorageJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef FILLGLOBALSTORAGEJOB_H diff --git a/src/modules/partition/jobs/FormatPartitionJob.cpp b/src/modules/partition/jobs/FormatPartitionJob.cpp index 45e851baf..4dadacf9c 100644 --- a/src/modules/partition/jobs/FormatPartitionJob.cpp +++ b/src/modules/partition/jobs/FormatPartitionJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015-2016, Teo Mrnjavac - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "FormatPartitionJob.h" diff --git a/src/modules/partition/jobs/FormatPartitionJob.h b/src/modules/partition/jobs/FormatPartitionJob.h index 2031efc78..38b2ee1a9 100644 --- a/src/modules/partition/jobs/FormatPartitionJob.h +++ b/src/modules/partition/jobs/FormatPartitionJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef FORMATPARTITIONJOB_H diff --git a/src/modules/partition/jobs/PartitionJob.cpp b/src/modules/partition/jobs/PartitionJob.cpp index 6b8dc9034..3bdb05ebd 100644 --- a/src/modules/partition/jobs/PartitionJob.cpp +++ b/src/modules/partition/jobs/PartitionJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PartitionJob.h" diff --git a/src/modules/partition/jobs/PartitionJob.h b/src/modules/partition/jobs/PartitionJob.h index eef6aaa4c..5222cf4d3 100644 --- a/src/modules/partition/jobs/PartitionJob.h +++ b/src/modules/partition/jobs/PartitionJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONJOB_H diff --git a/src/modules/partition/jobs/RemoveVolumeGroupJob.cpp b/src/modules/partition/jobs/RemoveVolumeGroupJob.cpp index ed8353e72..a3b5b8d73 100644 --- a/src/modules/partition/jobs/RemoveVolumeGroupJob.cpp +++ b/src/modules/partition/jobs/RemoveVolumeGroupJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "RemoveVolumeGroupJob.h" diff --git a/src/modules/partition/jobs/RemoveVolumeGroupJob.h b/src/modules/partition/jobs/RemoveVolumeGroupJob.h index 0a52a837e..03f52135b 100644 --- a/src/modules/partition/jobs/RemoveVolumeGroupJob.h +++ b/src/modules/partition/jobs/RemoveVolumeGroupJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef REMOVEVOLUMEGROUPJOB_H diff --git a/src/modules/partition/jobs/ResizePartitionJob.cpp b/src/modules/partition/jobs/ResizePartitionJob.cpp index 9ebd4ce7e..87b87c1c0 100644 --- a/src/modules/partition/jobs/ResizePartitionJob.cpp +++ b/src/modules/partition/jobs/ResizePartitionJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac - * Copyright 2017, Andrius Štikonas + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Andrius Štikonas + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ResizePartitionJob.h" diff --git a/src/modules/partition/jobs/ResizePartitionJob.h b/src/modules/partition/jobs/ResizePartitionJob.h index f8413f214..9e24b2d04 100644 --- a/src/modules/partition/jobs/ResizePartitionJob.h +++ b/src/modules/partition/jobs/ResizePartitionJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef RESIZEPARTITIONJOB_H diff --git a/src/modules/partition/jobs/ResizeVolumeGroupJob.cpp b/src/modules/partition/jobs/ResizeVolumeGroupJob.cpp index b44fd017b..0c017877e 100644 --- a/src/modules/partition/jobs/ResizeVolumeGroupJob.cpp +++ b/src/modules/partition/jobs/ResizeVolumeGroupJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ResizeVolumeGroupJob.h" diff --git a/src/modules/partition/jobs/ResizeVolumeGroupJob.h b/src/modules/partition/jobs/ResizeVolumeGroupJob.h index 808c39d32..9e3f038c2 100644 --- a/src/modules/partition/jobs/ResizeVolumeGroupJob.h +++ b/src/modules/partition/jobs/ResizeVolumeGroupJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Caio Jordão Carvalho + * SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef RESIZEVOLUMEGROUPJOB_H diff --git a/src/modules/partition/jobs/SetPartitionFlagsJob.cpp b/src/modules/partition/jobs/SetPartitionFlagsJob.cpp index 3c9403b50..7b6101241 100644 --- a/src/modules/partition/jobs/SetPartitionFlagsJob.cpp +++ b/src/modules/partition/jobs/SetPartitionFlagsJob.cpp @@ -1,23 +1,14 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2008 2010, Volker Lanz + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Based on the SetPartFlagsJob class from KDE Partition Manager, - * Copyright 2008, 2010, Volker Lanz + * Based on the SetPartFlagsJob class from KDE Partition Manager * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "SetPartitionFlagsJob.h" diff --git a/src/modules/partition/jobs/SetPartitionFlagsJob.h b/src/modules/partition/jobs/SetPartitionFlagsJob.h index 41b01ecde..eb6d9586c 100644 --- a/src/modules/partition/jobs/SetPartitionFlagsJob.h +++ b/src/modules/partition/jobs/SetPartitionFlagsJob.h @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * * Based on the SetPartFlagsJob class from KDE Partition Manager, - * Copyright 2008, 2010, Volker Lanz + * SPDX-FileCopyrightText: 2008 2010, Volker Lanz * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef SETPARTITIONFLAGSJOB_H diff --git a/src/modules/partition/partition.conf b/src/modules/partition/partition.conf index 363ef7db1..4075fd273 100644 --- a/src/modules/partition/partition.conf +++ b/src/modules/partition/partition.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # This setting specifies the mount point of the EFI system partition. Some # distributions (Fedora, Debian, Manjaro, etc.) use /boot/efi, others (KaOS, # etc.) use just /boot. diff --git a/src/modules/partition/partition.schema.yaml b/src/modules/partition/partition.schema.yaml index 157f416d7..770b8a645 100644 --- a/src/modules/partition/partition.schema.yaml +++ b/src/modules/partition/partition.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/partition diff --git a/src/modules/partition/tests/CMakeLists.txt b/src/modules/partition/tests/CMakeLists.txt index 0bd559fd1..dd4e41068 100644 --- a/src/modules/partition/tests/CMakeLists.txt +++ b/src/modules/partition/tests/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# find_package( Qt5 COMPONENTS Gui REQUIRED ) set( PartitionModule_SOURCE_DIR .. ) diff --git a/src/modules/partition/tests/ClearMountsJobTests.cpp b/src/modules/partition/tests/ClearMountsJobTests.cpp index bdccc1bc4..e05af4897 100644 --- a/src/modules/partition/tests/ClearMountsJobTests.cpp +++ b/src/modules/partition/tests/ClearMountsJobTests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ClearMountsJobTests.h" diff --git a/src/modules/partition/tests/ClearMountsJobTests.h b/src/modules/partition/tests/ClearMountsJobTests.h index 0cc2b5c78..4b13fdc3d 100644 --- a/src/modules/partition/tests/ClearMountsJobTests.h +++ b/src/modules/partition/tests/ClearMountsJobTests.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CLEARMOUNTSJOBTESTS_H diff --git a/src/modules/partition/tests/PartitionJobTests.cpp b/src/modules/partition/tests/PartitionJobTests.cpp index d8d913ea1..94eec8496 100644 --- a/src/modules/partition/tests/PartitionJobTests.cpp +++ b/src/modules/partition/tests/PartitionJobTests.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau - * Copyright 2018, Philip Müller - * Copyright 2017, 2019 Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-FileCopyrightText: 2018, Philip Müller + * SPDX-FileCopyrightText: 2017, 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PartitionJobTests.h" diff --git a/src/modules/partition/tests/PartitionJobTests.h b/src/modules/partition/tests/PartitionJobTests.h index 4ce064ec7..364213f54 100644 --- a/src/modules/partition/tests/PartitionJobTests.h +++ b/src/modules/partition/tests/PartitionJobTests.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Aurélien Gâteau + * SPDX-FileCopyrightText: 2014 Aurélien Gâteau + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTITIONJOBTESTS_H diff --git a/src/modules/plasmalnf/CMakeLists.txt b/src/modules/plasmalnf/CMakeLists.txt index 93c88b291..15c836b5b 100644 --- a/src/modules/plasmalnf/CMakeLists.txt +++ b/src/modules/plasmalnf/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# find_package(ECM ${ECM_VERSION} REQUIRED NO_MODULE) # Requires a sufficiently recent Plasma framework, but also diff --git a/src/modules/plasmalnf/PlasmaLnfJob.cpp b/src/modules/plasmalnf/PlasmaLnfJob.cpp index 44bdb5cc7..0721bcd88 100644 --- a/src/modules/plasmalnf/PlasmaLnfJob.cpp +++ b/src/modules/plasmalnf/PlasmaLnfJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PlasmaLnfJob.h" @@ -30,9 +21,7 @@ PlasmaLnfJob::PlasmaLnfJob( const QString& lnfPath, const QString& id ) } -PlasmaLnfJob::~PlasmaLnfJob() -{ -} +PlasmaLnfJob::~PlasmaLnfJob() {} QString @@ -41,7 +30,8 @@ PlasmaLnfJob::prettyName() const return tr( "Plasma Look-and-Feel Job" ); } -QString PlasmaLnfJob::prettyStatusMessage() const +QString +PlasmaLnfJob::prettyStatusMessage() const { return prettyName(); } @@ -55,18 +45,22 @@ PlasmaLnfJob::exec() auto system = CalamaresUtils::System::instance(); Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - QStringList command( - { - "sudo", "-E", "-H", "-u", gs->value( "username" ).toString(), - m_lnfPath, "-platform", "minimal", "--resetLayout", "--apply", m_id - } ); + QStringList command( { "sudo", + "-E", + "-H", + "-u", + gs->value( "username" ).toString(), + m_lnfPath, + "-platform", + "minimal", + "--resetLayout", + "--apply", + m_id } ); int r = system->targetEnvCall( command ); if ( r ) - return Calamares::JobResult::error( - tr( "Could not select KDE Plasma Look-and-Feel package" ), - tr( "Could not select KDE Plasma Look-and-Feel package" ) ); + return Calamares::JobResult::error( tr( "Could not select KDE Plasma Look-and-Feel package" ), + tr( "Could not select KDE Plasma Look-and-Feel package" ) ); return Calamares::JobResult::ok(); } - diff --git a/src/modules/plasmalnf/PlasmaLnfJob.h b/src/modules/plasmalnf/PlasmaLnfJob.h index 9c52f2c8d..314070c0c 100644 --- a/src/modules/plasmalnf/PlasmaLnfJob.h +++ b/src/modules/plasmalnf/PlasmaLnfJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PLASMALNFJOB_H @@ -42,4 +33,4 @@ private: QString m_id; }; -#endif // PLASMALNFJOB_H +#endif // PLASMALNFJOB_H diff --git a/src/modules/plasmalnf/PlasmaLnfPage.cpp b/src/modules/plasmalnf/PlasmaLnfPage.cpp index 7e2ef8aa6..a44620074 100644 --- a/src/modules/plasmalnf/PlasmaLnfPage.cpp +++ b/src/modules/plasmalnf/PlasmaLnfPage.cpp @@ -1,29 +1,20 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PlasmaLnfPage.h" #include "ui_page_plasmalnf.h" +#include "Settings.h" #include "utils/Logger.h" #include "utils/Retranslator.h" -#include "Settings.h" #include @@ -38,17 +29,18 @@ ThemeInfo::ThemeInfo( const KPluginMetaData& data ) { } -static ThemeInfoList plasma_themes() +static ThemeInfoList +plasma_themes() { ThemeInfoList packages; - QList pkgs = KPackage::PackageLoader::self()->listPackages( "Plasma/LookAndFeel" ); + QList< KPluginMetaData > pkgs = KPackage::PackageLoader::self()->listPackages( "Plasma/LookAndFeel" ); for ( const KPluginMetaData& data : pkgs ) { if ( data.isValid() && !data.isHidden() && !data.name().isEmpty() ) { - packages << ThemeInfo{ data }; + packages << ThemeInfo { data }; } } @@ -63,25 +55,21 @@ PlasmaLnfPage::PlasmaLnfPage( QWidget* parent ) , m_buttonGroup( nullptr ) { ui->setupUi( this ); - CALAMARES_RETRANSLATE( - { + CALAMARES_RETRANSLATE( { ui->retranslateUi( this ); if ( Calamares::Settings::instance()->isSetupMode() ) - ui->generalExplanation->setText( tr( - "Please choose a look-and-feel for the KDE Plasma Desktop. " - "You can also skip this step and configure the look-and-feel " - "once the system is set up. Clicking on a look-and-feel " - "selection will give you a live preview of that look-and-feel.") ); + ui->generalExplanation->setText( tr( "Please choose a look-and-feel for the KDE Plasma Desktop. " + "You can also skip this step and configure the look-and-feel " + "once the system is set up. Clicking on a look-and-feel " + "selection will give you a live preview of that look-and-feel." ) ); else - ui->generalExplanation->setText( tr( - "Please choose a look-and-feel for the KDE Plasma Desktop. " - "You can also skip this step and configure the look-and-feel " - "once the system is installed. Clicking on a look-and-feel " - "selection will give you a live preview of that look-and-feel.") ); + ui->generalExplanation->setText( tr( "Please choose a look-and-feel for the KDE Plasma Desktop. " + "You can also skip this step and configure the look-and-feel " + "once the system is installed. Clicking on a look-and-feel " + "selection will give you a live preview of that look-and-feel." ) ); updateThemeNames(); fillUi(); - } - ) + } ) } void @@ -91,7 +79,7 @@ PlasmaLnfPage::setLnfPath( const QString& path ) } void -PlasmaLnfPage::setEnabledThemes(const ThemeInfoList& themes, bool showAll ) +PlasmaLnfPage::setEnabledThemes( const ThemeInfoList& themes, bool showAll ) { m_enabledThemes = themes; @@ -100,7 +88,9 @@ PlasmaLnfPage::setEnabledThemes(const ThemeInfoList& themes, bool showAll ) auto plasmaThemes = plasma_themes(); for ( auto& installed_theme : plasmaThemes ) if ( !m_enabledThemes.findById( installed_theme.id ) ) + { m_enabledThemes.append( installed_theme ); + } } updateThemeNames(); @@ -121,10 +111,13 @@ PlasmaLnfPage::setPreselect( const QString& id ) { m_preselect = id; if ( !m_enabledThemes.isEmpty() ) + { fillUi(); + } } -void PlasmaLnfPage::updateThemeNames() +void +PlasmaLnfPage::updateThemeNames() { auto plasmaThemes = plasma_themes(); for ( auto& enabled_theme : m_enabledThemes ) @@ -138,7 +131,8 @@ void PlasmaLnfPage::updateThemeNames() } } -void PlasmaLnfPage::winnowThemes() +void +PlasmaLnfPage::winnowThemes() { auto plasmaThemes = plasma_themes(); bool winnowed = true; @@ -167,7 +161,8 @@ void PlasmaLnfPage::winnowThemes() } } -void PlasmaLnfPage::fillUi() +void +PlasmaLnfPage::fillUi() { if ( m_enabledThemes.isEmpty() ) { @@ -180,7 +175,7 @@ void PlasmaLnfPage::fillUi() m_buttonGroup->setExclusive( true ); } - int c = 1; // After the general explanation + int c = 1; // After the general explanation for ( auto& theme : m_enabledThemes ) { if ( !theme.widget ) @@ -188,7 +183,7 @@ void PlasmaLnfPage::fillUi() ThemeWidget* w = new ThemeWidget( theme ); m_buttonGroup->addButton( w->button() ); ui->verticalLayout->insertWidget( c, w ); - connect( w, &ThemeWidget::themeSelected, this, &PlasmaLnfPage::plasmaThemeSelected); + connect( w, &ThemeWidget::themeSelected, this, &PlasmaLnfPage::plasmaThemeSelected ); theme.widget = w; } else diff --git a/src/modules/plasmalnf/PlasmaLnfPage.h b/src/modules/plasmalnf/PlasmaLnfPage.h index 5a4c68b4e..287da8b29 100644 --- a/src/modules/plasmalnf/PlasmaLnfPage.h +++ b/src/modules/plasmalnf/PlasmaLnfPage.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PLASMALNFPAGE_H @@ -75,8 +66,8 @@ private: bool m_showAll; // If true, don't winnow according to enabledThemes ThemeInfoList m_enabledThemes; - QButtonGroup *m_buttonGroup; + QButtonGroup* m_buttonGroup; QList< ThemeWidget* > m_widgets; }; -#endif //PLASMALNFPAGE_H +#endif //PLASMALNFPAGE_H diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp index ec5258c64..9bda0164b 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "PlasmaLnfViewStep.h" @@ -32,7 +23,7 @@ #include #endif -CALAMARES_PLUGIN_FACTORY_DEFINITION( PlasmaLnfViewStepFactory, registerPlugin(); ) +CALAMARES_PLUGIN_FACTORY_DEFINITION( PlasmaLnfViewStepFactory, registerPlugin< PlasmaLnfViewStep >(); ) static QString currentPlasmaTheme() @@ -58,7 +49,9 @@ PlasmaLnfViewStep::PlasmaLnfViewStep( QObject* parent ) PlasmaLnfViewStep::~PlasmaLnfViewStep() { if ( m_widget && m_widget->parent() == nullptr ) + { m_widget->deleteLater(); + } } @@ -104,7 +97,8 @@ PlasmaLnfViewStep::isAtEnd() const } -void PlasmaLnfViewStep::onLeave() +void +PlasmaLnfViewStep::onLeave() { } @@ -118,9 +112,13 @@ PlasmaLnfViewStep::jobs() const if ( !m_themeId.isEmpty() ) { if ( !m_lnfPath.isEmpty() ) + { l.append( Calamares::job_ptr( new PlasmaLnfJob( m_lnfPath, m_themeId ) ) ); + } else + { cWarning() << "no lnftool given for plasmalnf module."; + } } return l; } @@ -133,20 +131,25 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap ) m_widget->setLnfPath( m_lnfPath ); if ( m_lnfPath.isEmpty() ) + { cWarning() << "no lnftool given for plasmalnf module."; + } m_liveUser = CalamaresUtils::getString( configurationMap, "liveuser" ); QString preselect = CalamaresUtils::getString( configurationMap, "preselect" ); if ( preselect == QStringLiteral( "*" ) ) + { preselect = currentPlasmaTheme(); + } if ( !preselect.isEmpty() ) + { m_widget->setPreselect( preselect ); + } bool showAll = CalamaresUtils::getBool( configurationMap, "showAll", false ); - if ( configurationMap.contains( "themes" ) && - configurationMap.value( "themes" ).type() == QVariant::List ) + if ( configurationMap.contains( "themes" ) && configurationMap.value( "themes" ).type() == QVariant::List ) { ThemeInfoList listedThemes; auto themeList = configurationMap.value( "themes" ).toList(); @@ -160,14 +163,20 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap ) listedThemes.append( ThemeInfo( iv.value( "theme" ).toString(), iv.value( "image" ).toString() ) ); } else if ( i.type() == QVariant::String ) + { listedThemes.append( ThemeInfo( i.toString() ) ); + } if ( listedThemes.length() == 1 ) + { cWarning() << "only one theme enabled in plasmalnf"; + } m_widget->setEnabledThemes( listedThemes, showAll ); } else + { m_widget->setEnabledThemesAll(); // All of them + } } void @@ -182,9 +191,9 @@ PlasmaLnfViewStep::themeSelected( const QString& id ) QProcess lnftool; if ( !m_liveUser.isEmpty() ) - lnftool.start( "sudo", {"-E", "-H", "-u", m_liveUser, m_lnfPath, "--resetLayout", "--apply", id} ); + lnftool.start( "sudo", { "-E", "-H", "-u", m_liveUser, m_lnfPath, "--resetLayout", "--apply", id } ); else - lnftool.start( m_lnfPath, {"--resetLayout", "--apply", id} ); + lnftool.start( m_lnfPath, { "--resetLayout", "--apply", id } ); if ( !lnftool.waitForStarted( 1000 ) ) { @@ -198,7 +207,11 @@ PlasmaLnfViewStep::themeSelected( const QString& id ) } if ( ( lnftool.exitCode() == 0 ) && ( lnftool.exitStatus() == QProcess::NormalExit ) ) + { cDebug() << "Plasma look-and-feel applied" << id; + } else + { cWarning() << "could not apply look-and-feel" << id; + } } diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.h b/src/modules/plasmalnf/PlasmaLnfViewStep.h index 0bf76934c..a98ec4bf5 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.h +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.h @@ -1,27 +1,18 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PLASMALNFVIEWSTEP_H #define PLASMALNFVIEWSTEP_H +#include "DllMacro.h" #include "utils/PluginFactory.h" #include "viewpages/ViewStep.h" -#include "DllMacro.h" #include #include @@ -60,9 +51,9 @@ private: PlasmaLnfPage* m_widget; QString m_lnfPath; // Path to the lnf tool QString m_themeId; // Id of selected theme - QString m_liveUser; // Name of the live user (for OEM mode) + QString m_liveUser; // Name of the live user (for OEM mode) }; CALAMARES_PLUGIN_FACTORY_DECLARATION( PlasmaLnfViewStepFactory ) -#endif // PLASMALNFVIEWSTEP_H +#endif // PLASMALNFVIEWSTEP_H diff --git a/src/modules/plasmalnf/ThemeInfo.h b/src/modules/plasmalnf/ThemeInfo.h index 982064073..6848fb8c3 100644 --- a/src/modules/plasmalnf/ThemeInfo.h +++ b/src/modules/plasmalnf/ThemeInfo.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PLASMALNF_THEMEINFO_H @@ -42,7 +33,8 @@ struct ThemeInfo ThemeInfo() : widget( nullptr ) - {} + { + } explicit ThemeInfo( const QString& _id ) : id( _id ) @@ -54,13 +46,14 @@ struct ThemeInfo : id( _id ) , imagePath( image ) , widget( nullptr ) - {} + { + } // Defined in PlasmaLnfPage.cpp explicit ThemeInfo( const KPluginMetaData& ); bool isValid() const { return !id.isEmpty(); } -} ; +}; class ThemeInfoList : public QList< ThemeInfo > { @@ -71,7 +64,9 @@ public: for ( ThemeInfo& i : *this ) { if ( i.id == id ) + { return &i; + } } return nullptr; } @@ -82,16 +77,15 @@ public: for ( const ThemeInfo& i : *this ) { if ( i.id == id ) + { return &i; + } } return nullptr; } /** @brief Checks if a given @p id is in the list of themes. */ - bool contains( const QString& id ) const - { - return findById( id ) != nullptr; - } -} ; + bool contains( const QString& id ) const { return findById( id ) != nullptr; } +}; #endif diff --git a/src/modules/plasmalnf/ThemeWidget.cpp b/src/modules/plasmalnf/ThemeWidget.cpp index 92a88197f..8314544eb 100644 --- a/src/modules/plasmalnf/ThemeWidget.cpp +++ b/src/modules/plasmalnf/ThemeWidget.cpp @@ -1,28 +1,19 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ThemeWidget.h" #include "ThemeInfo.h" +#include "Branding.h" #include "utils/CalamaresUtilsGui.h" #include "utils/Logger.h" -#include "Branding.h" #include #include @@ -38,33 +29,41 @@ * empty screenshot. Returns blank if the path * doesn't exist anywhere in the search paths. */ -static QString _munge_imagepath( const QString& path ) +static QString +_munge_imagepath( const QString& path ) { if ( path.isEmpty() ) + { return ":/view-preview.png"; + } if ( path.startsWith( '/' ) ) + { return path; + } if ( QFileInfo::exists( path ) ) + { return path; + } QFileInfo fi( QDir( Calamares::Branding::instance()->componentDirectory() ), path ); if ( fi.exists() ) + { return fi.absoluteFilePath(); + } return QString(); } -ThemeWidget::ThemeWidget(const ThemeInfo& info, QWidget* parent) +ThemeWidget::ThemeWidget( const ThemeInfo& info, QWidget* parent ) : QWidget( parent ) , m_id( info.id ) , m_check( new QRadioButton( info.name.isEmpty() ? info.id : info.name, parent ) ) , m_description( new QLabel( info.description, parent ) ) { - const QSize image_size{ - qMax(12 * CalamaresUtils::defaultFontHeight(), 120), - qMax(8 * CalamaresUtils::defaultFontHeight(), 80) }; + const QSize image_size { qMax( 12 * CalamaresUtils::defaultFontHeight(), 120 ), + qMax( 8 * CalamaresUtils::defaultFontHeight(), 80 ) }; QHBoxLayout* layout = new QHBoxLayout( this ); this->setLayout( layout ); @@ -99,7 +98,9 @@ void ThemeWidget::clicked( bool checked ) { if ( checked ) + { emit themeSelected( m_id ); + } } QAbstractButton* @@ -108,7 +109,8 @@ ThemeWidget::button() const return m_check; } -void ThemeWidget::updateThemeName(const ThemeInfo& info) +void +ThemeWidget::updateThemeName( const ThemeInfo& info ) { m_check->setText( info.name ); m_description->setText( info.description ); diff --git a/src/modules/plasmalnf/ThemeWidget.h b/src/modules/plasmalnf/ThemeWidget.h index 83294cc77..133dfc2a0 100644 --- a/src/modules/plasmalnf/ThemeWidget.h +++ b/src/modules/plasmalnf/ThemeWidget.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PLASMALNF_THEMEWIDGET_H @@ -47,7 +38,6 @@ private: QString m_id; QRadioButton* m_check; QLabel* m_description; -} ; +}; #endif - diff --git a/src/modules/plasmalnf/page_plasmalnf.ui b/src/modules/plasmalnf/page_plasmalnf.ui index 7b3c8c96f..88d5a39a2 100644 --- a/src/modules/plasmalnf/page_plasmalnf.ui +++ b/src/modules/plasmalnf/page_plasmalnf.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + PlasmaLnfPage diff --git a/src/modules/plasmalnf/plasmalnf.conf b/src/modules/plasmalnf/plasmalnf.conf index a954c685a..fd59389a8 100644 --- a/src/modules/plasmalnf/plasmalnf.conf +++ b/src/modules/plasmalnf/plasmalnf.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # The Plasma Look-and-Feel module allows selecting a Plasma # Look-and-Feel in the live- or host-system and switches the # host Plasma session immediately to the chosen LnF; it diff --git a/src/modules/plasmalnf/view-preview.png.license b/src/modules/plasmalnf/view-preview.png.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/src/modules/plasmalnf/view-preview.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/src/modules/plasmalnf/view-preview.svg.license b/src/modules/plasmalnf/view-preview.svg.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/src/modules/plasmalnf/view-preview.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/src/modules/plymouthcfg/main.py b/src/modules/plymouthcfg/main.py index e224f5df0..c51314e7f 100644 --- a/src/modules/plymouthcfg/main.py +++ b/src/modules/plymouthcfg/main.py @@ -1,25 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2016, Artoo -# Copyright 2017, Alf Gaida -# Copyright 2018, Gabriel Craciunescu -# Copyright 2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2016 Artoo +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2018 Gabriel Craciunescu +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares diff --git a/src/modules/plymouthcfg/module.desc b/src/modules/plymouthcfg/module.desc index f2d2d4743..660aa71b2 100644 --- a/src/modules/plymouthcfg/module.desc +++ b/src/modules/plymouthcfg/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "plymouthcfg" diff --git a/src/modules/plymouthcfg/plymouthcfg.conf b/src/modules/plymouthcfg/plymouthcfg.conf index 47c54f5ff..ebe51d1ed 100644 --- a/src/modules/plymouthcfg/plymouthcfg.conf +++ b/src/modules/plymouthcfg/plymouthcfg.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Plymouth Configuration Module # # This module can be used to setup the default plymouth theme to diff --git a/src/modules/plymouthcfg/plymouthcfg.schema.yaml b/src/modules/plymouthcfg/plymouthcfg.schema.yaml index 5100e2cd3..27925ec02 100644 --- a/src/modules/plymouthcfg/plymouthcfg.schema.yaml +++ b/src/modules/plymouthcfg/plymouthcfg.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/plymouthcfg diff --git a/src/modules/preservefiles/CMakeLists.txt b/src/modules/preservefiles/CMakeLists.txt index 571de31ca..d19645089 100644 --- a/src/modules/preservefiles/CMakeLists.txt +++ b/src/modules/preservefiles/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) calamares_add_plugin( preservefiles diff --git a/src/modules/preservefiles/PreserveFiles.cpp b/src/modules/preservefiles/PreserveFiles.cpp index 7262630e0..8194b3221 100644 --- a/src/modules/preservefiles/PreserveFiles.cpp +++ b/src/modules/preservefiles/PreserveFiles.cpp @@ -1,8 +1,7 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE * */ @@ -203,7 +202,8 @@ PreserveFiles::setConfigurationMap( const QVariantMap& configurationMap ) { QString filename = li.toString(); if ( !filename.isEmpty() ) - m_items.append( Item { filename, filename, CalamaresUtils::Permissions( defaultPermissions ), ItemType::Path } ); + m_items.append( + Item { filename, filename, CalamaresUtils::Permissions( defaultPermissions ), ItemType::Path } ); else { cDebug() << "Empty filename for preservefiles, item" << c; diff --git a/src/modules/preservefiles/PreserveFiles.h b/src/modules/preservefiles/PreserveFiles.h index fdba933fa..d2b7373e2 100644 --- a/src/modules/preservefiles/PreserveFiles.h +++ b/src/modules/preservefiles/PreserveFiles.h @@ -1,8 +1,7 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE * */ diff --git a/src/modules/preservefiles/preservefiles.conf b/src/modules/preservefiles/preservefiles.conf index 671a308cc..962ca756a 100644 --- a/src/modules/preservefiles/preservefiles.conf +++ b/src/modules/preservefiles/preservefiles.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the preserve-files job # # The *files* key contains a list of files to preserve. Each element of diff --git a/src/modules/rawfs/main.py b/src/modules/rawfs/main.py index 68f3c444e..a72ffe19d 100644 --- a/src/modules/rawfs/main.py +++ b/src/modules/rawfs/main.py @@ -1,22 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2019, Collabora Ltd +# SPDX-FileCopyrightText: 2019 Collabora Ltd +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares import os diff --git a/src/modules/rawfs/module.desc b/src/modules/rawfs/module.desc index aaf65c183..0c4f21f92 100644 --- a/src/modules/rawfs/module.desc +++ b/src/modules/rawfs/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # Module metadata file for block-copy jobmodule # Syntax is YAML 1.2 --- diff --git a/src/modules/rawfs/rawfs.conf b/src/modules/rawfs/rawfs.conf index 8d7da3ba3..bbc36906b 100644 --- a/src/modules/rawfs/rawfs.conf +++ b/src/modules/rawfs/rawfs.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the rawfs module: raw filesystem copy to a block device --- diff --git a/src/modules/rawfs/tests/1.global b/src/modules/rawfs/tests/1.global index c09df9375..089557d99 100644 --- a/src/modules/rawfs/tests/1.global +++ b/src/modules/rawfs/tests/1.global @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- rootMountPoint: /tmp/unpackfs-test-run-rootdir3/ partitions: diff --git a/src/modules/rawfs/tests/1.job b/src/modules/rawfs/tests/1.job index 6079c43ed..c87a4a70c 100644 --- a/src/modules/rawfs/tests/1.job +++ b/src/modules/rawfs/tests/1.job @@ -1,5 +1,8 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Testing configuration for rawfs - +# --- targets: diff --git a/src/modules/rawfs/tests/CMakeTests.txt b/src/modules/rawfs/tests/CMakeTests.txt index 44a7777c8..ed4c37485 100644 --- a/src/modules/rawfs/tests/CMakeTests.txt +++ b/src/modules/rawfs/tests/CMakeTests.txt @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# # Special cases for rawfs tests # # - On FreeBSD, /proc/mounts doesn't exist (/proc is only about processes, diff --git a/src/modules/removeuser/CMakeLists.txt b/src/modules/removeuser/CMakeLists.txt index 55798feac..cf4243e7d 100644 --- a/src/modules/removeuser/CMakeLists.txt +++ b/src/modules/removeuser/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( removeuser TYPE job EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/removeuser/RemoveUserJob.cpp b/src/modules/removeuser/RemoveUserJob.cpp index 0488d19a4..9475b9bea 100644 --- a/src/modules/removeuser/RemoveUserJob.cpp +++ b/src/modules/removeuser/RemoveUserJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Teo Mrnjavac - * Copyright 2017. Alf Gaida - * Copyright 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Alf Gaida + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "RemoveUserJob.h" diff --git a/src/modules/removeuser/RemoveUserJob.h b/src/modules/removeuser/RemoveUserJob.h index d13e834f0..8f7de35e0 100644 --- a/src/modules/removeuser/RemoveUserJob.h +++ b/src/modules/removeuser/RemoveUserJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef REMOVEUSERJOB_H diff --git a/src/modules/removeuser/removeuser.conf b/src/modules/removeuser/removeuser.conf index d266e6952..cc086e723 100644 --- a/src/modules/removeuser/removeuser.conf +++ b/src/modules/removeuser/removeuser.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Removes a single user (with userdel) from the system. # This is typically used in OEM setups or if the live user # spills into the target system. diff --git a/src/modules/removeuser/removeuser.schema.yaml b/src/modules/removeuser/removeuser.schema.yaml index d1fed47fe..c28271716 100644 --- a/src/modules/removeuser/removeuser.schema.yaml +++ b/src/modules/removeuser/removeuser.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/removeuser diff --git a/src/modules/services-openrc/main.py b/src/modules/services-openrc/main.py index 23591fb84..cb1ae8020 100644 --- a/src/modules/services-openrc/main.py +++ b/src/modules/services-openrc/main.py @@ -1,25 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2016, Artoo -# Copyright 2017, Philip Müller -# Copyright 2018, Artoo -# Copyright 2018-2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2016 Artoo +# SPDX-FileCopyrightText: 2017 Philip Müller +# SPDX-FileCopyrightText: 2018 Artoo +# SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares diff --git a/src/modules/services-openrc/module.desc b/src/modules/services-openrc/module.desc index 4b0b51614..c60872bc1 100644 --- a/src/modules/services-openrc/module.desc +++ b/src/modules/services-openrc/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "services-openrc" diff --git a/src/modules/services-openrc/services-openrc.conf b/src/modules/services-openrc/services-openrc.conf index b8255b21a..6042b5305 100644 --- a/src/modules/services-openrc/services-openrc.conf +++ b/src/modules/services-openrc/services-openrc.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # openrc services module to modify service runlevels via rc-update in the chroot # # Services can be added (to any runlevel, or multiple runlevels) or deleted. diff --git a/src/modules/services-systemd/main.py b/src/modules/services-systemd/main.py index cd13d9ce9..e3d3e20a5 100644 --- a/src/modules/services-systemd/main.py +++ b/src/modules/services-systemd/main.py @@ -1,25 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Philip Müller -# Copyright 2014, Teo Mrnjavac -# Copyright 2017, Alf Gaida -# Copyright 2018-2019, Adriaan de Groot +# SPDX-FileCopyrightText: 2014 Philip Müller +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import libcalamares diff --git a/src/modules/services-systemd/module.desc b/src/modules/services-systemd/module.desc index 4305b1141..e016c6dcb 100644 --- a/src/modules/services-systemd/module.desc +++ b/src/modules/services-systemd/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "services-systemd" diff --git a/src/modules/services-systemd/services-systemd.conf b/src/modules/services-systemd/services-systemd.conf index 4d34df7d0..8c7d83c92 100644 --- a/src/modules/services-systemd/services-systemd.conf +++ b/src/modules/services-systemd/services-systemd.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Systemd services manipulation. # # This module can enable services and targets for systemd diff --git a/src/modules/shellprocess/CMakeLists.txt b/src/modules/shellprocess/CMakeLists.txt index ec1cf0bcf..448be0625 100644 --- a/src/modules/shellprocess/CMakeLists.txt +++ b/src/modules/shellprocess/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( shellprocess TYPE job EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/shellprocess/ShellProcessJob.cpp b/src/modules/shellprocess/ShellProcessJob.cpp index d0507a732..ab00a0bdd 100644 --- a/src/modules/shellprocess/ShellProcessJob.cpp +++ b/src/modules/shellprocess/ShellProcessJob.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ShellProcessJob.h" diff --git a/src/modules/shellprocess/ShellProcessJob.h b/src/modules/shellprocess/ShellProcessJob.h index 708a43087..c63a7b91f 100644 --- a/src/modules/shellprocess/ShellProcessJob.h +++ b/src/modules/shellprocess/ShellProcessJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef SHELLPROCESSJOB_H diff --git a/src/modules/shellprocess/Tests.cpp b/src/modules/shellprocess/Tests.cpp index caf9800c9..77368db48 100644 --- a/src/modules/shellprocess/Tests.cpp +++ b/src/modules/shellprocess/Tests.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Tests.h" diff --git a/src/modules/shellprocess/Tests.h b/src/modules/shellprocess/Tests.h index 5b4ebebbb..cabeaada2 100644 --- a/src/modules/shellprocess/Tests.h +++ b/src/modules/shellprocess/Tests.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TESTS_H diff --git a/src/modules/shellprocess/shellprocess.conf b/src/modules/shellprocess/shellprocess.conf index 4734aaadd..00d88851f 100644 --- a/src/modules/shellprocess/shellprocess.conf +++ b/src/modules/shellprocess/shellprocess.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the shell process job. # # Executes a list of commands found under the key *script*. diff --git a/src/modules/summary/CMakeLists.txt b/src/modules/summary/CMakeLists.txt index ce71357cd..57dc731cb 100644 --- a/src/modules/summary/CMakeLists.txt +++ b/src/modules/summary/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) calamares_add_plugin( summary TYPE viewmodule diff --git a/src/modules/summary/SummaryPage.cpp b/src/modules/summary/SummaryPage.cpp index 2885b1d61..d6917d962 100644 --- a/src/modules/summary/SummaryPage.cpp +++ b/src/modules/summary/SummaryPage.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, 2019, Adriaan de Groot - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "SummaryPage.h" @@ -45,21 +36,18 @@ SummaryPage::SummaryPage( const SummaryViewStep* thisViewStep, QWidget* parent ) { Q_UNUSED( parent ) - this->setObjectName("summaryStep"); + this->setObjectName( "summaryStep" ); Q_ASSERT( m_thisViewStep ); QVBoxLayout* layout = new QVBoxLayout( this ); layout->setContentsMargins( 0, 0, 0, 0 ); QLabel* headerLabel = new QLabel( this ); - CALAMARES_RETRANSLATE( - if ( Calamares::Settings::instance()->isSetupMode() ) - headerLabel->setText( tr( "This is an overview of what will happen once you start " - "the setup procedure." ) ); - else - headerLabel->setText( tr( "This is an overview of what will happen once you start " - "the install procedure." ) ); - ) + CALAMARES_RETRANSLATE( if ( Calamares::Settings::instance()->isSetupMode() ) + headerLabel->setText( tr( "This is an overview of what will happen once you start " + "the setup procedure." ) ); + else headerLabel->setText( tr( "This is an overview of what will happen once you start " + "the install procedure." ) ); ) layout->addWidget( headerLabel ); layout->addWidget( m_scrollArea ); m_scrollArea->setWidgetResizable( true ); @@ -81,8 +69,7 @@ SummaryPage::onActivate() createContentWidget(); bool first = true; - const Calamares::ViewStepList steps = - stepsForSummary( Calamares::ViewManager::instance()->viewSteps() ); + const Calamares::ViewStepList steps = stepsForSummary( Calamares::ViewManager::instance()->viewSteps() ); for ( Calamares::ViewStep* step : steps ) { @@ -90,12 +77,18 @@ SummaryPage::onActivate() QWidget* widget = step->createSummaryWidget(); if ( text.isEmpty() && !widget ) + { continue; + } if ( first ) + { first = false; + } else + { m_layout->addSpacing( SECTION_SPACING ); + } m_layout->addWidget( createTitleLabel( step->prettyName() ) ); QHBoxLayout* itemBodyLayout = new QHBoxLayout; @@ -106,9 +99,13 @@ SummaryPage::onActivate() itemBodyLayout->addLayout( itemBodyCoreLayout ); CalamaresUtils::unmarginLayout( itemBodyLayout ); if ( !text.isEmpty() ) + { itemBodyCoreLayout->addWidget( createBodyLabel( text ) ); + } if ( widget ) + { itemBodyCoreLayout->addWidget( widget ); + } itemBodyLayout->addSpacing( CalamaresUtils::defaultFontHeight() * 2 ); } m_layout->addStretch(); @@ -147,7 +144,9 @@ SummaryPage::stepsForSummary( const Calamares::ViewStepList& allSteps ) const // If we reach the parent step of this page, we're done collecting the list of // steps to summarize. if ( m_thisViewStep == step ) + { break; + } steps.append( step ); } diff --git a/src/modules/summary/SummaryPage.h b/src/modules/summary/SummaryPage.h index b9a98f2a1..1adb67017 100644 --- a/src/modules/summary/SummaryPage.h +++ b/src/modules/summary/SummaryPage.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef SUMMARYPAGE_H @@ -70,4 +61,4 @@ private: QScrollArea* m_scrollArea; }; -#endif // SUMMARYPAGE_H +#endif // SUMMARYPAGE_H diff --git a/src/modules/summary/SummaryViewStep.cpp b/src/modules/summary/SummaryViewStep.cpp index 6835b2b05..c5b6841ed 100644 --- a/src/modules/summary/SummaryViewStep.cpp +++ b/src/modules/summary/SummaryViewStep.cpp @@ -1,26 +1,17 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "SummaryViewStep.h" #include "SummaryPage.h" -CALAMARES_PLUGIN_FACTORY_DEFINITION( SummaryViewStepFactory, registerPlugin(); ) +CALAMARES_PLUGIN_FACTORY_DEFINITION( SummaryViewStepFactory, registerPlugin< SummaryViewStep >(); ) SummaryViewStep::SummaryViewStep( QObject* parent ) : Calamares::ViewStep( parent ) @@ -33,7 +24,9 @@ SummaryViewStep::SummaryViewStep( QObject* parent ) SummaryViewStep::~SummaryViewStep() { if ( m_widget && m_widget->parent() == nullptr ) + { m_widget->deleteLater(); + } } @@ -98,4 +91,3 @@ SummaryViewStep::onLeave() { m_widget->createContentWidget(); } - diff --git a/src/modules/summary/SummaryViewStep.h b/src/modules/summary/SummaryViewStep.h index 5b2f49b8e..0a2933d8b 100644 --- a/src/modules/summary/SummaryViewStep.h +++ b/src/modules/summary/SummaryViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef SUMMARYPAGEPLUGIN_H @@ -57,4 +48,4 @@ private: CALAMARES_PLUGIN_FACTORY_DECLARATION( SummaryViewStepFactory ) -#endif // SUMMARYPAGEPLUGIN_H +#endif // SUMMARYPAGEPLUGIN_H diff --git a/src/modules/tracking/CMakeLists.txt b/src/modules/tracking/CMakeLists.txt index 894663426..fe0b315e3 100644 --- a/src/modules/tracking/CMakeLists.txt +++ b/src/modules/tracking/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# calamares_add_plugin( tracking TYPE viewmodule EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/tracking/Config.cpp b/src/modules/tracking/Config.cpp index 9e8179905..f1f61edfd 100644 --- a/src/modules/tracking/Config.cpp +++ b/src/modules/tracking/Config.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Config.h" diff --git a/src/modules/tracking/Config.h b/src/modules/tracking/Config.h index ad7d1d4f2..655a71410 100644 --- a/src/modules/tracking/Config.h +++ b/src/modules/tracking/Config.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TRACKING_CONFIG_H diff --git a/src/modules/tracking/Tests.cpp b/src/modules/tracking/Tests.cpp index b7ed57ab1..c3fe90ad1 100644 --- a/src/modules/tracking/Tests.cpp +++ b/src/modules/tracking/Tests.cpp @@ -1,16 +1,15 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE */ #include "Config.h" #include "utils/Logger.h" -#include #include +#include class TrackingTests : public QObject { @@ -29,17 +28,17 @@ TrackingTests::TrackingTests() { } -TrackingTests::~TrackingTests() -{ -} +TrackingTests::~TrackingTests() {} -void TrackingTests::initTestCase() +void +TrackingTests::initTestCase() { Logger::setupLogLevel( Logger::LOGDEBUG ); cDebug() << "Tracking test started."; } -void TrackingTests::testEmptyConfig() +void +TrackingTests::testEmptyConfig() { Logger::setupLogLevel( Logger::LOGDEBUG ); diff --git a/src/modules/tracking/TrackingJobs.cpp b/src/modules/tracking/TrackingJobs.cpp index 2df3a66a0..dba6000e1 100644 --- a/src/modules/tracking/TrackingJobs.cpp +++ b/src/modules/tracking/TrackingJobs.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "TrackingJobs.h" diff --git a/src/modules/tracking/TrackingJobs.h b/src/modules/tracking/TrackingJobs.h index 33b8eceb1..b58880f00 100644 --- a/src/modules/tracking/TrackingJobs.h +++ b/src/modules/tracking/TrackingJobs.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TRACKING_TRACKINGJOBS_H diff --git a/src/modules/tracking/TrackingPage.cpp b/src/modules/tracking/TrackingPage.cpp index 76b4a6f95..ffdb8be66 100644 --- a/src/modules/tracking/TrackingPage.cpp +++ b/src/modules/tracking/TrackingPage.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "TrackingPage.h" diff --git a/src/modules/tracking/TrackingPage.h b/src/modules/tracking/TrackingPage.h index 7df43b846..eb843b755 100644 --- a/src/modules/tracking/TrackingPage.h +++ b/src/modules/tracking/TrackingPage.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TRACKINGPAGE_H diff --git a/src/modules/tracking/TrackingType.h b/src/modules/tracking/TrackingType.h index 22e3157d6..81af34688 100644 --- a/src/modules/tracking/TrackingType.h +++ b/src/modules/tracking/TrackingType.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TRACKINGTYPE_H diff --git a/src/modules/tracking/TrackingViewStep.cpp b/src/modules/tracking/TrackingViewStep.cpp index da5d9108d..7955846c3 100644 --- a/src/modules/tracking/TrackingViewStep.cpp +++ b/src/modules/tracking/TrackingViewStep.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "TrackingViewStep.h" diff --git a/src/modules/tracking/TrackingViewStep.h b/src/modules/tracking/TrackingViewStep.h index b05f1b053..7b27dbec6 100644 --- a/src/modules/tracking/TrackingViewStep.h +++ b/src/modules/tracking/TrackingViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef TRACKINGVIEWSTEP_H diff --git a/src/modules/tracking/level-install.svg.license b/src/modules/tracking/level-install.svg.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/src/modules/tracking/level-install.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/src/modules/tracking/level-machine.svg.license b/src/modules/tracking/level-machine.svg.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/src/modules/tracking/level-machine.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/src/modules/tracking/level-none.svg.license b/src/modules/tracking/level-none.svg.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/src/modules/tracking/level-none.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/src/modules/tracking/level-user.svg.license b/src/modules/tracking/level-user.svg.license new file mode 100644 index 000000000..ef0e9d7cd --- /dev/null +++ b/src/modules/tracking/level-user.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Uri Herrera and others +SPDX-License-Identifier: LGPL-3.0-or-later diff --git a/src/modules/tracking/page_trackingstep.ui b/src/modules/tracking/page_trackingstep.ui index 55a4df094..f66f159f7 100644 --- a/src/modules/tracking/page_trackingstep.ui +++ b/src/modules/tracking/page_trackingstep.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + TrackingPage diff --git a/src/modules/tracking/tracking.conf b/src/modules/tracking/tracking.conf index 533d0e0dd..6f726226d 100644 --- a/src/modules/tracking/tracking.conf +++ b/src/modules/tracking/tracking.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Settings for various kinds of tracking that Distributions can # enable. Distributions looking at tracking should be aware of # the privacy (and hence communications) impact of that tracking, diff --git a/src/modules/umount/main.py b/src/modules/umount/main.py index 454222c5c..86ab1599a 100644 --- a/src/modules/umount/main.py +++ b/src/modules/umount/main.py @@ -1,24 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Aurélien Gâteau -# Copyright 2016, Anke Boersma -# Copyright 2018, Adriaan de Groot +# SPDX-FileCopyrightText: 2014 Aurélien Gâteau +# SPDX-FileCopyrightText: 2016 Anke Boersma +# SPDX-FileCopyrightText: 2018 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import os import subprocess diff --git a/src/modules/umount/module.desc b/src/modules/umount/module.desc index a1ead1228..a1c189a62 100644 --- a/src/modules/umount/module.desc +++ b/src/modules/umount/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- type: "job" name: "umount" diff --git a/src/modules/umount/umount.conf b/src/modules/umount/umount.conf index 3d4eb7d95..b6d86e353 100644 --- a/src/modules/umount/umount.conf +++ b/src/modules/umount/umount.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# ### Umount Module # # This module represents the last part of the installation, the unmounting diff --git a/src/modules/umount/umount.schema.yaml b/src/modules/umount/umount.schema.yaml index 585946fbe..9b81db3d9 100644 --- a/src/modules/umount/umount.schema.yaml +++ b/src/modules/umount/umount.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/umount diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 00de4165d..d89607465 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -1,28 +1,19 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# === This file is part of Calamares - === +# === This file is part of Calamares - === # -# Copyright 2014, Teo Mrnjavac -# Copyright 2014, Daniel Hillenbrand -# Copyright 2014, Philip Müller -# Copyright 2017, Alf Gaida -# Copyright 2019, Kevin Kofler -# Copyright 2020, Adriaan de Groot -# Copyright 2020, Gabriel Craciunescu +# SPDX-FileCopyrightText: 2014 Teo Mrnjavac +# SPDX-FileCopyrightText: 2014 Daniel Hillenbrand +# SPDX-FileCopyrightText: 2014 Philip Müller +# SPDX-FileCopyrightText: 2017 Alf Gaida +# SPDX-FileCopyrightText: 2019 Kevin Kofler +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-FileCopyrightText: 2020 Gabriel Craciunescu +# SPDX-License-Identifier: GPL-3.0-or-later # -# Calamares is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# Calamares is Free Software: see the License-Identifier above. # -# Calamares is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Calamares. If not, see . import os import re diff --git a/src/modules/unpackfs/module.desc b/src/modules/unpackfs/module.desc index c87613d74..2723c3c46 100644 --- a/src/modules/unpackfs/module.desc +++ b/src/modules/unpackfs/module.desc @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # Syntax is YAML 1.2 --- type: "job" diff --git a/src/modules/unpackfs/runtests.sh b/src/modules/unpackfs/runtests.sh index be175e0cd..2269b078a 100644 --- a/src/modules/unpackfs/runtests.sh +++ b/src/modules/unpackfs/runtests.sh @@ -1,4 +1,12 @@ #! /bin/sh +# +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# +# Test preparation for unpackfs; since there's a bunch +# of fiddly bits than need to be present for the tests, +# do that in a script rather than entirely in CTest. +# SRCDIR=$( dirname "$0" ) # For test 3 diff --git a/src/modules/unpackfs/tests/1.global b/src/modules/unpackfs/tests/1.global index 02ae840cb..7dedc1527 100644 --- a/src/modules/unpackfs/tests/1.global +++ b/src/modules/unpackfs/tests/1.global @@ -1,2 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- bogus: true diff --git a/src/modules/unpackfs/tests/2.global b/src/modules/unpackfs/tests/2.global index f496ade61..d1e61caf3 100644 --- a/src/modules/unpackfs/tests/2.global +++ b/src/modules/unpackfs/tests/2.global @@ -1,2 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- rootMountPoint: /tmp/unpackfs-test-run-rootdir/ diff --git a/src/modules/unpackfs/tests/3.global b/src/modules/unpackfs/tests/3.global index 2e6b37ab5..1c25cbe20 100644 --- a/src/modules/unpackfs/tests/3.global +++ b/src/modules/unpackfs/tests/3.global @@ -1,2 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- rootMountPoint: /tmp/unpackfs-test-run-rootdir3/ diff --git a/src/modules/unpackfs/tests/3.job b/src/modules/unpackfs/tests/3.job index 429f65b3c..82d353108 100644 --- a/src/modules/unpackfs/tests/3.job +++ b/src/modules/unpackfs/tests/3.job @@ -1,2 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- unpack: [] diff --git a/src/modules/unpackfs/tests/4.global b/src/modules/unpackfs/tests/4.global index 2e6b37ab5..1c25cbe20 100644 --- a/src/modules/unpackfs/tests/4.global +++ b/src/modules/unpackfs/tests/4.global @@ -1,2 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- rootMountPoint: /tmp/unpackfs-test-run-rootdir3/ diff --git a/src/modules/unpackfs/tests/4.job b/src/modules/unpackfs/tests/4.job index ab76dcbeb..8bc7de5ba 100644 --- a/src/modules/unpackfs/tests/4.job +++ b/src/modules/unpackfs/tests/4.job @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- unpack: - source: . diff --git a/src/modules/unpackfs/tests/5.global b/src/modules/unpackfs/tests/5.global index 2e6b37ab5..1c25cbe20 100644 --- a/src/modules/unpackfs/tests/5.global +++ b/src/modules/unpackfs/tests/5.global @@ -1,2 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- rootMountPoint: /tmp/unpackfs-test-run-rootdir3/ diff --git a/src/modules/unpackfs/tests/5.job b/src/modules/unpackfs/tests/5.job index 2f8d732d0..268ee7ce3 100644 --- a/src/modules/unpackfs/tests/5.job +++ b/src/modules/unpackfs/tests/5.job @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- unpack: - source: ./fakesource diff --git a/src/modules/unpackfs/tests/6.global b/src/modules/unpackfs/tests/6.global index 2e6b37ab5..1c25cbe20 100644 --- a/src/modules/unpackfs/tests/6.global +++ b/src/modules/unpackfs/tests/6.global @@ -1,2 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- rootMountPoint: /tmp/unpackfs-test-run-rootdir3/ diff --git a/src/modules/unpackfs/tests/6.job b/src/modules/unpackfs/tests/6.job index c1110a106..1ec0840ca 100644 --- a/src/modules/unpackfs/tests/6.job +++ b/src/modules/unpackfs/tests/6.job @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- unpack: - source: . diff --git a/src/modules/unpackfs/tests/7.global b/src/modules/unpackfs/tests/7.global index 2e6b37ab5..1c25cbe20 100644 --- a/src/modules/unpackfs/tests/7.global +++ b/src/modules/unpackfs/tests/7.global @@ -1,2 +1,4 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- rootMountPoint: /tmp/unpackfs-test-run-rootdir3/ diff --git a/src/modules/unpackfs/tests/7.job b/src/modules/unpackfs/tests/7.job index a31068e5d..ffd898f1b 100644 --- a/src/modules/unpackfs/tests/7.job +++ b/src/modules/unpackfs/tests/7.job @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- unpack: - source: . diff --git a/src/modules/unpackfs/tests/8.global b/src/modules/unpackfs/tests/8.global index 0cb33ce55..15c308545 100644 --- a/src/modules/unpackfs/tests/8.global +++ b/src/modules/unpackfs/tests/8.global @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- rootMountPoint: /tmp/unpackfs-test-run-rootdir/ localeConf: diff --git a/src/modules/unpackfs/tests/8.job b/src/modules/unpackfs/tests/8.job index a31068e5d..ffd898f1b 100644 --- a/src/modules/unpackfs/tests/8.job +++ b/src/modules/unpackfs/tests/8.job @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 --- unpack: - source: . diff --git a/src/modules/unpackfs/tests/9.global b/src/modules/unpackfs/tests/9.global index 82ca8f6f6..e7a2cd989 100644 --- a/src/modules/unpackfs/tests/9.global +++ b/src/modules/unpackfs/tests/9.global @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # This test uses a small destination FS, to make rsync fail --- rootMountPoint: /tmp/unpackfs-test-run-rootdir3/ diff --git a/src/modules/unpackfs/tests/9.job b/src/modules/unpackfs/tests/9.job index 7eabd497c..b89633471 100644 --- a/src/modules/unpackfs/tests/9.job +++ b/src/modules/unpackfs/tests/9.job @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # This test uses a small destination FS, to make rsync fail --- unpack: diff --git a/src/modules/unpackfs/unpackfs.conf b/src/modules/unpackfs/unpackfs.conf index 454e82e66..2c4a25a80 100644 --- a/src/modules/unpackfs/unpackfs.conf +++ b/src/modules/unpackfs/unpackfs.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Unsquash / unpack a filesystem. Multiple sources are supported, and # they may be squashed or plain filesystems. # diff --git a/src/modules/unpackfs/unpackfs.schema.yaml b/src/modules/unpackfs/unpackfs.schema.yaml index b72a5a69b..66c7c0da8 100644 --- a/src/modules/unpackfs/unpackfs.schema.yaml +++ b/src/modules/unpackfs/unpackfs.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/unpackfs diff --git a/src/modules/users/CMakeLists.txt b/src/modules/users/CMakeLists.txt index 7fffc1eea..5752ae67a 100644 --- a/src/modules/users/CMakeLists.txt +++ b/src/modules/users/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core DBus Network ) find_package( Crypt REQUIRED ) diff --git a/src/modules/users/CheckPWQuality.cpp b/src/modules/users/CheckPWQuality.cpp index 33309df6a..9332c6080 100644 --- a/src/modules/users/CheckPWQuality.cpp +++ b/src/modules/users/CheckPWQuality.cpp @@ -1,19 +1,14 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Contains strings from libpwquality under the terms of the + * GPL-3.0-or-later (libpwquality is BSD-3-clause or GPL-2.0-or-later, + * so we pick GPL-3.0-or-later). * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Calamares is Free Software: see the License-Identifier above. * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CheckPWQuality.h" diff --git a/src/modules/users/CheckPWQuality.h b/src/modules/users/CheckPWQuality.h index 1aeb34ba8..6d7fb56df 100644 --- a/src/modules/users/CheckPWQuality.h +++ b/src/modules/users/CheckPWQuality.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CHECKPWQUALITY_H diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp index de246950f..d0f573286 100644 --- a/src/modules/users/Config.cpp +++ b/src/modules/users/Config.cpp @@ -1,21 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Config.h" @@ -41,6 +30,30 @@ static const QRegExp HOSTNAME_RX( "^[a-zA-Z0-9][-a-zA-Z0-9_]*$" ); static constexpr const int HOSTNAME_MIN_LENGTH = 2; static constexpr const int HOSTNAME_MAX_LENGTH = 63; +static void +updateGSAutoLogin( bool doAutoLogin, const QString& login ) +{ + Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); + + if ( doAutoLogin && !login.isEmpty() ) + { + gs->insert( "autologinUser", login ); + } + else + { + gs->remove( "autologinUser" ); + } + + if ( login.isEmpty() ) + { + gs->remove( "username" ); + } + else + { + gs->insert( "username", login ); + } +} + const NamedEnumTable< HostNameAction >& hostNameActionNames() { @@ -121,15 +134,7 @@ Config::setLoginName( const QString& login ) { if ( login != m_loginName ) { - Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - if ( login.isEmpty() ) - { - gs->remove( "username" ); - } - else - { - gs->insert( "username", login ); - } + updateGSAutoLogin( doAutoLogin(), login ); m_customLoginName = !login.isEmpty(); m_loginName = login; @@ -341,9 +346,9 @@ Config::setFullName( const QString& name ) QString login = makeLoginNameSuggestion( cleanParts ); if ( !login.isEmpty() && login != m_loginName ) { - m_loginName = login; - emit loginNameChanged( login ); - emit loginNameStatusChanged( loginNameStatus() ); + setLoginName( login ); + // It's **still** not custom, though setLoginName() sets that + m_customLoginName = false; } } if ( !m_customHostName ) @@ -351,9 +356,9 @@ Config::setFullName( const QString& name ) QString hostname = makeHostnameSuggestion( cleanParts ); if ( !hostname.isEmpty() && hostname != m_hostName ) { - m_hostName = hostname; - emit hostNameChanged( hostname ); - emit hostNameStatusChanged( hostNameStatus() ); + setHostName( hostname ); + // Still not custom + m_customHostName = false; } } } @@ -364,15 +369,7 @@ Config::setAutoLogin( bool b ) { if ( b != m_doAutoLogin ) { - Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - if ( b ) - { - gs->insert( "autologinUser", loginName() ); - } - else - { - gs->remove( "autologinUser" ); - } + updateGSAutoLogin( b, loginName() ); m_doAutoLogin = b; emit autoLoginChanged( b ); } @@ -711,14 +708,16 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) } std::sort( m_passwordChecks.begin(), m_passwordChecks.end() ); + updateGSAutoLogin( doAutoLogin(), loginName() ); checkReady(); } void Config::finalizeGlobalStorage() const { - Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); + updateGSAutoLogin( doAutoLogin(), loginName() ); + Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); if ( writeRootPassword() ) { gs->insert( "reuseRootPassword", reuseUserPasswordForRoot() ); diff --git a/src/modules/users/Config.h b/src/modules/users/Config.h index 133f59c05..33e82cd89 100644 --- a/src/modules/users/Config.h +++ b/src/modules/users/Config.h @@ -1,21 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef USERS_CONFIG_H diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp index 9a61c5d9e..24b0f36d1 100644 --- a/src/modules/users/CreateUserJob.cpp +++ b/src/modules/users/CreateUserJob.cpp @@ -1,9 +1,8 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE */ #include "CreateUserJob.h" diff --git a/src/modules/users/CreateUserJob.h b/src/modules/users/CreateUserJob.h index f2239307e..0a46198b9 100644 --- a/src/modules/users/CreateUserJob.h +++ b/src/modules/users/CreateUserJob.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CREATEUSERJOB_H diff --git a/src/modules/users/SetHostNameJob.cpp b/src/modules/users/SetHostNameJob.cpp index a4cfa0268..9f81ddfb5 100644 --- a/src/modules/users/SetHostNameJob.cpp +++ b/src/modules/users/SetHostNameJob.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Rohan Garg - * Copyright 2015, Teo Mrnjavac - * Copyright 2018, 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Rohan Garg + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "SetHostNameJob.h" @@ -25,11 +16,11 @@ #include "utils/CalamaresUtilsSystem.h" #include "utils/Logger.h" -#include -#include #include #include #include +#include +#include using WriteMode = CalamaresUtils::System::WriteMode; diff --git a/src/modules/users/SetHostNameJob.h b/src/modules/users/SetHostNameJob.h index 5d52b545b..9d44579cb 100644 --- a/src/modules/users/SetHostNameJob.h +++ b/src/modules/users/SetHostNameJob.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Rohan Garg - * Copyright 2015, Teo Mrnjavac - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Rohan Garg + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef SETHOSTNAMEJOB_CPP_H diff --git a/src/modules/users/SetPasswordJob.cpp b/src/modules/users/SetPasswordJob.cpp index 3199a0a76..dd2fdc244 100644 --- a/src/modules/users/SetPasswordJob.cpp +++ b/src/modules/users/SetPasswordJob.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "SetPasswordJob.h" diff --git a/src/modules/users/SetPasswordJob.h b/src/modules/users/SetPasswordJob.h index cf5b2f585..aa75a86e1 100644 --- a/src/modules/users/SetPasswordJob.h +++ b/src/modules/users/SetPasswordJob.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef SETPASSWORDJOB_H diff --git a/src/modules/users/TestCreateUserJob.cpp b/src/modules/users/TestCreateUserJob.cpp index 93dc8967e..a801baf45 100644 --- a/src/modules/users/TestCreateUserJob.cpp +++ b/src/modules/users/TestCreateUserJob.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "CreateUserJob.h" diff --git a/src/modules/users/TestPasswordJob.cpp b/src/modules/users/TestPasswordJob.cpp index 8677f88c2..1409e37b6 100644 --- a/src/modules/users/TestPasswordJob.cpp +++ b/src/modules/users/TestPasswordJob.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2017 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "SetPasswordJob.h" diff --git a/src/modules/users/TestSetHostNameJob.cpp b/src/modules/users/TestSetHostNameJob.cpp index 0e887a5f1..17061037f 100644 --- a/src/modules/users/TestSetHostNameJob.cpp +++ b/src/modules/users/TestSetHostNameJob.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "SetHostNameJob.h" diff --git a/src/modules/users/Tests.cpp b/src/modules/users/Tests.cpp index f0fc91165..78fa74780 100644 --- a/src/modules/users/Tests.cpp +++ b/src/modules/users/Tests.cpp @@ -1,20 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Adriaan de Groot * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Config.h" @@ -116,15 +106,16 @@ UserTests::testDefaultGroups() } } -void UserTests::testDefaultGroupsYAML_data() +void +UserTests::testDefaultGroupsYAML_data() { QTest::addColumn< QString >( "filename" ); - QTest::addColumn< int >("count"); - QTest::addColumn("group"); + QTest::addColumn< int >( "count" ); + QTest::addColumn< QString >( "group" ); - QTest::newRow("users.conf") << "users.conf" << 7 << "video"; - QTest::newRow("dashed list") << "tests/4-audio.conf" << 4 << "audio"; - QTest::newRow("blocked list") << "tests/3-wing.conf" << 3 << "wing"; + QTest::newRow( "users.conf" ) << "users.conf" << 7 << "video"; + QTest::newRow( "dashed list" ) << "tests/4-audio.conf" << 4 << "audio"; + QTest::newRow( "blocked list" ) << "tests/3-wing.conf" << 3 << "wing"; } void @@ -135,23 +126,23 @@ UserTests::testDefaultGroupsYAML() (void)new Calamares::JobQueue(); } - QFETCH(QString, filename); - QFETCH(int, count); - QFETCH(QString, group); + QFETCH( QString, filename ); + QFETCH( int, count ); + QFETCH( QString, group ); - QFile fi( QString("%1/%2").arg(BUILD_AS_TEST, filename) ); - QVERIFY(fi.exists()); + QFile fi( QString( "%1/%2" ).arg( BUILD_AS_TEST, filename ) ); + QVERIFY( fi.exists() ); bool ok = false; - const auto map = CalamaresUtils::loadYaml(fi, &ok); - QVERIFY(ok); - QVERIFY(map.count() > 0); + const auto map = CalamaresUtils::loadYaml( fi, &ok ); + QVERIFY( ok ); + QVERIFY( map.count() > 0 ); - Config c; - c.setConfigurationMap(map); + Config c; + c.setConfigurationMap( map ); - QCOMPARE( c.defaultGroups().count(), count); - QVERIFY( c.defaultGroups().contains( group ) ); + QCOMPARE( c.defaultGroups().count(), count ); + QVERIFY( c.defaultGroups().contains( group ) ); } diff --git a/src/modules/users/UsersPage.cpp b/src/modules/users/UsersPage.cpp index ad0c448d5..6ea03f8ef 100644 --- a/src/modules/users/UsersPage.cpp +++ b/src/modules/users/UsersPage.cpp @@ -1,26 +1,17 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot - * Copyright 2019, Collabora Ltd - * Copyright 2020, Gabriel Craciunescu + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-FileCopyrightText: 2020 Gabriel Craciunescu + * SPDX-License-Identifier: GPL-3.0-or-later * * Portions from the Manjaro Installation Framework * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "UsersPage.h" @@ -54,7 +45,8 @@ static inline void labelOk( QLabel* pix, QLabel* label ) { label->clear(); - pix->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::StatusOk, CalamaresUtils::Original, label->size() ) ); + pix->setPixmap( + CalamaresUtils::defaultPixmap( CalamaresUtils::StatusOk, CalamaresUtils::Original, label->size() ) ); } /** @brief Sets error or ok on a label depending on @p status and @p value @@ -92,12 +84,6 @@ UsersPage::UsersPage( Config* config, QWidget* parent ) { ui->setupUi( this ); - ui->checkBoxReusePassword->setVisible( m_config->writeRootPassword() ); - ui->checkBoxReusePassword->setChecked( m_config->reuseUserPasswordForRoot() ); - - ui->checkBoxValidatePassword->setVisible( m_config->permitWeakPasswords() ); - ui->checkBoxValidatePassword->setChecked( m_config->requireStrongPasswords() ); - // Connect signals and slots ui->textBoxUserPassword->setText( config->userPassword() ); connect( ui->textBoxUserPassword, &QLineEdit::textChanged, config, &Config::setUserPassword ); @@ -115,10 +101,6 @@ UsersPage::UsersPage( Config* config, QWidget* parent ) connect( config, &Config::rootPasswordSecondaryChanged, ui->textBoxVerifiedRootPassword, &QLineEdit::setText ); connect( config, &Config::rootPasswordStatusChanged, this, &UsersPage::reportRootPasswordStatus ); - connect( ui->checkBoxValidatePassword, &QCheckBox::stateChanged, this, [this]( int checked ) { - m_config->setRequireStrongPasswords( checked != Qt::Unchecked ); - } ); - connect( ui->textBoxFullName, &QLineEdit::textEdited, config, &Config::setFullName ); connect( config, &Config::fullNameChanged, this, &UsersPage::onFullNameTextEdited ); @@ -130,26 +112,29 @@ UsersPage::UsersPage( Config* config, QWidget* parent ) connect( config, &Config::loginNameChanged, ui->textBoxLoginName, &QLineEdit::setText ); connect( config, &Config::loginNameStatusChanged, this, &UsersPage::reportLoginNameStatus ); + ui->checkBoxDoAutoLogin->setChecked( m_config->doAutoLogin() ); connect( ui->checkBoxDoAutoLogin, &QCheckBox::stateChanged, this, [this]( int checked ) { m_config->setAutoLogin( checked != Qt::Unchecked ); } ); connect( config, &Config::autoLoginChanged, ui->checkBoxDoAutoLogin, &QCheckBox::setChecked ); + ui->checkBoxReusePassword->setVisible( m_config->writeRootPassword() ); + ui->checkBoxReusePassword->setChecked( m_config->reuseUserPasswordForRoot() ); if ( m_config->writeRootPassword() ) { - connect( ui->checkBoxReusePassword, &QCheckBox::stateChanged, this, [this]( int checked ) { - m_config->setReuseUserPasswordForRoot( checked != Qt::Unchecked ); - } ); connect( config, &Config::reuseUserPasswordForRootChanged, ui->checkBoxReusePassword, &QCheckBox::setChecked ); connect( ui->checkBoxReusePassword, &QCheckBox::stateChanged, this, &UsersPage::onReuseUserPasswordChanged ); } + ui->checkBoxRequireStrongPassword->setVisible( m_config->permitWeakPasswords() ); + ui->checkBoxRequireStrongPassword->setChecked( m_config->requireStrongPasswords() ); if ( m_config->permitWeakPasswords() ) { - connect( ui->checkBoxValidatePassword, &QCheckBox::stateChanged, this, [this]( int checked ) { + connect( ui->checkBoxRequireStrongPassword, &QCheckBox::stateChanged, this, [this]( int checked ) { m_config->setRequireStrongPasswords( checked != Qt::Unchecked ); } ); - connect( config, &Config::requireStrongPasswordsChanged, ui->checkBoxValidatePassword, &QCheckBox::setChecked ); + connect( + config, &Config::requireStrongPasswordsChanged, ui->checkBoxRequireStrongPassword, &QCheckBox::setChecked ); } CALAMARES_RETRANSLATE_SLOT( &UsersPage::retranslate ) @@ -249,6 +234,8 @@ UsersPage::reportUserPasswordStatus( int validity, const QString& message ) void UsersPage::onReuseUserPasswordChanged( const int checked ) { + // Pass the change on to config + m_config->setReuseUserPasswordForRoot( checked != Qt::Unchecked ); /* When "reuse" is checked, hide the fields for explicitly * entering the root password. However, if we're going to * disable the root password anyway, hide them all regardless of diff --git a/src/modules/users/UsersPage.h b/src/modules/users/UsersPage.h index 246a08083..f4d2c47d4 100644 --- a/src/modules/users/UsersPage.h +++ b/src/modules/users/UsersPage.h @@ -1,24 +1,16 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc. + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * * Portions from the Manjaro Installation Framework * by Roland Singer * Copyright (C) 2007 Free Software Foundation, Inc. * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef USERSPAGE_H diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp index df77da036..df823df06 100644 --- a/src/modules/users/UsersViewStep.cpp +++ b/src/modules/users/UsersViewStep.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot - * Copyright 2017, Gabriel Craciunescu + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Gabriel Craciunescu + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "UsersViewStep.h" diff --git a/src/modules/users/UsersViewStep.h b/src/modules/users/UsersViewStep.h index baf4e6292..a03948adf 100644 --- a/src/modules/users/UsersViewStep.h +++ b/src/modules/users/UsersViewStep.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef USERSPAGEPLUGIN_H diff --git a/src/modules/users/images/invalid.png.license b/src/modules/users/images/invalid.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/src/modules/users/images/invalid.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/users/images/valid.png.license b/src/modules/users/images/valid.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/src/modules/users/images/valid.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/users/page_usersetup.ui b/src/modules/users/page_usersetup.ui index d880673b8..ba1c0bc7d 100644 --- a/src/modules/users/page_usersetup.ui +++ b/src/modules/users/page_usersetup.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + Page_UserSetup @@ -446,7 +450,7 @@ - + When this box is checked, password-strength checking is done and you will not be able to use a weak password. diff --git a/src/modules/users/tests/3-wing.conf b/src/modules/users/tests/3-wing.conf index 3c7dc61af..4fc760fa8 100644 --- a/src/modules/users/tests/3-wing.conf +++ b/src/modules/users/tests/3-wing.conf @@ -1,2 +1,5 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# --- defaultGroups: [ wing, wheel, users ] diff --git a/src/modules/users/tests/4-audio.conf b/src/modules/users/tests/4-audio.conf index fb7fdb3d2..1280bc207 100644 --- a/src/modules/users/tests/4-audio.conf +++ b/src/modules/users/tests/4-audio.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# --- defaultGroups: - users diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 259723df2..ee1ccbf1c 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the one-user-system user module. # # Besides these settings, the user module also places the following diff --git a/src/modules/users/users.schema.yaml b/src/modules/users/users.schema.yaml index 44cb9f71c..310df350f 100644 --- a/src/modules/users/users.schema.yaml +++ b/src/modules/users/users.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/users diff --git a/src/modules/usersq/CMakeLists.txt b/src/modules/usersq/CMakeLists.txt index d780ec9c4..26c270bfb 100644 --- a/src/modules/usersq/CMakeLists.txt +++ b/src/modules/usersq/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# if( NOT WITH_QML ) calamares_skip_module( "usersq (QML is not supported in this build)" ) return() diff --git a/src/modules/usersq/UsersQmlViewStep.cpp b/src/modules/usersq/UsersQmlViewStep.cpp index 963383c10..b83c66f45 100644 --- a/src/modules/usersq/UsersQmlViewStep.cpp +++ b/src/modules/usersq/UsersQmlViewStep.cpp @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot - * Copyright 2017, Gabriel Craciunescu - * Copyright 2020, Camilo Higuita + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Gabriel Craciunescu + * SPDX-FileCopyrightText: 2020 Camilo Higuita + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "UsersQmlViewStep.h" @@ -34,8 +25,8 @@ CALAMARES_PLUGIN_FACTORY_DEFINITION( UsersQmlViewStepFactory, registerPlugin< UsersQmlViewStep >(); ) UsersQmlViewStep::UsersQmlViewStep( QObject* parent ) -: Calamares::QmlViewStep( parent ) -, m_config( new Config(this) ) + : Calamares::QmlViewStep( parent ) + , m_config( new Config( this ) ) { connect( m_config, &Config::readyChanged, this, &UsersQmlViewStep::nextStatusChanged ); @@ -105,6 +96,6 @@ UsersQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { m_config->setConfigurationMap( configurationMap ); - Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last + Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last setContextProperty( "Users", m_config ); } diff --git a/src/modules/usersq/UsersQmlViewStep.h b/src/modules/usersq/UsersQmlViewStep.h index 463698199..33a1f5754 100644 --- a/src/modules/usersq/UsersQmlViewStep.h +++ b/src/modules/usersq/UsersQmlViewStep.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot - * Copyright 2020, Camilo Higuita + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Camilo Higuita + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef USERSQMLVIEWSTEP_H @@ -28,8 +19,8 @@ #include -#include #include "Config.h" +#include class PLUGINDLLEXPORT UsersQmlViewStep : public Calamares::QmlViewStep { @@ -53,13 +44,10 @@ public: void setConfigurationMap( const QVariantMap& configurationMap ) override; - QObject * getConfig() override - { - return m_config; - } + QObject* getConfig() override { return m_config; } private: - Config *m_config; + Config* m_config; Calamares::JobList m_jobs; }; diff --git a/src/modules/usersq/usersq.conf b/src/modules/usersq/usersq.conf index f416a5c39..19a30bd02 100644 --- a/src/modules/usersq/usersq.conf +++ b/src/modules/usersq/usersq.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # For documentation see Users Module users.conf # --- diff --git a/src/modules/usersq/usersq.qml b/src/modules/usersq/usersq.qml index 64cbea85e..dcc4aa76a 100644 --- a/src/modules/usersq/usersq.qml +++ b/src/modules/usersq/usersq.qml @@ -1,21 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * * SPDX-FileCopyrightText: 2020 Anke Boersma * SPDX-License-Identifier: GPL-3.0-or-later - * License-Filename: LICENSE * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ import io.calamares.core 1.0 @@ -32,7 +21,7 @@ Kirigami.ScrollablePage { width: parent.width height: parent.height - + Kirigami.Theme.backgroundColor: "#EFF0F1" Kirigami.Theme.textColor: "#1F1F1F" @@ -219,7 +208,7 @@ Kirigami.ScrollablePage { color: "#6D6D6D" } } - + CheckBox { visible: config.allowWeakPasswords @@ -256,7 +245,7 @@ Kirigami.ScrollablePage { //checked: false onToggled: config.reuseUserPasswordForRoot = !config.reuseUserPasswordForRoot } - + Label { visible: root.checked diff --git a/src/modules/webview/CMakeLists.txt b/src/modules/webview/CMakeLists.txt index 48c707783..8de5e690c 100644 --- a/src/modules/webview/CMakeLists.txt +++ b/src/modules/webview/CMakeLists.txt @@ -1,3 +1,8 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# set( CALA_WEBVIEW_INCLUDE_DIRECTORIES ${PROJECT_BINARY_DIR}/src/libcalamaresui ) set( CALA_WEBVIEW_LINK_LIBRARIES calamaresui ) diff --git a/src/modules/webview/WebViewConfig.h.in b/src/modules/webview/WebViewConfig.h.in index 6611e44c0..ddc07b31c 100644 --- a/src/modules/webview/WebViewConfig.h.in +++ b/src/modules/webview/WebViewConfig.h.in @@ -1,3 +1,6 @@ +/* SPDX-FileCopyrightText: no + SPDX-License-Identifier: CC0-1.0 +*/ #ifndef CALAMARESWEBVIEWCONFIG_H #define CALAMARESWEBVIEWCONFIG_H diff --git a/src/modules/webview/WebViewStep.cpp b/src/modules/webview/WebViewStep.cpp index 50c270b09..8e7c48f1a 100644 --- a/src/modules/webview/WebViewStep.cpp +++ b/src/modules/webview/WebViewStep.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Rohan Garg - * Copyright 2016, Teo Mrnjavac + * SPDX-FileCopyrightText: 2015 Rohan Garg + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "WebViewStep.h" @@ -28,7 +19,7 @@ #include #endif -CALAMARES_PLUGIN_FACTORY_DEFINITION( WebViewStepFactory, registerPlugin(); ) +CALAMARES_PLUGIN_FACTORY_DEFINITION( WebViewStepFactory, registerPlugin< WebViewStep >(); ) WebViewStep::WebViewStep( QObject* parent ) : Calamares::ViewStep( parent ) @@ -40,13 +31,9 @@ WebViewStep::WebViewStep( QObject* parent ) m_view = new C_QWEBVIEW(); #ifdef WEBVIEW_WITH_WEBKIT m_view->settings()->setFontFamily( QWebSettings::StandardFont, - m_view->settings()-> - fontFamily( QWebSettings::SansSerifFont ) ); - m_view->setRenderHints( QPainter::Antialiasing | - QPainter::TextAntialiasing | - QPainter::HighQualityAntialiasing | - QPainter::SmoothPixmapTransform | - QPainter::NonCosmeticDefaultPen ); + m_view->settings()->fontFamily( QWebSettings::SansSerifFont ) ); + m_view->setRenderHints( QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::HighQualityAntialiasing + | QPainter::SmoothPixmapTransform | QPainter::NonCosmeticDefaultPen ); #endif } @@ -54,7 +41,9 @@ WebViewStep::WebViewStep( QObject* parent ) WebViewStep::~WebViewStep() { if ( m_view && m_view->parent() == nullptr ) + { m_view->deleteLater(); + } } @@ -99,10 +88,11 @@ WebViewStep::isAtEnd() const return true; } -void WebViewStep::onActivate() +void +WebViewStep::onActivate() { - m_view->load(QUrl(m_url)); - m_view->show(); + m_view->load( QUrl( m_url ) ); + m_view->show(); } QList< Calamares::job_ptr > @@ -115,11 +105,14 @@ WebViewStep::jobs() const void WebViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { - if ( configurationMap.contains("url") && - configurationMap.value("url").type() == QVariant::String ) - m_url = configurationMap.value("url").toString(); + if ( configurationMap.contains( "url" ) && configurationMap.value( "url" ).type() == QVariant::String ) + { + m_url = configurationMap.value( "url" ).toString(); + } - if ( configurationMap.contains("prettyName") && - configurationMap.value("prettyName").type() == QVariant::String ) - m_prettyName = configurationMap.value("prettyName").toString(); + if ( configurationMap.contains( "prettyName" ) + && configurationMap.value( "prettyName" ).type() == QVariant::String ) + { + m_prettyName = configurationMap.value( "prettyName" ).toString(); + } } diff --git a/src/modules/webview/WebViewStep.h b/src/modules/webview/WebViewStep.h index a97d465de..691672211 100644 --- a/src/modules/webview/WebViewStep.h +++ b/src/modules/webview/WebViewStep.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2015, Rohan Garg - * Copyright 2016, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2015 Rohan Garg + * SPDX-FileCopyrightText: 2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef WEBVIEWPLUGIN_H @@ -23,17 +14,23 @@ #include "WebViewConfig.h" +#include "DllMacro.h" #include "utils/PluginFactory.h" #include "viewpages/ViewStep.h" -#include "DllMacro.h" - #include #ifdef WEBVIEW_WITH_WEBKIT -#define C_QWEBVIEW QWebView -#else -#define C_QWEBVIEW QWebEngineView +# define C_QWEBVIEW QWebView +#endif +#ifdef WEBVIEW_WITH_WEBENGINE +# ifdef C_QWEBVIEW +# error Both WEBENGINE and WEBKIT enabled +# endif +# define C_QWEBVIEW QWebEngineView +#endif +#ifndef C_QWEBVIEW +# error Neither WEBENGINE nor WEBKIT enabled #endif class C_QWEBVIEW; @@ -63,11 +60,11 @@ public: void setConfigurationMap( const QVariantMap& configurationMap ) override; private: - C_QWEBVIEW *m_view; + C_QWEBVIEW* m_view; QString m_url; QString m_prettyName; }; CALAMARES_PLUGIN_FACTORY_DECLARATION( WebViewStepFactory ) -#endif // WEBVIEWPLUGIN_H +#endif // WEBVIEWPLUGIN_H diff --git a/src/modules/webview/owncloud.conf b/src/modules/webview/owncloud.conf index 46b639ade..4e2930919 100644 --- a/src/modules/webview/owncloud.conf +++ b/src/modules/webview/owncloud.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# --- prettyName: "OwnCloud" url: "https://owncloud.org" diff --git a/src/modules/webview/webview.conf b/src/modules/webview/webview.conf index c4e6568e9..353f81488 100644 --- a/src/modules/webview/webview.conf +++ b/src/modules/webview/webview.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# --- prettyName: "Webview" url: "https://calamares.io" diff --git a/src/modules/welcome/CMakeLists.txt b/src/modules/welcome/CMakeLists.txt index 9700b1601..a468af102 100644 --- a/src/modules/welcome/CMakeLists.txt +++ b/src/modules/welcome/CMakeLists.txt @@ -1,5 +1,8 @@ -include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) - +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED DBus Network ) find_package( LIBPARTED ) diff --git a/src/modules/welcome/Config.cpp b/src/modules/welcome/Config.cpp index 2bf418ff1..d4641562a 100644 --- a/src/modules/welcome/Config.cpp +++ b/src/modules/welcome/Config.cpp @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "Config.h" diff --git a/src/modules/welcome/Config.h b/src/modules/welcome/Config.h index 6d14097c5..a3f1276a6 100644 --- a/src/modules/welcome/Config.h +++ b/src/modules/welcome/Config.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef WELCOME_CONFIG_H diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index 0c4f44c95..aa9e9d7bb 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2015, Anke Boersma - * Copyright 2017-2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2015 Anke Boersma + * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "WelcomePage.h" @@ -48,7 +39,7 @@ WelcomePage::WelcomePage( Config* conf, QWidget* parent ) : QWidget( parent ) , ui( new Ui::WelcomePage ) - , m_checkingWidget( new CheckerContainer( *(conf->requirementsModel()), this ) ) + , m_checkingWidget( new CheckerContainer( *( conf->requirementsModel() ), this ) ) , m_languages( nullptr ) , m_conf( conf ) { diff --git a/src/modules/welcome/WelcomePage.h b/src/modules/welcome/WelcomePage.h index 17fedc812..04c17d25f 100644 --- a/src/modules/welcome/WelcomePage.h +++ b/src/modules/welcome/WelcomePage.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac - * Copyright 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef WELCOMEPAGE_H diff --git a/src/modules/welcome/WelcomePage.ui b/src/modules/welcome/WelcomePage.ui index 04b89f256..9460a6c56 100644 --- a/src/modules/welcome/WelcomePage.ui +++ b/src/modules/welcome/WelcomePage.ui @@ -1,5 +1,9 @@ + +SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org> +SPDX-License-Identifier: GPL-3.0-or-later + WelcomePage diff --git a/src/modules/welcome/WelcomeViewStep.cpp b/src/modules/welcome/WelcomeViewStep.cpp index cad5349a9..2a0d57bc4 100644 --- a/src/modules/welcome/WelcomeViewStep.cpp +++ b/src/modules/welcome/WelcomeViewStep.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "WelcomeViewStep.h" diff --git a/src/modules/welcome/WelcomeViewStep.h b/src/modules/welcome/WelcomeViewStep.h index f4874dc16..16eec6d29 100644 --- a/src/modules/welcome/WelcomeViewStep.h +++ b/src/modules/welcome/WelcomeViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef WELCOMEVIEWSTEP_H diff --git a/src/modules/welcome/checker/CheckerContainer.cpp b/src/modules/welcome/checker/CheckerContainer.cpp index 11ae9c7c3..0dcd820a3 100644 --- a/src/modules/welcome/checker/CheckerContainer.cpp +++ b/src/modules/welcome/checker/CheckerContainer.cpp @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017, 2019-2020, Adriaan de Groot - * Copyright 2017, Gabriel Craciunescu + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Gabriel Craciunescu + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /* Based on code extracted from RequirementsChecker.cpp */ diff --git a/src/modules/welcome/checker/CheckerContainer.h b/src/modules/welcome/checker/CheckerContainer.h index 9744ecc77..c721f2b36 100644 --- a/src/modules/welcome/checker/CheckerContainer.h +++ b/src/modules/welcome/checker/CheckerContainer.h @@ -1,21 +1,12 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot - * Copyright 2017, Gabriel Craciunescu + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Gabriel Craciunescu + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /* Based on code extracted from RequirementsChecker.cpp */ diff --git a/src/modules/welcome/checker/GeneralRequirements.cpp b/src/modules/welcome/checker/GeneralRequirements.cpp index e7994f9a0..a10585af9 100644 --- a/src/modules/welcome/checker/GeneralRequirements.cpp +++ b/src/modules/welcome/checker/GeneralRequirements.cpp @@ -1,22 +1,13 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017-2018, 2020, Adriaan de Groot - * Copyright 2017, Gabriel Craciunescu - * Copyright 2019, Collabora Ltd + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Gabriel Craciunescu + * SPDX-FileCopyrightText: 2019 Collabora Ltd + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "GeneralRequirements.h" @@ -155,10 +146,8 @@ GeneralRequirements::checkRequirements() { checkEntries.append( { entry, - [ req = m_requiredStorageGiB ] { - return tr( "has at least %1 GiB available drive space" ).arg( req ); - }, - [ req = m_requiredStorageGiB ] { + [req = m_requiredStorageGiB] { return tr( "has at least %1 GiB available drive space" ).arg( req ); }, + [req = m_requiredStorageGiB] { return tr( "There is not enough drive space. At least %1 GiB is required." ).arg( req ); }, enoughStorage, @@ -168,8 +157,8 @@ GeneralRequirements::checkRequirements() { checkEntries.append( { entry, - [ req = m_requiredRamGiB ] { return tr( "has at least %1 GiB working memory" ).arg( req ); }, - [ req = m_requiredRamGiB ] { + [req = m_requiredRamGiB] { return tr( "has at least %1 GiB working memory" ).arg( req ); }, + [req = m_requiredRamGiB] { return tr( "The system does not have enough working memory. At least %1 GiB is required." ) .arg( req ); }, @@ -358,7 +347,7 @@ GeneralRequirements::checkEnoughRam( qint64 requiredRam ) // Ignore the guesstimate-factor; we get an under-estimate // which is probably the usable RAM for programs. quint64 availableRam = CalamaresUtils::System::instance()->getTotalMemoryB().first; - return double(availableRam) >= double(requiredRam) * 0.95; // cast to silence 64-bit-int conversion to double + return double( availableRam ) >= double( requiredRam ) * 0.95; // cast to silence 64-bit-int conversion to double } diff --git a/src/modules/welcome/checker/GeneralRequirements.h b/src/modules/welcome/checker/GeneralRequirements.h index ce3abec83..b6646da11 100644 --- a/src/modules/welcome/checker/GeneralRequirements.h +++ b/src/modules/welcome/checker/GeneralRequirements.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef GENERALREQUIREMENTS_H diff --git a/src/modules/welcome/checker/ResultWidget.cpp b/src/modules/welcome/checker/ResultWidget.cpp index 5da120a2a..ef3a7fdc1 100644 --- a/src/modules/welcome/checker/ResultWidget.cpp +++ b/src/modules/welcome/checker/ResultWidget.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ResultWidget.h" diff --git a/src/modules/welcome/checker/ResultWidget.h b/src/modules/welcome/checker/ResultWidget.h index f84310bb6..d77c0d9bb 100644 --- a/src/modules/welcome/checker/ResultWidget.h +++ b/src/modules/welcome/checker/ResultWidget.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, 2019, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CHECKER_RESULTWIDGET_H diff --git a/src/modules/welcome/checker/ResultsListWidget.cpp b/src/modules/welcome/checker/ResultsListWidget.cpp index afde9f08d..1ad2c1b29 100644 --- a/src/modules/welcome/checker/ResultsListWidget.cpp +++ b/src/modules/welcome/checker/ResultsListWidget.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2017, 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "ResultsListWidget.h" diff --git a/src/modules/welcome/checker/ResultsListWidget.h b/src/modules/welcome/checker/ResultsListWidget.h index 3f21955ba..aa6c62258 100644 --- a/src/modules/welcome/checker/ResultsListWidget.h +++ b/src/modules/welcome/checker/ResultsListWidget.h @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef CHECKER_RESULTSLISTWIDGET_H diff --git a/src/modules/welcome/checker/partman_devices.c b/src/modules/welcome/checker/partman_devices.c index 4fd3dd4c0..7cde7a86d 100644 --- a/src/modules/welcome/checker/partman_devices.c +++ b/src/modules/welcome/checker/partman_devices.c @@ -1,24 +1,19 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * * Based on parted_devices.c, from partman-base. * * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ +/* This is third-party ancient C code. Don't format it. */ +/* *INDENT-OFF* */ +/* clang-format off */ + #include "partman_devices.h" #include diff --git a/src/modules/welcome/checker/partman_devices.h b/src/modules/welcome/checker/partman_devices.h index 9f7695ee9..c894f6534 100644 --- a/src/modules/welcome/checker/partman_devices.h +++ b/src/modules/welcome/checker/partman_devices.h @@ -1,32 +1,24 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * SPDX-FileCopyrightText: 2014 Teo Mrnjavac + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef PARTMAN_DEVICES_H #define PARTMAN_DEVICES_H #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -int check_big_enough(long long required_space); + int check_big_enough( long long required_space ); #ifdef __cplusplus } // extern "C" #endif -#endif // PARTMAN_DEVICES_H +#endif // PARTMAN_DEVICES_H diff --git a/src/modules/welcome/language-icon-128px.png.license b/src/modules/welcome/language-icon-128px.png.license new file mode 100644 index 000000000..bc39975ae --- /dev/null +++ b/src/modules/welcome/language-icon-128px.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2011 Farhat Datta and Onur Mustak Cobanli, http://www.languageicon.org/ +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/welcome/language-icon-48px.png.license b/src/modules/welcome/language-icon-48px.png.license new file mode 100644 index 000000000..bc39975ae --- /dev/null +++ b/src/modules/welcome/language-icon-48px.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2011 Farhat Datta and Onur Mustak Cobanli, http://www.languageicon.org/ +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/welcome/welcome.conf b/src/modules/welcome/welcome.conf index 45cb654a2..bd15a6f2d 100644 --- a/src/modules/welcome/welcome.conf +++ b/src/modules/welcome/welcome.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the welcome module. The welcome page # displays some information from the branding file. # Which parts it displays can be configured through diff --git a/src/modules/welcome/welcome.schema.yaml b/src/modules/welcome/welcome.schema.yaml index 56a79be06..fbebcd968 100644 --- a/src/modules/welcome/welcome.schema.yaml +++ b/src/modules/welcome/welcome.schema.yaml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later --- $schema: https://json-schema.org/schema# $id: https://calamares.io/schemas/welcome diff --git a/src/modules/welcomeq/CMakeLists.txt b/src/modules/welcomeq/CMakeLists.txt index 4a040344e..c9cafe7a8 100644 --- a/src/modules/welcomeq/CMakeLists.txt +++ b/src/modules/welcomeq/CMakeLists.txt @@ -1,3 +1,9 @@ +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + # This is a re-write of the welcome module using QML view steps # instead of widgets. diff --git a/src/modules/welcomeq/Recommended.qml b/src/modules/welcomeq/Recommended.qml index 5a6c1316d..1afc60950 100644 --- a/src/modules/welcomeq/Recommended.qml +++ b/src/modules/welcomeq/Recommended.qml @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Anke Boersma - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /* THIS COMPONENT IS UNUSED -- from the default welcomeq.qml at least */ diff --git a/src/modules/welcomeq/Requirements.qml b/src/modules/welcomeq/Requirements.qml index e7835d868..159d88446 100644 --- a/src/modules/welcomeq/Requirements.qml +++ b/src/modules/welcomeq/Requirements.qml @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Anke Boersma - * Copyright 2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ import io.calamares.core 1.0 diff --git a/src/modules/welcomeq/WelcomeQmlViewStep.cpp b/src/modules/welcomeq/WelcomeQmlViewStep.cpp index 42944f20d..af32f2992 100644 --- a/src/modules/welcomeq/WelcomeQmlViewStep.cpp +++ b/src/modules/welcomeq/WelcomeQmlViewStep.cpp @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2014-2015, Teo Mrnjavac - * Copyright 2018,2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #include "WelcomeQmlViewStep.h" @@ -38,9 +29,9 @@ WelcomeQmlViewStep::WelcomeQmlViewStep( QObject* parent ) , m_requirementsChecker( new GeneralRequirements( this ) ) { connect( Calamares::ModuleManager::instance(), - &Calamares::ModuleManager::requirementsComplete, - this, - &WelcomeQmlViewStep::nextStatusChanged ); + &Calamares::ModuleManager::requirementsComplete, + this, + &WelcomeQmlViewStep::nextStatusChanged ); } diff --git a/src/modules/welcomeq/WelcomeQmlViewStep.h b/src/modules/welcomeq/WelcomeQmlViewStep.h index 78999986c..4c68ea2ae 100644 --- a/src/modules/welcomeq/WelcomeQmlViewStep.h +++ b/src/modules/welcomeq/WelcomeQmlViewStep.h @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2019-2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ #ifndef WELCOME_QMLVIEWSTEP_H diff --git a/src/modules/welcomeq/about.qml b/src/modules/welcomeq/about.qml index 7fa6fb462..21050c4ea 100644 --- a/src/modules/welcomeq/about.qml +++ b/src/modules/welcomeq/about.qml @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ import io.calamares.ui 1.0 @@ -26,7 +17,7 @@ Item { width: parent.width height: parent.height focus: true - + property var appName: "Calamares" property var appVersion: "3.2.24" @@ -36,19 +27,19 @@ Item { y: 14 anchors.fill: parent color: "#f2f2f2" - + Column { id: column x: 130 y: 40 - + Rectangle { width: 560 height: 250 radius: 10 border.width: 0 - + Text { width: 400 height: 250 @@ -58,25 +49,25 @@ Item { for %3

Copyright 2014-2017 Teo Mrnjavac <teo@kde.org>
Copyright 2017-2020 Adriaan de Groot <groot@kde.org>
- Thanks to the Calamares team - and the Calamares + Thanks to the Calamares team + and the Calamares translators team.

- Calamares + Calamares development is sponsored by
- Blue Systems - + Blue Systems - Liberating Software." ) .arg(appName) .arg(appVersion) .arg(Branding.string(Branding.VersionedName)) - + onLinkActivated: Qt.openUrlExternally(link) - + MouseArea { anchors.fill: parent acceptedButtons: Qt.NoButton cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor } - + font.pointSize: 10 anchors.verticalCenterOffset: 10 anchors.horizontalCenterOffset: 40 diff --git a/src/modules/welcomeq/img/chevron-left-solid.svg.license b/src/modules/welcomeq/img/chevron-left-solid.svg.license new file mode 100644 index 000000000..5f43e650d --- /dev/null +++ b/src/modules/welcomeq/img/chevron-left-solid.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2020 demmm +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/welcomeq/img/language-icon-48px.png.license b/src/modules/welcomeq/img/language-icon-48px.png.license new file mode 100644 index 000000000..bc39975ae --- /dev/null +++ b/src/modules/welcomeq/img/language-icon-48px.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2011 Farhat Datta and Onur Mustak Cobanli, http://www.languageicon.org/ +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/welcomeq/img/squid.png.license b/src/modules/welcomeq/img/squid.png.license new file mode 100644 index 000000000..cc08e1f9f --- /dev/null +++ b/src/modules/welcomeq/img/squid.png.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2014 Teo Mrnjavac +SPDX-License-Identifier: GPL-3.0-or-later diff --git a/src/modules/welcomeq/release_notes.qml b/src/modules/welcomeq/release_notes.qml index ce9d1d4af..6da5bc7c9 100644 --- a/src/modules/welcomeq/release_notes.qml +++ b/src/modules/welcomeq/release_notes.qml @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ import io.calamares.ui 1.0 @@ -33,9 +24,9 @@ Rectangle { id: flick anchors.fill: parent contentHeight: 3500 - + ScrollBar.vertical: ScrollBar { - id: fscrollbar + id: fscrollbar width: 10 policy: ScrollBar.AlwaysOn } diff --git a/src/modules/welcomeq/welcomeq.conf b/src/modules/welcomeq/welcomeq.conf index 035db9714..2efc51473 100644 --- a/src/modules/welcomeq/welcomeq.conf +++ b/src/modules/welcomeq/welcomeq.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# # Configuration for the welcomeq module. # # The configuration for welcomeq is exactly the same diff --git a/src/modules/welcomeq/welcomeq.qml b/src/modules/welcomeq/welcomeq.qml index 7ba8933c8..02b5424c7 100644 --- a/src/modules/welcomeq/welcomeq.qml +++ b/src/modules/welcomeq/welcomeq.qml @@ -1,20 +1,11 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2020, Adriaan de Groot - * Copyright 2020, Anke Boersma + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-FileCopyrightText: 2020 Anke Boersma + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ import io.calamares.core 1.0 import io.calamares.ui 1.0 diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt deleted file mode 100644 index 8a949d02e..000000000 --- a/src/qml/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory( calamares ) diff --git a/src/qml/calamares/CMakeLists.txt b/src/qml/calamares/CMakeLists.txt index 48f8ca96c..d74e79ea0 100644 --- a/src/qml/calamares/CMakeLists.txt +++ b/src/qml/calamares/CMakeLists.txt @@ -1,7 +1,18 @@ -file( GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*" ) +# === This file is part of Calamares - === +# +# SPDX-FileCopyrightText: 2020 Adriaan de Groot +# SPDX-License-Identifier: BSD-2-Clause +# + +# Install "slideshows" and other QML-sources for Calamares. +# +# In practice, in the central source repositoy, this means +# just-install-the-slideshow-example. For alternative slideshows, +# see the approach in the calamares-extensions repository. # Iterate over all the subdirectories which have a qmldir file, copy them over to the build dir, # and install them into share/calamares/qml/calamares +file( GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*" ) foreach( SUBDIRECTORY ${SUBDIRECTORIES} ) if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}" AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/qmldir" ) diff --git a/src/qml/calamares/slideshow/BackButton.qml b/src/qml/calamares/slideshow/BackButton.qml index 2d5f4dd5e..4e420e064 100644 --- a/src/qml/calamares/slideshow/BackButton.qml +++ b/src/qml/calamares/slideshow/BackButton.qml @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ NavButton { diff --git a/src/qml/calamares/slideshow/ForwardButton.qml b/src/qml/calamares/slideshow/ForwardButton.qml index 9f6fecf8e..7838fab3b 100644 --- a/src/qml/calamares/slideshow/ForwardButton.qml +++ b/src/qml/calamares/slideshow/ForwardButton.qml @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ NavButton { diff --git a/src/qml/calamares/slideshow/NavButton.qml b/src/qml/calamares/slideshow/NavButton.qml index 33d8cad77..bdb2f402e 100644 --- a/src/qml/calamares/slideshow/NavButton.qml +++ b/src/qml/calamares/slideshow/NavButton.qml @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /* This is a navigation (arrow) button that fades in on hover, and @@ -27,14 +18,14 @@ import QtQuick 2.5; Image { id: fade - + property bool isForward : true - + width: 100 height: 100 anchors.verticalCenter: parent.verticalCenter opacity: 0.3 - + OpacityAnimator { id: fadeIn target: fade @@ -43,7 +34,7 @@ Image { duration: 500 running: false } - + OpacityAnimator { id: fadeOut target: fade @@ -52,7 +43,7 @@ Image { duration: 250 running: false } - + MouseArea { anchors.fill: parent hoverEnabled: true diff --git a/src/qml/calamares/slideshow/Presentation.qml b/src/qml/calamares/slideshow/Presentation.qml index 405055b56..1eed2e842 100644 --- a/src/qml/calamares/slideshow/Presentation.qml +++ b/src/qml/calamares/slideshow/Presentation.qml @@ -1,19 +1,22 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2017, Adriaan de Groot + * SPDX-FileCopyrightText: 2017 Adriaan de Groot + * SPDX-FileCopyrightText: 2016 The Qt Company Ltd. + * SPDX-License-Identifier: LGPL-2.1-only + * + * 2017, Adriaan de Groot * - added looping, keys-instead-of-shortcut - * Copyright 2018, Adriaan de Groot + * 2018, Adriaan de Groot * - make looping a property, drop the 'c' fade-key * - drop navigation through entering a slide number * (this and the 'c' key make sense in a *presentation* * slideshow, not in a passive slideshow like Calamares) * - remove quit key - * Copyright 2019, Adriaan de Groot + * 2019, Adriaan de Groot * - Support "V2" loading * - Disable shortcuts until the content is visible in Calamares - * - * SPDX-License-Identifier: LGPL-2.1-only - * License-Filename: LICENSES/LGPLv2.1-Presentation + * 2020, Adriaan de Groot + * - Updated to SPDX headers */ /**************************************************************************** @@ -87,7 +90,7 @@ Item { // It is used in this example also to keep the keyboard shortcuts // enabled only while the slideshow is active. property bool activatedInCalamares: false - + // Private API property int _lastShownSlide: 0 diff --git a/src/qml/calamares/slideshow/Slide.qml b/src/qml/calamares/slideshow/Slide.qml index dc3e24480..9cb9e7381 100644 --- a/src/qml/calamares/slideshow/Slide.qml +++ b/src/qml/calamares/slideshow/Slide.qml @@ -1,7 +1,7 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * + * SPDX-FileCopyrightText: 2012 Digia Plc and/or its subsidiary(-ies). * SPDX-License-Identifier: LGPL-2.1-only - * License-Filename: LICENSES/LGPLv2.1-Presentation */ /**************************************************************************** diff --git a/src/qml/calamares/slideshow/SlideCounter.qml b/src/qml/calamares/slideshow/SlideCounter.qml index e59476f5c..d5b2de7be 100644 --- a/src/qml/calamares/slideshow/SlideCounter.qml +++ b/src/qml/calamares/slideshow/SlideCounter.qml @@ -1,19 +1,10 @@ -/* === This file is part of Calamares - === +/* === This file is part of Calamares - === * - * Copyright 2018, Adriaan de Groot + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Calamares is Free Software: see the License-Identifier above. * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . */ /* This control just shows a (non-translated) count of the slides diff --git a/src/qml/calamares/slideshow/qmldir.license b/src/qml/calamares/slideshow/qmldir.license new file mode 100644 index 000000000..d2da9cf5b --- /dev/null +++ b/src/qml/calamares/slideshow/qmldir.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: no +SPDX-License-Identifier: CC0-1.0