Use ItemToIndex and fix memory leaks in devices

This commit is contained in:
Jonas Kvinge
2019-01-21 17:44:37 +01:00
parent b35c641df6
commit ad5e366aad
10 changed files with 248 additions and 206 deletions

View File

@@ -88,13 +88,13 @@ class DeviceView : public AutoExpandingTreeView {
void Organise();
void Delete();
void DeviceConnected(int row);
void DeviceDisconnected(int row);
void DeviceConnected(QModelIndex idx);
void DeviceDisconnected(QModelIndex idx);
void DeleteFinished(const SongList &songs_with_errors);
// AutoExpandingTreeView
bool CanRecursivelyExpand(const QModelIndex &index) const;
bool CanRecursivelyExpand(const QModelIndex &idx) const;
private:
QModelIndex MapToDevice(const QModelIndex &merged_model_index) const;