mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-04 21:05:37 -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
|
@ -88,26 +88,6 @@ PackageItem::PackageItem::PackageItem( const QVariantMap& item_map )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_XML
|
||||
PackageItem
|
||||
PackageItem::fromAppData( const QVariantMap& item_map )
|
||||
{
|
||||
cWarning() << "Loading AppData XML is not supported.";
|
||||
return PackageItem();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_APPSTREAM
|
||||
PackageItem
|
||||
PackageItem::fromAppStream( const QVariantMap& item_map )
|
||||
{
|
||||
cWarning() << "Loading AppStream data is not supported.";
|
||||
return PackageItem();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PackageListModel::PackageListModel( QObject* parent )
|
||||
: QAbstractListModel( parent )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue