[libcalamares] Expand instance with weight
This commit is contained in:
parent
e37809a126
commit
07da6e3905
@ -75,6 +75,7 @@ InstanceDescription::InstanceDescription( const QVariantMap& m )
|
||||
: module( m.value( "module" ).toString() )
|
||||
, id( m.value( "id" ).toString() )
|
||||
, config( m.value( "config" ).toString() )
|
||||
, weight( m.value( "weight" ).toInt() )
|
||||
{
|
||||
if ( id.isEmpty() )
|
||||
{
|
||||
@ -84,6 +85,8 @@ InstanceDescription::InstanceDescription( const QVariantMap& m )
|
||||
{
|
||||
config = module + QStringLiteral( ".conf" );
|
||||
}
|
||||
|
||||
weight = qBound( 1, weight, 100 );
|
||||
}
|
||||
|
||||
Settings* Settings::s_instance = nullptr;
|
||||
|
@ -39,6 +39,7 @@ struct DLLEXPORT InstanceDescription
|
||||
QString module; ///< Module name (e.g. "welcome")
|
||||
QString id; ///< Id, to distinguish multiple instances (e.g. "one", for "welcome@one")
|
||||
QString config; ///< Config-file name (for multiple instances)
|
||||
int weight;
|
||||
};
|
||||
|
||||
class DLLEXPORT Settings : public QObject
|
||||
|
Loading…
Reference in New Issue
Block a user