Code-style: format the finished module

main
Adriaan de Groot 8 years ago
parent cd3578ca71
commit 574bb61592

@ -50,11 +50,11 @@ FinishedPage::FinishedPage( QWidget* parent )
CALAMARES_RETRANSLATE( CALAMARES_RETRANSLATE(
ui->retranslateUi( this ); ui->retranslateUi( this );
ui->mainText->setText( tr( "<h1>All done.</h1><br/>" ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
"%1 has been installed on your computer.<br/>" "%1 has been installed on your computer.<br/>"
"You may now restart into your new system, or continue " "You may now restart into your new system, or continue "
"using the %2 Live environment." ) "using the %2 Live environment." )
.arg( *Calamares::Branding::VersionedName ) .arg( *Calamares::Branding::VersionedName )
.arg( *Calamares::Branding::ProductName ) ); .arg( *Calamares::Branding::ProductName ) );
) )
} }
@ -90,7 +90,7 @@ FinishedPage::setUpRestart()
this, [this] this, [this]
{ {
if ( ui->restartCheckBox->isVisible() && if ( ui->restartCheckBox->isVisible() &&
ui->restartCheckBox->isChecked() ) ui->restartCheckBox->isChecked() )
QProcess::execute( "/bin/sh", { "-c", m_restartNowCommand } ); QProcess::execute( "/bin/sh", { "-c", m_restartNowCommand } );
} ); } );
} }
@ -108,9 +108,9 @@ FinishedPage::onInstallationFailed( const QString& message, const QString& detai
{ {
Q_UNUSED( details ); Q_UNUSED( details );
ui->mainText->setText( tr( "<h1>Installation Failed</h1><br/>" ui->mainText->setText( tr( "<h1>Installation Failed</h1><br/>"
"%1 has not been installed on your computer.<br/>" "%1 has not been installed on your computer.<br/>"
"The error message was: %2." ) "The error message was: %2." )
.arg( *Calamares::Branding::VersionedName ) .arg( *Calamares::Branding::VersionedName )
.arg( message ) ); .arg( message ) );
setRestartNowEnabled( false ); setRestartNowEnabled( false );
} }

@ -111,7 +111,7 @@ FinishedViewStep::sendNotification()
{ {
// If the installation failed, don't send notification popup; // If the installation failed, don't send notification popup;
// there's a (modal) dialog popped up with the failure notice. // there's a (modal) dialog popped up with the failure notice.
if (installFailed) if ( installFailed )
return; return;
QDBusInterface notify( "org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications" ); QDBusInterface notify( "org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications" );
@ -154,8 +154,8 @@ FinishedViewStep::jobs() const
void void
FinishedViewStep::onInstallationFailed( const QString& message, const QString& details ) FinishedViewStep::onInstallationFailed( const QString& message, const QString& details )
{ {
Q_UNUSED(message); Q_UNUSED( message );
Q_UNUSED(details); Q_UNUSED( details );
installFailed = true; installFailed = true;
} }
@ -182,7 +182,7 @@ FinishedViewStep::setConfigurationMap( const QVariantMap& configurationMap )
} }
} }
if ( configurationMap.contains( "notifyOnFinished" ) && if ( configurationMap.contains( "notifyOnFinished" ) &&
configurationMap.value( "notifyOnFinished" ).type() == QVariant::Bool ) configurationMap.value( "notifyOnFinished" ).type() == QVariant::Bool )
m_notifyOnFinished = configurationMap.value( "notifyOnFinished" ).toBool(); m_notifyOnFinished = configurationMap.value( "notifyOnFinished" ).toBool();
} }

Loading…
Cancel
Save