[netinstall] Convenience typedefs

This commit is contained in:
Adriaan de Groot 2017-11-06 05:42:13 -05:00
parent 91e949f8fc
commit 51c74c6abb
4 changed files with 8 additions and 8 deletions

View File

@ -111,7 +111,7 @@ NetInstallPage::dataIsHere( QNetworkReply* reply )
emit checkReady( true );
}
QList<PackageTreeItem::ItemData>
PackageModel::PackageItemDataList
NetInstallPage::selectedPackages() const
{
if ( m_groups )
@ -119,7 +119,7 @@ NetInstallPage::selectedPackages() const
else
{
cDebug() << "WARNING: no netinstall groups are available.";
return QList<PackageTreeItem::ItemData>();
return PackageModel::PackageItemDataList();
}
}

View File

@ -63,7 +63,7 @@ public:
// Returns the list of packages belonging to groups that are
// selected in the view in this given moment. No data is cached here, so
// this function does not have constant time.
QList<PackageTreeItem::ItemData> selectedPackages() const;
PackageModel::PackageItemDataList selectedPackages() const;
public slots:
void dataIsHere( QNetworkReply* );

View File

@ -127,7 +127,7 @@ NetInstallViewStep::onLeave()
cDebug() << "Leaving netinstall, adding packages to be installed"
<< "to global storage";
QList<PackageTreeItem::ItemData> packages = m_widget->selectedPackages();
PackageModel::PackageItemDataList packages = m_widget->selectedPackages();
QVariantList installPackages;
QVariantList tryInstallPackages;
QVariantList packageOperations;

View File

@ -1,3 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright (c) 2017, Kyle Robbertze <kyle@aims.ac.za>
@ -28,14 +29,13 @@
#include <yaml-cpp/yaml.h>
// Required forward declarations
class PackageTreeItem;
class PackageModel : public QAbstractItemModel
{
Q_OBJECT
public:
using PackageItemDataList = QList< PackageTreeItem::ItemData >;
explicit PackageModel( const YAML::Node& data, QObject* parent = nullptr );
~PackageModel() override;
@ -52,7 +52,7 @@ public:
QModelIndex parent( const QModelIndex& index ) const override;
int rowCount( const QModelIndex& parent = QModelIndex() ) const override;
int columnCount( const QModelIndex& parent = QModelIndex() ) const override;
QList<PackageTreeItem::ItemData> getPackages() const;
PackageItemDataList getPackages() const;
QList<PackageTreeItem*> getItemPackages( PackageTreeItem* item ) const;
private: