[partition] Improve type notation
This commit is contained in:
parent
dd6d1bf1c1
commit
544131c4bc
@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -45,7 +46,7 @@ DeviceModel::~DeviceModel()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DeviceModel::init( const QList< Device* >& devices )
|
DeviceModel::init( const DeviceList& devices )
|
||||||
{
|
{
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
m_devices = devices;
|
m_devices = devices;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
* Copyright 2017, 2019, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -36,11 +36,13 @@ public:
|
|||||||
DeviceModel( QObject* parent = nullptr );
|
DeviceModel( QObject* parent = nullptr );
|
||||||
~DeviceModel() override;
|
~DeviceModel() override;
|
||||||
|
|
||||||
|
using DeviceList = QList< Device* >;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init the model with the list of devices. Does *not* take ownership of the
|
* Init the model with the list of devices. Does *not* take ownership of the
|
||||||
* devices.
|
* devices.
|
||||||
*/
|
*/
|
||||||
void init( const QList< Device* >& devices );
|
void init( const DeviceList& devices );
|
||||||
|
|
||||||
int rowCount( const QModelIndex& parent = QModelIndex() ) const override;
|
int rowCount( const QModelIndex& parent = QModelIndex() ) const override;
|
||||||
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
||||||
@ -54,7 +56,7 @@ public:
|
|||||||
void removeDevice( Device* device );
|
void removeDevice( Device* device );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList< Device* > m_devices;
|
DeviceList m_devices;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* DEVICEMODEL_H */
|
#endif /* DEVICEMODEL_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user