[keyboard] Apply newer clang-formatting

This commit is contained in:
Adriaan de Groot 2024-04-17 10:55:18 +02:00
parent 9654f487ef
commit afd3ed86d9
2 changed files with 15 additions and 8 deletions

View File

@ -502,14 +502,16 @@ QString
Config::prettyStatus() const Config::prettyStatus() const
{ {
QString status; QString status;
status += tr( "Keyboard model has been set to %1<br/>.", "@label, %1 is keyboard model, as in Apple Magic Keyboard" ) status
+= tr( "Keyboard model has been set to %1<br/>.", "@label, %1 is keyboard model, as in Apple Magic Keyboard" )
.arg( m_keyboardModelsModel->label( m_keyboardModelsModel->currentIndex() ) ); .arg( m_keyboardModelsModel->label( m_keyboardModelsModel->currentIndex() ) );
QString layout = m_keyboardLayoutsModel->item( m_keyboardLayoutsModel->currentIndex() ).second.description; QString layout = m_keyboardLayoutsModel->item( m_keyboardLayoutsModel->currentIndex() ).second.description;
QString variant = m_keyboardVariantsModel->currentIndex() >= 0 QString variant = m_keyboardVariantsModel->currentIndex() >= 0
? m_keyboardVariantsModel->label( m_keyboardVariantsModel->currentIndex() ) ? m_keyboardVariantsModel->label( m_keyboardVariantsModel->currentIndex() )
: QString( "<default>" ); : QString( "<default>" );
status += tr( "Keyboard layout has been set to %1/%2.", "@label, %1 is layout, %2 is layout variant" ).arg( layout, variant ); status += tr( "Keyboard layout has been set to %1/%2.", "@label, %1 is layout, %2 is layout variant" )
.arg( layout, variant );
return status; return status;
} }

View File

@ -64,7 +64,9 @@ QString
SetKeyboardLayoutJob::prettyName() const SetKeyboardLayoutJob::prettyName() const
{ {
return tr( "Setting keyboard model to %1, layout as %2-%3…", "@status, %1 model, %2 layout, %3 variant" ) return tr( "Setting keyboard model to %1, layout as %2-%3…", "@status, %1 model, %2 layout, %3 variant" )
.arg( m_model ).arg( m_layout ).arg( m_variant ); .arg( m_model )
.arg( m_layout )
.arg( m_variant );
} }
@ -365,8 +367,10 @@ SetKeyboardLayoutJob::exec()
if ( !writeVConsoleData( vconsoleConfPath, convertedKeymapPath ) ) if ( !writeVConsoleData( vconsoleConfPath, convertedKeymapPath ) )
{ {
return Calamares::JobResult::error( tr( "Failed to write keyboard configuration for the virtual console.", "@error" ), return Calamares::JobResult::error(
tr( "Failed to write to %1", "@error, %1 is virtual console configuration path" ).arg( vconsoleConfPath ) ); tr( "Failed to write keyboard configuration for the virtual console.", "@error" ),
tr( "Failed to write to %1", "@error, %1 is virtual console configuration path" )
.arg( vconsoleConfPath ) );
} }
// Get the path to the destination's /etc/X11/xorg.conf.d/00-keyboard.conf // Get the path to the destination's /etc/X11/xorg.conf.d/00-keyboard.conf
@ -391,7 +395,8 @@ SetKeyboardLayoutJob::exec()
if ( !writeX11Data( keyboardConfPath ) ) if ( !writeX11Data( keyboardConfPath ) )
{ {
return Calamares::JobResult::error( tr( "Failed to write keyboard configuration for X11.", "@error" ), return Calamares::JobResult::error(
tr( "Failed to write keyboard configuration for X11.", "@error" ),
tr( "Failed to write to %1", "@error, %1 is keyboard configuration path" ).arg( keyboardConfPath ) ); tr( "Failed to write to %1", "@error, %1 is keyboard configuration path" ).arg( keyboardConfPath ) );
} }
} }