[libcalamaresui] Apply coding style

main
Adriaan de Groot 6 years ago
parent fabb351b77
commit ddde817abf

@ -193,7 +193,7 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
{ QStringLiteral( "VARIANT" ), relInfo.variant() }, { QStringLiteral( "VARIANT" ), relInfo.variant() },
{ QStringLiteral( "VARIANT_ID" ), relInfo.variantId() }, { QStringLiteral( "VARIANT_ID" ), relInfo.variantId() },
{ QStringLiteral( "LOGO" ), relInfo.logo() } } }; { QStringLiteral( "LOGO" ), relInfo.logo() } } };
auto expand = [&]( const QString& s ) -> QString { auto expand = [ & ]( const QString& s ) -> QString {
return KMacroExpander::expandMacros( s, relMap, QLatin1Char( '@' ) ); return KMacroExpander::expandMacros( s, relMap, QLatin1Char( '@' ) );
}; };
#else #else
@ -203,7 +203,7 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
// Massage the strings, images and style sections. // Massage the strings, images and style sections.
loadStrings( m_strings, doc, "strings", expand ); loadStrings( m_strings, doc, "strings", expand );
loadStrings( m_images, doc, "images", [&]( const QString& s ) -> QString { loadStrings( m_images, doc, "images", [ & ]( const QString& s ) -> QString {
// See also image() // See also image()
const QString imageName( expand( s ) ); const QString imageName( expand( s ) );
QFileInfo imageFi( componentDir.absoluteFilePath( imageName ) ); QFileInfo imageFi( componentDir.absoluteFilePath( imageName ) );
@ -538,7 +538,7 @@ Branding::initSimpleSettings( const YAML::Node& doc )
[[noreturn]] void [[noreturn]] void
Branding::bail( const QString& message ) Branding::bail( const QString& message )
{ {
cError() << "FATAL in" << m_descriptorPath << Logger::Continuation << Logger::NoQuote{} << message; cError() << "FATAL in" << m_descriptorPath << Logger::Continuation << Logger::NoQuote {} << message;
::exit( EXIT_FAILURE ); ::exit( EXIT_FAILURE );
} }

@ -250,7 +250,8 @@ private:
}; };
template < typename U > template < typename U >
inline QString operator*( U e ) inline QString
operator*( U e )
{ {
return Branding::instance()->string( e ); return Branding::instance()->string( e );
} }

@ -71,11 +71,11 @@ ViewManager::ViewManager( QObject* parent )
Q_ASSERT( !s_instance ); Q_ASSERT( !s_instance );
QBoxLayout* mainLayout = new QVBoxLayout; QBoxLayout* mainLayout = new QVBoxLayout;
m_widget->setObjectName("viewManager"); m_widget->setObjectName( "viewManager" );
m_widget->setLayout( mainLayout ); m_widget->setLayout( mainLayout );
m_stack = new QStackedWidget( m_widget ); m_stack = new QStackedWidget( m_widget );
m_stack->setObjectName("viewManagerStack"); m_stack->setObjectName( "viewManagerStack" );
m_stack->setContentsMargins( 0, 0, 0, 0 ); m_stack->setContentsMargins( 0, 0, 0, 0 );
mainLayout->addWidget( m_stack ); mainLayout->addWidget( m_stack );
@ -183,7 +183,7 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
msgBox->show(); msgBox->show();
cDebug() << "Calamares will quit when the dialog closes."; 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 ) if ( msgBox->buttonRole( button ) == QMessageBox::ButtonRole::YesRole )
{ {
// TODO: host and port should be configurable // TODO: host and port should be configurable

Loading…
Cancel
Save