|
|
|
@ -66,27 +66,15 @@ struct LuksDevice
|
|
|
|
|
QString passphrase;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct LuksDeviceList
|
|
|
|
|
{
|
|
|
|
|
LuksDeviceList( const QVariant& partitions )
|
|
|
|
|
: valid( false )
|
|
|
|
|
{
|
|
|
|
|
if ( partitions.canConvert< QVariantList >() )
|
|
|
|
|
{
|
|
|
|
|
devices = getLuksDevices( partitions.toList() );
|
|
|
|
|
valid = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** @brief Extract the luks passphrases setup.
|
|
|
|
|
/** @brief Extract the luks passphrases setup.
|
|
|
|
|
*
|
|
|
|
|
* Given a list of partitions (as set up by the partitioning module,
|
|
|
|
|
* so there's maps with keys inside), returns just the list of
|
|
|
|
|
* luks passphrases for each device.
|
|
|
|
|
*/
|
|
|
|
|
static QList< LuksDevice >
|
|
|
|
|
getLuksDevices( const QVariantList& list )
|
|
|
|
|
{
|
|
|
|
|
static QList< LuksDevice >
|
|
|
|
|
getLuksDevices( const QVariantList& list )
|
|
|
|
|
{
|
|
|
|
|
QList< LuksDevice > luksItems;
|
|
|
|
|
|
|
|
|
|
for ( const auto& p : list )
|
|
|
|
@ -101,6 +89,18 @@ struct LuksDeviceList
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return luksItems;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct LuksDeviceList
|
|
|
|
|
{
|
|
|
|
|
LuksDeviceList( const QVariant& partitions )
|
|
|
|
|
: valid( false )
|
|
|
|
|
{
|
|
|
|
|
if ( partitions.canConvert< QVariantList >() )
|
|
|
|
|
{
|
|
|
|
|
devices = getLuksDevices( partitions.toList() );
|
|
|
|
|
valid = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QList< LuksDevice > devices;
|
|
|
|
|