Fix build on very old GCC.
This commit is contained in:
parent
bea6b5f17e
commit
fba8e448bb
@ -59,13 +59,16 @@ KeyboardLayoutModel::data( const QModelIndex& index, int role ) const
|
|||||||
void
|
void
|
||||||
KeyboardLayoutModel::init()
|
KeyboardLayoutModel::init()
|
||||||
{
|
{
|
||||||
auto layouts = KeyboardGlobal::getKeyboardLayouts();
|
QMap< QString, KeyboardGlobal::KeyboardInfo > layouts =
|
||||||
for ( auto it = layouts.constBegin(); it != layouts.constEnd(); ++it )
|
KeyboardGlobal::getKeyboardLayouts();
|
||||||
|
for ( QMap< QString, KeyboardGlobal::KeyboardInfo >::const_iterator it = layouts.constBegin();
|
||||||
|
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(), []( auto a, auto b )
|
std::stable_sort( m_layouts.begin(), m_layouts.end(), []( const QPair< QString, KeyboardGlobal::KeyboardInfo >& a,
|
||||||
|
const QPair< QString, KeyboardGlobal::KeyboardInfo >& b )
|
||||||
{
|
{
|
||||||
return a.second.description < b.second.description;
|
return a.second.description < b.second.description;
|
||||||
} );
|
} );
|
||||||
|
Loading…
Reference in New Issue
Block a user