qv4l2: 'Set Defaults' incorrectly initialized string controls.
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 14 Oct 2011 10:14:36 +0000 (12:14 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Fri, 14 Oct 2011 10:14:36 +0000 (12:14 +0200)
The wrong QString constructor was used: the 'size' comes before the
character, not the other way around.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/qv4l2/ctrl-tab.cpp

index beadaed..8de4af7 100644 (file)
@@ -784,7 +784,7 @@ void ApplicationWindow::setDefaults(unsigned ctrl_class)
                if (m_ctrlMap[id].type == V4L2_CTRL_TYPE_INTEGER64)
                        setVal64(id, 0);
                else if (m_ctrlMap[id].type == V4L2_CTRL_TYPE_STRING)
-                       setString(id, QString(' ', m_ctrlMap[id].minimum));
+                       setString(id, QString(m_ctrlMap[id].minimum, ' '));
                else if (m_ctrlMap[id].type != V4L2_CTRL_TYPE_BUTTON)
                        setVal(id, m_ctrlMap[id].default_value);
        }