|
|
@ -26,6 +26,8 @@ class BootLoaderModel : public QStandardItemModel
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
|
|
|
|
using DeviceList = QList< Device* >;
|
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BootLoaderPathRole = Qt::UserRole + 1,
|
|
|
|
BootLoaderPathRole = Qt::UserRole + 1,
|
|
|
@ -39,14 +41,12 @@ public:
|
|
|
|
* 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 );
|
|
|
|
|
|
|
|
|
|
|
|
void update();
|
|
|
|
void update();
|
|
|
|
|
|
|
|
|
|
|
|
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
|
|
|
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
|
|
|
|
|
|
|
|
|
|
|
using DeviceList = QList< Device* >;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
DeviceList m_devices;
|
|
|
|
DeviceList m_devices;
|
|
|
|
mutable QMutex m_lock;
|
|
|
|
mutable QMutex m_lock;
|
|
|
|