[keyboard] Matching of layouts is very suspect

This commit is contained in:
Adriaan de Groot 2020-10-28 01:07:49 +01:00
parent 4f0d6a8f25
commit fe5757c7d1

View File

@ -381,11 +381,11 @@ Config::guessLayout( const QStringList& langParts )
for ( int variantnumber = 0; variantnumber < m_keyboardVariantsModel->rowCount(); ++variantnumber ) for ( int variantnumber = 0; variantnumber < m_keyboardVariantsModel->rowCount(); ++variantnumber )
{ {
if ( m_keyboardVariantsModel->item( variantnumber )[ "key" ].compare( *countryPart, if ( m_keyboardVariantsModel->item( variantnumber )[ "key" ].compare( *countryPart,
Qt::CaseInsensitive ) ) Qt::CaseInsensitive ) == 0 )
{ {
m_keyboardVariantsModel->setCurrentIndex( variantnumber ); m_keyboardVariantsModel->setCurrentIndex( variantnumber );
cDebug() << Logger::SubEntry << "matched variant" cDebug() << Logger::SubEntry << "matched variant"
<< m_keyboardVariantsModel->item( variantnumber )[ "key" ] << ' ' << *countryPart << ' '
<< m_keyboardVariantsModel->item( variantnumber )[ "key" ]; << m_keyboardVariantsModel->item( variantnumber )[ "key" ];
} }
} }