[keyboard] Rename confusing overloaded function

This commit is contained in:
Adriaan de Groot 2024-08-27 14:53:48 +02:00
parent dc3c08a012
commit 783881edaa

View File

@ -57,9 +57,9 @@ xkbmap_layout_args( const QString& layout, const QString& variant )
} }
static QStringList static QStringList
xkbmap_layout_args( const QStringList& layouts, xkbmap_layout_args_with_group_switch( const QStringList& layouts,
const QStringList& variants, const QStringList& variants,
const QString& switchOption = "grp:alt_shift_toggle" ) const QString& switchOption )
{ {
if ( layouts.size() != variants.size() ) if ( layouts.size() != variants.size() )
{ {
@ -302,10 +302,11 @@ Config::xkbApply()
m_additionalLayoutInfo.groupSwitcher = "grp:alt_shift_toggle"; m_additionalLayoutInfo.groupSwitcher = "grp:alt_shift_toggle";
} }
QProcess::execute( "setxkbmap", QProcess::execute(
xkbmap_layout_args( { m_additionalLayoutInfo.additionalLayout, m_selectedLayout }, "setxkbmap",
{ m_additionalLayoutInfo.additionalVariant, m_selectedVariant }, xkbmap_layout_args_with_group_switch( { m_additionalLayoutInfo.additionalLayout, m_selectedLayout },
m_additionalLayoutInfo.groupSwitcher ) ); { m_additionalLayoutInfo.additionalVariant, m_selectedVariant },
m_additionalLayoutInfo.groupSwitcher ) );
cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant << "(added " cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant << "(added "
<< m_additionalLayoutInfo.additionalLayout << "-" << m_additionalLayoutInfo.additionalVariant << m_additionalLayoutInfo.additionalLayout << "-" << m_additionalLayoutInfo.additionalVariant