diff --git a/CHANGES-3.2 b/CHANGES-3.2 index c52cd0bcc..cbf391361 100644 --- a/CHANGES-3.2 +++ b/CHANGES-3.2 @@ -24,6 +24,9 @@ This release contains contributions from (alphabetically by first name): which allows distributions to change the value from `quiet`. The default, if nothing is set, remains `quiet`. Use an explicitly- empty list to specify no-arguments-at-all. + - *packagechooser* can now export its choices for use by the *netinstall* + module. This makes it possible to use *packagechooser* for large-scale + choices, followed by *netinstall* for fine-grained control. (Thanks Evan) - The *umount* module has been re-written in C++. The copy-a-log-file functionality has been removed. Use the *preservefiles* module for that. diff --git a/src/modules/netinstall/PackageModel.cpp b/src/modules/netinstall/PackageModel.cpp index 3fc2f4d43..256a77afd 100644 --- a/src/modules/netinstall/PackageModel.cpp +++ b/src/modules/netinstall/PackageModel.cpp @@ -14,24 +14,14 @@ #include "utils/Variant.h" #include "utils/Yaml.h" -/** @brief Appends groups to the tree - * - * Uses the data from @p groupList to add elements to the - * existing tree that m_rootItem points to. If m_rootItem - * is not valid, it does nothing - * - * Before adding anything to the model, it ensures that there - * is no existing data from the same source. If there is, that - * data is pruned first - * - */ +/// Recursive helper for setSelections() static void -setSelections2( const QStringList& selectNames, PackageTreeItem* item ) +setSelections( const QStringList& selectNames, PackageTreeItem* item ) { for ( int i = 0; i < item->childCount(); i++ ) { auto* child = item->child( i ); - setSelections2( selectNames, child ); + setSelections( selectNames, child ); } if ( item->isGroup() && selectNames.contains( item->name() ) ) { @@ -222,7 +212,7 @@ PackageModel::setSelections( const QStringList& selectNames ) { if ( m_rootItem ) { - setSelections2( selectNames, m_rootItem ); + ::setSelections( selectNames, m_rootItem ); } } diff --git a/src/modules/netinstall/PackageModel.h b/src/modules/netinstall/PackageModel.h index 5146c63dd..88e0744df 100644 --- a/src/modules/netinstall/PackageModel.h +++ b/src/modules/netinstall/PackageModel.h @@ -68,6 +68,17 @@ public: PackageTreeItem::List getPackages() const; PackageTreeItem::List getItemPackages( PackageTreeItem* item ) const; + /** @brief Appends groups to the tree + * + * Uses the data from @p groupList to add elements to the + * existing tree that m_rootItem points to. If m_rootItem + * is not valid, it does nothing + * + * Before adding anything to the model, it ensures that there + * is no existing data from the same source. If there is, that + * data is pruned first + * + */ void appendModelData(const QVariantList& groupList); private: