[luksbootkeyfile] Refactor static function to outside class

This commit is contained in:
Adriaan de Groot 2019-07-04 19:38:10 +02:00
parent 7d7d4c69ef
commit efd409cf78

View File

@ -66,18 +66,6 @@ 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.
*
* Given a list of partitions (as set up by the partitioning module,
@ -103,6 +91,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;
bool valid;
};