From b28ee24628f77fced393cacc45500be6761e4497 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Wed, 22 Jan 2014 16:18:42 +0100 Subject: New QCameraInfo class. The class allows to get the list of available cameras on the system as well as getting some static information about them such as their unique ID, display name, physical position and sensor orientation. This makes QCamera::availableDevices() and QCamera::deviceDescription() obsolete. This patch contains the API, documentation and auto-tests but not the actual implementation by each backend (except for retrieving the default camera device). [ChangeLog][QtMultimedia] Added new QCameraInfo class [ChangeLog][QtMultimedia] QCamera: availableDevices() and deviceDescription() are deprecated, use QCameraInfo instead Change-Id: I64fd65729ab26a789468979ed5444ee90bb82cd0 Reviewed-by: Christian Stromme --- src/plugins/directshow/camera/dsvideodevicecontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/directshow/camera') diff --git a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp index 0f639bdce..ead1060d4 100644 --- a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp +++ b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp @@ -153,7 +153,7 @@ void DSVideoDeviceControl::enumerateDevices(QList *devices, QStringL void DSVideoDeviceControl::setSelectedDevice(int index) { - if (index >= 0 && index <= m_devices.count()) { + if (index >= 0 && index < m_devices.count()) { if (m_session) { QString device = m_devices.at(index); if (device.startsWith("ds:")) -- cgit v1.2.3