From 59ea88f1ade3045fcdc846e64ccdb6e7c3f9cf87 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 13 Apr 2021 12:29:06 +0200 Subject: [PATCH] [packagechoose] Remove the *package* member The single-values *package* member in a PackageItem was not used, so remove it -- to show that it really isn't used. This is prep- work for putting the package name *back*, as multi-valued, and using the *packages* module. --- src/modules/packagechooser/PackageModel.cpp | 5 ----- src/modules/packagechooser/PackageModel.h | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/modules/packagechooser/PackageModel.cpp b/src/modules/packagechooser/PackageModel.cpp index 1072b8b3b..bb48ab888 100644 --- a/src/modules/packagechooser/PackageModel.cpp +++ b/src/modules/packagechooser/PackageModel.cpp @@ -35,23 +35,19 @@ roleNames() PackageItem::PackageItem() {} PackageItem::PackageItem( const QString& a_id, - const QString& a_package, const QString& a_name, const QString& a_description ) : id( a_id ) - , package( a_package ) , name( a_name ) , description( a_description ) { } PackageItem::PackageItem( const QString& a_id, - const QString& a_package, const QString& a_name, const QString& a_description, const QString& screenshotPath ) : id( a_id ) - , package( a_package ) , name( a_name ) , description( a_description ) , screenshot( screenshotPath ) @@ -60,7 +56,6 @@ PackageItem::PackageItem( const QString& a_id, PackageItem::PackageItem::PackageItem( const QVariantMap& item_map ) : id( CalamaresUtils::getString( item_map, "id" ) ) - , package( CalamaresUtils::getString( item_map, "package" ) ) , name( CalamaresUtils::Locale::TranslatedString( item_map, "name" ) ) , description( CalamaresUtils::Locale::TranslatedString( item_map, "description" ) ) , screenshot( CalamaresUtils::getString( item_map, "screenshot" ) ) diff --git a/src/modules/packagechooser/PackageModel.h b/src/modules/packagechooser/PackageModel.h index 375cf28c4..fc1d787f1 100644 --- a/src/modules/packagechooser/PackageModel.h +++ b/src/modules/packagechooser/PackageModel.h @@ -31,8 +31,6 @@ const NamedEnumTable< PackageChooserMode >& roleNames(); struct PackageItem { QString id; - // FIXME: unused - QString package; CalamaresUtils::Locale::TranslatedString name; CalamaresUtils::Locale::TranslatedString description; QPixmap screenshot; @@ -44,7 +42,7 @@ struct PackageItem * This constructor sets all the text members, * but leaves the screenshot blank. Set that separately. */ - PackageItem( const QString& id, const QString& package, const QString& name, const QString& description ); + PackageItem( const QString& id, const QString& name, const QString& description ); /** @brief Creates a PackageItem from given strings. * @@ -53,7 +51,6 @@ struct PackageItem * a filesystem path, whatever QPixmap understands. */ PackageItem( const QString& id, - const QString& package, const QString& name, const QString& description, const QString& screenshotPath );