mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
[packagechooser] Refactor fromApp*()
- These don't have to be static methods of PackageItem, a free function is more convenient. - Since it's not API of PackageItem anymore, need to - update tests not to use API - do API-not-available warnings in consumers
This commit is contained in:
parent
17abbeda96
commit
0a92ef7655
8 changed files with 102 additions and 56 deletions
|
@ -71,7 +71,7 @@ fromComponent( AppStream::Component& component )
|
|||
map.insert( "id", component.id() );
|
||||
map.insert( "name", component.name() );
|
||||
map.insert( "description", component.description() );
|
||||
map.insert( "package", component.packageNames().join(",") );
|
||||
map.insert( "package", component.packageNames().join( "," ) );
|
||||
|
||||
auto screenshots = component.screenshots();
|
||||
if ( screenshots.count() > 0 )
|
||||
|
@ -96,7 +96,7 @@ fromComponent( AppStream::Component& component )
|
|||
}
|
||||
|
||||
PackageItem
|
||||
PackageItem::fromAppStream( const QVariantMap& item_map )
|
||||
fromAppStream( const QVariantMap& item_map )
|
||||
{
|
||||
QString appstreamId = CalamaresUtils::getString( item_map, "appstream" );
|
||||
if ( appstreamId.isEmpty() )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue