mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 03:15:44 -05:00
[libcalamares] Apply coding style
This commit is contained in:
parent
08b5012946
commit
177d6fe861
2 changed files with 24 additions and 17 deletions
|
@ -239,7 +239,8 @@ CStringListModel::CStringListModel( CStringPairList l )
|
|||
{
|
||||
}
|
||||
|
||||
void CStringListModel::setList(CalamaresUtils::Locale::CStringPairList l)
|
||||
void
|
||||
CStringListModel::setList( CalamaresUtils::Locale::CStringPairList l )
|
||||
{
|
||||
beginResetModel();
|
||||
m_list = l;
|
||||
|
@ -273,7 +274,9 @@ void
|
|||
CStringListModel::setCurrentIndex( const int& index )
|
||||
{
|
||||
if ( ( index < 0 ) || ( index >= m_list.count() ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_currentIndex = index;
|
||||
emit currentIndexChanged();
|
||||
|
|
|
@ -163,15 +163,19 @@ public:
|
|||
|
||||
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;
|
||||
|
||||
} );
|
||||
|
||||
if ( it != m_list.constEnd() )
|
||||
{
|
||||
return std::distance( m_list.constBegin(), it );
|
||||
else return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue