er, better this way

This commit is contained in:
Arisotura 2022-10-02 14:20:08 +02:00
parent 42a33b9282
commit a4b0ac29b1
1 changed files with 1 additions and 3 deletions

View File

@ -165,12 +165,10 @@ void CameraManager::init()
#if QT_VERSION >= 0x060000
const QList<QCameraDevice> cameras = QMediaDevices::videoInputs();
const QCameraDevice& dev;
for (const QCameraDevice& cam : cameras)
{
if (QString(cam.id()) == camDeviceName)
{
dev = cam;
camDevice = new QCamera(cam);
break;
}
@ -178,7 +176,7 @@ void CameraManager::init()
if (camDevice)
{
const QList<QCameraFormat> supported = dev.videoFormats();
const QList<QCameraFormat> supported = camDevice.cameraDevice().videoFormats();
bool good = false;
for (const QCameraFormat& item : supported)
{