mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
Fix _devices access via shared_ptr
This commit is contained in:
parent
1ecca9fd29
commit
1fc050fdef
1 changed files with 4 additions and 4 deletions
|
@ -74,11 +74,11 @@ QVariant AudioDeviceList::data(const QModelIndex& index, int role) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (role == DisplayRole) {
|
if (role == DisplayRole) {
|
||||||
return _devices.at(index.row()).display;
|
return _devices.at(index.row())->display;
|
||||||
} else if (role == CheckStateRole) {
|
} else if (role == CheckStateRole) {
|
||||||
return _devices.at(index.row()).selected;
|
return _devices.at(index.row())->selected;
|
||||||
} else if (role == InfoRole) {
|
} else if (role == InfoRole) {
|
||||||
return QVariant::fromValue<QAudioDeviceInfo>(_devices.at(index.row()).info);
|
return QVariant::fromValue<QAudioDeviceInfo>(_devices.at(index.row())->info);
|
||||||
} else {
|
} else {
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ QVariant AudioInputDeviceList::data(const QModelIndex& index, int role) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (role == PeakRole) {
|
if (role == PeakRole) {
|
||||||
return std::static_pointer_cast<AudioInputDevice>(_devices.at(index.row())).peak;
|
return std::static_pointer_cast<AudioInputDevice>(_devices.at(index.row()))->peak;
|
||||||
} else {
|
} else {
|
||||||
return AudioDeviceList::data(index, role);
|
return AudioDeviceList::data(index, role);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue