diff --git a/ci/calamaresstyle b/ci/calamaresstyle index 46acbdc3d..8b13b6f31 100755 --- a/ci/calamaresstyle +++ b/ci/calamaresstyle @@ -6,8 +6,6 @@ # You can pass in directory names, in which case the files # in that directory (NOT below it) are processed. # -set -e - AS=$( which astyle ) for _cf in clang-format-7 clang-format-8 clang-format70 clang-format80 @@ -22,6 +20,8 @@ test -n "$CF" || { echo "! No clang-format-7 found in PATH"; exit 1 ; } test -x "$AS" || { echo "! $AS is not executable."; exit 1 ; } test -x "$CF" || { echo "! $CF is not executable."; exit 1 ; } +set -e + any_dirs=no for d in "$@" do diff --git a/src/modules/license/LicensePage.cpp b/src/modules/license/LicensePage.cpp index 2cc025f83..c5ba38133 100644 --- a/src/modules/license/LicensePage.cpp +++ b/src/modules/license/LicensePage.cpp @@ -126,7 +126,6 @@ LicensePage::LicensePage( QWidget* parent ) CALAMARES_RETRANSLATE( ui->acceptCheckBox->setText( tr( "I accept the terms and conditions above." ) ); ) } - void LicensePage::setEntries( const QList< LicenseEntry >& entriesList ) { @@ -134,27 +133,36 @@ LicensePage::setEntries( const QList< LicenseEntry >& entriesList ) m_entries.clear(); m_entries.reserve( entriesList.count() ); - const bool required - = std::any_of( entriesList.cbegin(), entriesList.cend(), []( const LicenseEntry& e ) { return e.m_required; } ); - if ( entriesList.isEmpty() ) - { - m_allLicensesOptional = true; - } - else - { - m_allLicensesOptional = !required; - } + auto isRequired = []( const LicenseEntry& e ) { return e.m_required; }; + m_allLicensesOptional = std::none_of( entriesList.cbegin(), entriesList.cend(), isRequired ); checkAcceptance( false ); - CALAMARES_RETRANSLATE( if ( required ) { + for ( const LicenseEntry& entry : entriesList ) + { + LicenseWidget* w = new LicenseWidget( entry ); + ui->licenseEntriesLayout->addWidget( w ); + m_entries.append( w ); + } + ui->licenseEntriesLayout->addStretch(); + + CALAMARES_RETRANSLATE_SLOT( &LicensePage::retranslate ) +} + +void +LicensePage::retranslate() +{ + if ( !m_allLicensesOptional ) + { ui->mainText->setText( tr( "