[libcalamares] Start putting data into the module Descriptor

main
Adriaan de Groot 4 years ago
parent 60fbf04594
commit 65273a262b

@ -55,6 +55,23 @@ Descriptor::fromDescriptorData( const QVariantMap& moduleDesc )
cDebug() << moduleDesc;
{
bool typeOk = false;
Type t = typeNames().find( moduleDesc.value( "type" ).toString(), typeOk );
bool interfaceOk = false;
Interface i = interfaceNames().find( moduleDesc.value( "interface" ).toString(), interfaceOk );
if ( typeOk && interfaceOk )
{
d.m_type = t;
d.m_interface = i;
d.m_isValid = true;
}
}
if ( !d.m_isValid )
{
return d;
}
return d;
}

@ -72,11 +72,11 @@ public:
*/
static Descriptor fromDescriptorData( const QVariantMap& moduleDesc );
bool isValid() const { return false; }
bool isValid() const { return m_isValid; }
QString name() const { return QString(); }
Type type() const { return Type::Job; }
Interface interface() const { return Interface::QtPlugin; }
Type type() const { return m_type; }
Interface interface() const { return m_interface; }
bool isEmergency() const { return false; }
bool hasConfig() const { return true; }
@ -120,6 +120,9 @@ public:
private:
QString m_directory;
Type m_type;
Interface m_interface;
bool m_isValid = false;
};
} // namespace ModuleSystem

Loading…
Cancel
Save