[libcalamares] Apply coding style
This commit is contained in:
parent
08b5012946
commit
177d6fe861
@ -239,7 +239,8 @@ CStringListModel::CStringListModel( CStringPairList l )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStringListModel::setList(CalamaresUtils::Locale::CStringPairList l)
|
void
|
||||||
|
CStringListModel::setList( CalamaresUtils::Locale::CStringPairList l )
|
||||||
{
|
{
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
m_list = l;
|
m_list = l;
|
||||||
@ -273,7 +274,9 @@ void
|
|||||||
CStringListModel::setCurrentIndex( const int& index )
|
CStringListModel::setCurrentIndex( const int& index )
|
||||||
{
|
{
|
||||||
if ( ( index < 0 ) || ( index >= m_list.count() ) )
|
if ( ( index < 0 ) || ( index >= m_list.count() ) )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_currentIndex = index;
|
m_currentIndex = index;
|
||||||
emit currentIndexChanged();
|
emit currentIndexChanged();
|
||||||
|
@ -163,15 +163,19 @@ public:
|
|||||||
|
|
||||||
inline int indexOf( const QString& key )
|
inline int indexOf( const QString& key )
|
||||||
{
|
{
|
||||||
const auto it = std::find_if(m_list.constBegin(), m_list.constEnd(), [&](const CalamaresUtils::Locale::CStringPair *item) -> bool
|
const auto it = std::find_if(
|
||||||
{
|
m_list.constBegin(), m_list.constEnd(), [&]( const CalamaresUtils::Locale::CStringPair* item ) -> bool {
|
||||||
return item->key() == key;
|
return item->key() == key;
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
if ( it != m_list.constEnd() )
|
if ( it != m_list.constEnd() )
|
||||||
|
{
|
||||||
return std::distance( m_list.constBegin(), it );
|
return std::distance( m_list.constBegin(), it );
|
||||||
else return -1;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user