[libcalamaresui] Apply coding style

This commit is contained in:
Adriaan de Groot 2020-04-30 12:09:47 +02:00
parent fabb351b77
commit ddde817abf
3 changed files with 8 additions and 7 deletions

View File

@ -193,7 +193,7 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
{ QStringLiteral( "VARIANT" ), relInfo.variant() },
{ QStringLiteral( "VARIANT_ID" ), relInfo.variantId() },
{ QStringLiteral( "LOGO" ), relInfo.logo() } } };
auto expand = [&]( const QString& s ) -> QString {
auto expand = [ & ]( const QString& s ) -> QString {
return KMacroExpander::expandMacros( s, relMap, QLatin1Char( '@' ) );
};
#else
@ -203,7 +203,7 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent )
// Massage the strings, images and style sections.
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()
const QString imageName( expand( s ) );
QFileInfo imageFi( componentDir.absoluteFilePath( imageName ) );
@ -538,7 +538,7 @@ Branding::initSimpleSettings( const YAML::Node& doc )
[[noreturn]] void
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 );
}

View File

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

View File

@ -71,11 +71,11 @@ ViewManager::ViewManager( QObject* parent )
Q_ASSERT( !s_instance );
QBoxLayout* mainLayout = new QVBoxLayout;
m_widget->setObjectName("viewManager");
m_widget->setObjectName( "viewManager" );
m_widget->setLayout( mainLayout );
m_stack = new QStackedWidget( m_widget );
m_stack->setObjectName("viewManagerStack");
m_stack->setObjectName( "viewManagerStack" );
m_stack->setContentsMargins( 0, 0, 0, 0 );
mainLayout->addWidget( m_stack );
@ -183,7 +183,7 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
msgBox->show();
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 )
{
// TODO: host and port should be configurable