[welcome] Improve variable naming
- these two are about whether all the checkEntries are satisfied (in general, and the mandatory ones) so make the names reflect that.
This commit is contained in:
parent
5795801be5
commit
f5c0e57f17
@ -157,8 +157,8 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
|||||||
spacerLayout->addSpacing( paddingSize );
|
spacerLayout->addSpacing( paddingSize );
|
||||||
CalamaresUtils::unmarginLayout( spacerLayout );
|
CalamaresUtils::unmarginLayout( spacerLayout );
|
||||||
|
|
||||||
bool allChecked = true;
|
bool requirementsSatisfied = true; // Give a warning
|
||||||
bool requirementsSatisfied = true;
|
bool mandatorySatisfied = true; // Give an error
|
||||||
|
|
||||||
for ( const auto& entry : checkEntries )
|
for ( const auto& entry : checkEntries )
|
||||||
{
|
{
|
||||||
@ -169,10 +169,10 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
|||||||
entriesLayout->addWidget( ciw );
|
entriesLayout->addWidget( ciw );
|
||||||
ciw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
ciw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||||
|
|
||||||
allChecked = false;
|
requirementsSatisfied = false;
|
||||||
if ( entry.mandatory )
|
if ( entry.mandatory )
|
||||||
{
|
{
|
||||||
requirementsSatisfied = false;
|
mandatorySatisfied = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ciw->setAutoFillBackground( true );
|
ciw->setAutoFillBackground( true );
|
||||||
@ -191,11 +191,11 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
|||||||
entriesLayout->insertWidget( 0, textLabel );
|
entriesLayout->insertWidget( 0, textLabel );
|
||||||
textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||||
|
|
||||||
if ( !allChecked )
|
if ( !requirementsSatisfied )
|
||||||
{
|
{
|
||||||
entriesLayout->insertSpacing( 1, CalamaresUtils::defaultFontHeight() / 2 );
|
entriesLayout->insertSpacing( 1, CalamaresUtils::defaultFontHeight() / 2 );
|
||||||
|
|
||||||
if ( !requirementsSatisfied )
|
if ( !mandatorySatisfied )
|
||||||
{
|
{
|
||||||
CALAMARES_RETRANSLATE( QString message = Calamares::Settings::instance()->isSetupMode()
|
CALAMARES_RETRANSLATE( QString message = Calamares::Settings::instance()->isSetupMode()
|
||||||
? tr( "This computer does not satisfy the minimum "
|
? tr( "This computer does not satisfy the minimum "
|
||||||
@ -230,7 +230,7 @@ ResultsListWidget::ResultsListWidget( QWidget* parent, const Calamares::Requirem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( allChecked && requirementsSatisfied )
|
if ( requirementsSatisfied && mandatorySatisfied )
|
||||||
{
|
{
|
||||||
if ( !Calamares::Branding::instance()->imagePath( Calamares::Branding::ProductWelcome ).isEmpty() )
|
if ( !Calamares::Branding::instance()->imagePath( Calamares::Branding::ProductWelcome ).isEmpty() )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user