mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
[partition] Refactor getting the checked flags
This commit is contained in:
parent
950cc9070d
commit
4f451eece5
4 changed files with 26 additions and 16 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "utils/Logger.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QListWidget>
|
||||
|
||||
QStringList
|
||||
standardMountPoints()
|
||||
|
@ -79,3 +80,18 @@ setSelectedMountPoint(QComboBox& combo, const QString& selected)
|
|||
combo.setCurrentIndex( combo.count() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PartitionTable::Flags
|
||||
flagsFromList( const QListWidget& list )
|
||||
{
|
||||
PartitionTable::Flags flags;
|
||||
|
||||
for ( int i = 0; i < list.count(); i++ )
|
||||
if ( list.item( i )->checkState() == Qt::Checked )
|
||||
flags |= static_cast< PartitionTable::Flag >(
|
||||
list.item( i )->data( Qt::UserRole ).toInt() );
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue