And remove swapDevice from BootLoaderModel.
This commit is contained in:
parent
cbbaa8b592
commit
1d553407b9
@ -128,19 +128,3 @@ BootLoaderModel::data( const QModelIndex& index, int role ) const
|
|||||||
}
|
}
|
||||||
return QStandardItemModel::data( index, role );
|
return QStandardItemModel::data( index, role );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
BootLoaderModel::swapDevice( Device* oldDevice, Device* newDevice )
|
|
||||||
{
|
|
||||||
Q_ASSERT( oldDevice );
|
|
||||||
Q_ASSERT( newDevice );
|
|
||||||
Q_ASSERT( oldDevice->deviceNode() == newDevice->deviceNode() );
|
|
||||||
|
|
||||||
int indexOfOldDevice = m_devices.indexOf( oldDevice );
|
|
||||||
if ( indexOfOldDevice < 0 )
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_devices[ indexOfOldDevice ] = newDevice;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -51,8 +51,6 @@ public:
|
|||||||
|
|
||||||
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
||||||
|
|
||||||
void swapDevice( Device* oldDevice, Device* newDevice );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList< Device* > m_devices;
|
QList< Device* > m_devices;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user