[netinstall] Convenience typedefs
This commit is contained in:
parent
91e949f8fc
commit
51c74c6abb
@ -111,7 +111,7 @@ NetInstallPage::dataIsHere( QNetworkReply* reply )
|
|||||||
emit checkReady( true );
|
emit checkReady( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<PackageTreeItem::ItemData>
|
PackageModel::PackageItemDataList
|
||||||
NetInstallPage::selectedPackages() const
|
NetInstallPage::selectedPackages() const
|
||||||
{
|
{
|
||||||
if ( m_groups )
|
if ( m_groups )
|
||||||
@ -119,7 +119,7 @@ NetInstallPage::selectedPackages() const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
cDebug() << "WARNING: no netinstall groups are available.";
|
cDebug() << "WARNING: no netinstall groups are available.";
|
||||||
return QList<PackageTreeItem::ItemData>();
|
return PackageModel::PackageItemDataList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public:
|
|||||||
// Returns the list of packages belonging to groups that are
|
// Returns the list of packages belonging to groups that are
|
||||||
// selected in the view in this given moment. No data is cached here, so
|
// selected in the view in this given moment. No data is cached here, so
|
||||||
// this function does not have constant time.
|
// this function does not have constant time.
|
||||||
QList<PackageTreeItem::ItemData> selectedPackages() const;
|
PackageModel::PackageItemDataList selectedPackages() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void dataIsHere( QNetworkReply* );
|
void dataIsHere( QNetworkReply* );
|
||||||
|
@ -127,7 +127,7 @@ NetInstallViewStep::onLeave()
|
|||||||
cDebug() << "Leaving netinstall, adding packages to be installed"
|
cDebug() << "Leaving netinstall, adding packages to be installed"
|
||||||
<< "to global storage";
|
<< "to global storage";
|
||||||
|
|
||||||
QList<PackageTreeItem::ItemData> packages = m_widget->selectedPackages();
|
PackageModel::PackageItemDataList packages = m_widget->selectedPackages();
|
||||||
QVariantList installPackages;
|
QVariantList installPackages;
|
||||||
QVariantList tryInstallPackages;
|
QVariantList tryInstallPackages;
|
||||||
QVariantList packageOperations;
|
QVariantList packageOperations;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017, Kyle Robbertze <kyle@aims.ac.za>
|
* Copyright (c) 2017, Kyle Robbertze <kyle@aims.ac.za>
|
||||||
@ -28,14 +29,13 @@
|
|||||||
|
|
||||||
#include <yaml-cpp/yaml.h>
|
#include <yaml-cpp/yaml.h>
|
||||||
|
|
||||||
// Required forward declarations
|
|
||||||
class PackageTreeItem;
|
|
||||||
|
|
||||||
class PackageModel : public QAbstractItemModel
|
class PackageModel : public QAbstractItemModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
using PackageItemDataList = QList< PackageTreeItem::ItemData >;
|
||||||
|
|
||||||
explicit PackageModel( const YAML::Node& data, QObject* parent = nullptr );
|
explicit PackageModel( const YAML::Node& data, QObject* parent = nullptr );
|
||||||
~PackageModel() override;
|
~PackageModel() override;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ public:
|
|||||||
QModelIndex parent( const QModelIndex& index ) const override;
|
QModelIndex parent( const QModelIndex& index ) const override;
|
||||||
int rowCount( const QModelIndex& parent = QModelIndex() ) const override;
|
int rowCount( const QModelIndex& parent = QModelIndex() ) const override;
|
||||||
int columnCount( 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;
|
QList<PackageTreeItem*> getItemPackages( PackageTreeItem* item ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user