Code-style: format the keyboard module
This commit is contained in:
parent
ea07d9e1d8
commit
9b9801d48d
@ -64,9 +64,7 @@ KeyboardLayoutModel::init()
|
|||||||
KeyboardGlobal::getKeyboardLayouts();
|
KeyboardGlobal::getKeyboardLayouts();
|
||||||
for ( KeyboardGlobal::LayoutsMap::const_iterator it = layouts.constBegin();
|
for ( KeyboardGlobal::LayoutsMap::const_iterator it = layouts.constBegin();
|
||||||
it != layouts.constEnd(); ++it )
|
it != layouts.constEnd(); ++it )
|
||||||
{
|
|
||||||
m_layouts.append( qMakePair( it.key(), it.value() ) );
|
m_layouts.append( qMakePair( it.key(), it.value() ) );
|
||||||
}
|
|
||||||
|
|
||||||
std::stable_sort( m_layouts.begin(), m_layouts.end(), []( const QPair< QString, KeyboardGlobal::KeyboardInfo >& a,
|
std::stable_sort( m_layouts.begin(), m_layouts.end(), []( const QPair< QString, KeyboardGlobal::KeyboardInfo >& a,
|
||||||
const QPair< QString, KeyboardGlobal::KeyboardInfo >& b )
|
const QPair< QString, KeyboardGlobal::KeyboardInfo >& b )
|
||||||
|
@ -142,9 +142,7 @@ KeyboardViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
m_xOrgConfFileName = "00-keyboard.conf";
|
m_xOrgConfFileName = "00-keyboard.conf";
|
||||||
}
|
|
||||||
|
|
||||||
if ( configurationMap.contains( "convertedKeymapPath" ) &&
|
if ( configurationMap.contains( "convertedKeymapPath" ) &&
|
||||||
configurationMap.value( "convertedKeymapPath" ).type() == QVariant::String &&
|
configurationMap.value( "convertedKeymapPath" ).type() == QVariant::String &&
|
||||||
@ -154,17 +152,11 @@ KeyboardViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
m_convertedKeymapPath = QString();
|
m_convertedKeymapPath = QString();
|
||||||
}
|
|
||||||
|
|
||||||
if ( configurationMap.contains( "writeEtcDefaultKeyboard" ) &&
|
if ( configurationMap.contains( "writeEtcDefaultKeyboard" ) &&
|
||||||
configurationMap.value( "writeEtcDefaultKeyboard" ).type() == QVariant::Bool )
|
configurationMap.value( "writeEtcDefaultKeyboard" ).type() == QVariant::Bool )
|
||||||
{
|
|
||||||
m_writeEtcDefaultKeyboard = configurationMap.value( "writeEtcDefaultKeyboard" ).toBool();
|
m_writeEtcDefaultKeyboard = configurationMap.value( "writeEtcDefaultKeyboard" ).toBool();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
m_writeEtcDefaultKeyboard = true;
|
m_writeEtcDefaultKeyboard = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -303,9 +303,7 @@ SetKeyboardLayoutJob::exec()
|
|||||||
|
|
||||||
QString defaultKeyboardPath;
|
QString defaultKeyboardPath;
|
||||||
if ( QDir( destDir.absoluteFilePath( "etc/default" ) ).exists() )
|
if ( QDir( destDir.absoluteFilePath( "etc/default" ) ).exists() )
|
||||||
{
|
|
||||||
defaultKeyboardPath = destDir.absoluteFilePath( "etc/default/keyboard" );
|
defaultKeyboardPath = destDir.absoluteFilePath( "etc/default/keyboard" );
|
||||||
}
|
|
||||||
|
|
||||||
// Get the path to the destination's path to the converted key mappings
|
// Get the path to the destination's path to the converted key mappings
|
||||||
QString convertedKeymapPath = m_convertedKeymapPath;
|
QString convertedKeymapPath = m_convertedKeymapPath;
|
||||||
|
Loading…
Reference in New Issue
Block a user