[welcome] Apply coding style

This commit is contained in:
Adriaan de Groot 2020-05-06 15:52:56 +02:00
parent 713132d4af
commit 5dc358093e
3 changed files with 6 additions and 9 deletions

View File

@ -108,7 +108,7 @@ Config::initLanguages()
QLocale defaultLocale = QLocale( QLocale::system().name() );
cDebug() << "Matching locale" << defaultLocale;
int matchedLocaleIndex = m_languages->find( [ & ]( const QLocale& x ) {
int matchedLocaleIndex = m_languages->find( [&]( const QLocale& x ) {
return x.language() == defaultLocale.language() && x.country() == defaultLocale.country();
} );
@ -117,7 +117,7 @@ Config::initLanguages()
cDebug() << Logger::SubEntry << "Matching approximate locale" << defaultLocale.language();
matchedLocaleIndex
= m_languages->find( [ & ]( const QLocale& x ) { return x.language() == defaultLocale.language(); } );
= m_languages->find( [&]( const QLocale& x ) { return x.language() == defaultLocale.language(); } );
}
if ( matchedLocaleIndex < 0 )
@ -353,7 +353,7 @@ setGeoIP( Config* c, const QVariantMap& configurationMap )
if ( handler->type() != CalamaresUtils::GeoIP::Handler::Type::None )
{
auto* future = new FWString();
QObject::connect( future, &FWString::finished, [ config = c, f = future, h = handler ]() {
QObject::connect( future, &FWString::finished, [config = c, f = future, h = handler]() {
QString countryResult = f->future().result();
cDebug() << "GeoIP result for welcome=" << countryResult;
::setCountry( config, countryResult, h );
@ -376,10 +376,8 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
using Calamares::Branding;
setSupportUrl( jobOrBrandingSetting( Branding::SupportUrl, configurationMap, "showSupportUrl" ) );
setKnownIssuesUrl(
jobOrBrandingSetting( Branding::KnownIssuesUrl, configurationMap, "showKnownIssuesUrl" ) );
setReleaseNotesUrl(
jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) );
setKnownIssuesUrl( jobOrBrandingSetting( Branding::KnownIssuesUrl, configurationMap, "showKnownIssuesUrl" ) );
setReleaseNotesUrl( jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) );
setDonateUrl( jobOrBrandingSetting( Branding::DonateUrl, configurationMap, "showDonateUrl" ) );
::setLanguageIcon( this, configurationMap );

View File

@ -173,7 +173,7 @@ WelcomePage::setupButton( Button role, const QString& url )
{
auto size = 2 * QSize( CalamaresUtils::defaultFontHeight(), CalamaresUtils::defaultFontHeight() );
button->setIcon( CalamaresUtils::defaultPixmap( icon, CalamaresUtils::Original, size ) );
connect( button, &QPushButton::clicked, [ u ]() { QDesktopServices::openUrl( u ); } );
connect( button, &QPushButton::clicked, [u]() { QDesktopServices::openUrl( u ); } );
}
else
{

View File

@ -127,4 +127,3 @@ WelcomeViewStep::checkRequirements()
{
return m_requirementsChecker->checkRequirements();
}