Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140462

QML Video Recorder example: qmllint warnings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.8.4, 6.10.0 Beta4
    • None

      Running qmllint on https://doc.qt.io/qt-6/qtmultimedia-video-recorder-example.html produces

      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Main.qml:47:9: Type RecorderState of parameter state in signal called recorderStateChanged was not found, but is required to compile onRecorderStateChanged. Did you add all imports and dependencies? [signal-handler-parameters]
              onRecorderStateChanged:
              ^^^^^^^^^^^^^^^^^^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Main.qml:123:24: Detected width on an item that is managed by a layout. This is undefined behavior; use implicitWidth or Layout.preferredWidth instead. [Quick.layout-positioning]
                      width: controls.width
                             ^^^^^^^^^^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Main.qml:124:25: Detected height on an item that is managed by a layout. This is undefined behavior; use implictHeight or Layout.preferredHeight instead. [Quick.layout-positioning]
                      height: 1
                              ^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Main.qml:54:59: Member "orientation" not found on type "QObject" [missing-property]
                          root.contentOrientation = root.screen.orientation;
                                                                ^^^^^^^^^^^
      Info: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/MediaList.qml:6:1: Unused import [unused-imports]
      import QtMultimedia
      ^^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/MediaList.qml:35:20: Unqualified access [unqualified]
                  width: root.height
                         ^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/MediaList.qml:36:21: Unqualified access [unqualified]
                  height: root.height
                          ^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/MediaList.qml:48:29: Unqualified access [unqualified]
                          source: thumbnail
                                  ^^^^^^^^^
      Info: thumbnail is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                          source: <id>.thumbnail
                                  ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/MediaList.qml:55:27: Unqualified access [unqualified]
                          text: url
                                ^^^
      Info: url is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                          text: <id>.url
                                ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/MediaList.qml:63:30: Unqualified access [unqualified]
                      onClicked: { playback.playUrl(url) }
                                   ^^^^^^^^
      Info: playback is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                      onClicked: { <id>.playback.playUrl(url) }
                                   ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/MediaList.qml:63:47: Unqualified access [unqualified]
                      onClicked: { playback.playUrl(url) }
                                                    ^^^
      Info: url is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                      onClicked: { playback.playUrl(<id>.url) }
                                                    ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:36:17: Unqualified access [unqualified]
              active: cameraAvailable
                      ^^^^^^^^^^^^^^^
      Info: cameraAvailable is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              active: root.cameraAvailable
                      ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:41:17: Unqualified access [unqualified]
              active: screenAvailable
                      ^^^^^^^^^^^^^^^
      Info: screenAvailable is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              active: root.screenAvailable
                      ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:46:17: Unqualified access [unqualified]
              active: windowAvailable
                      ^^^^^^^^^^^^^^^
      Info: windowAvailable is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              active: root.windowAvailable
                      ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:137:25: Unqualified access [unqualified]
                  text: model[comboBox.textRole]
                              ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:138:20: Unqualified access [unqualified]
                  width: comboBox.width
                         ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:139:21: Unqualified access [unqualified]
                  height: comboBox.height
                          ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:140:26: Unqualified access [unqualified]
                  highlighted: comboBox.highlightedIndex === index && !isToggler
                               ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:143:24: Unqualified access [unqualified]
                  font.bold: comboBox.currentIndex === index && !isToggler ||
                             ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:144:37: Unqualified access [unqualified]
                             isToggler && comboBox.highlightedIndex === index
                                          ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:145:39: Unqualified access [unqualified]
                  palette.text: isToggler ? comboBox.palette.link : comboBox.palette.text
                                            ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:145:63: Unqualified access [unqualified]
                  palette.text: isToggler ? comboBox.palette.link : comboBox.palette.text
                                                                    ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:150:25: Unqualified access [unqualified]
                          if (isToggler)
                              ^^^^^^^^^
      Info: isToggler is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                          if (<id>.isToggler)
                              ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:151:25: Unqualified access [unqualified]
                              videoSourceModel.toggleEnabledSource(value.sourceType)
                              ^^^^^^^^^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:151:62: Unqualified access [unqualified]
                              videoSourceModel.toggleEnabledSource(value.sourceType)
                                                                   ^^^^^
      Info: value is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                              videoSourceModel.toggleEnabledSource(<id>.value.sourceType)
                                                                   ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:153:25: Unqualified access [unqualified]
                              comboBox.currentIndex = index
                              ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:153:49: Unqualified access [unqualified]
                              comboBox.currentIndex = index
                                                      ^^^^^
      Info: index is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                              comboBox.currentIndex = <id>.index
                                                      ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/VideoSourceSelect.qml:154:25: Unqualified access [unqualified]
                              comboBox.popup.close()
                              ^^^^^^^^
      Info: Set "pragma ComponentBehavior: Bound" in order to use IDs from outer components in nested components.
      pragma ComponentBehavior: Bound
      // Copyright (C) 2021 The Qt Company Ltd.
      Info: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:6:1: Unused import [unused-imports]
      import QtMultimedia
      ^^^^^^
      Info: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:5:1: Unused import [unused-imports]
      import QtQuick.Controls
      ^^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:22:17: Unqualified access [unqualified]
              radius: outerRadius
                      ^^^^^^^^^^^
      Info: outerRadius is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              radius: root.outerRadius
                      ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:30:16: Unqualified access [unqualified]
              width: recording ? innerRadius * 2 - 15 : innerRadius * 2
                     ^^^^^^^^^
      Info: recording is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              width: root.recording ? innerRadius * 2 - 15 : innerRadius * 2
                     ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:30:28: Unqualified access [unqualified]
              width: recording ? innerRadius * 2 - 15 : innerRadius * 2
                                 ^^^^^^^^^^^
      Info: innerRadius is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              width: recording ? root.innerRadius * 2 - 15 : innerRadius * 2
                                 ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:30:51: Unqualified access [unqualified]
              width: recording ? innerRadius * 2 - 15 : innerRadius * 2
                                                        ^^^^^^^^^^^
      Info: innerRadius is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              width: recording ? innerRadius * 2 - 15 : root.innerRadius * 2
                                                        ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:31:17: Unqualified access [unqualified]
              height: recording ? innerRadius * 2 - 15 : innerRadius * 2
                      ^^^^^^^^^
      Info: recording is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              height: root.recording ? innerRadius * 2 - 15 : innerRadius * 2
                      ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:31:29: Unqualified access [unqualified]
              height: recording ? innerRadius * 2 - 15 : innerRadius * 2
                                  ^^^^^^^^^^^
      Info: innerRadius is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              height: recording ? root.innerRadius * 2 - 15 : innerRadius * 2
                                  ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:31:52: Unqualified access [unqualified]
              height: recording ? innerRadius * 2 - 15 : innerRadius * 2
                                                         ^^^^^^^^^^^
      Info: innerRadius is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              height: recording ? innerRadius * 2 - 15 : root.innerRadius * 2
                                                         ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:32:17: Unqualified access [unqualified]
              radius: recording ? 2 : innerRadius
                      ^^^^^^^^^
      Info: recording is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              radius: root.recording ? 2 : innerRadius
                      ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/RecordButton.qml:32:33: Unqualified access [unqualified]
              radius: recording ? 2 : innerRadius
                                      ^^^^^^^^^^^
      Info: innerRadius is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              radius: recording ? 2 : root.innerRadius
                                      ^^^^^
      Info: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Controls.qml:6:1: Unused import [unused-imports]
      import QtQuick.Layouts
      ^^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Controls.qml:35:24: Unqualified access [unqualified]
                  recording: recorder.recorderState === MediaRecorder.RecordingState
                             ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                  recording: root.recorder.recorderState === MediaRecorder.RecordingState
                             ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Controls.qml:36:36: Unqualified access [unqualified]
                  onClicked: recording ? recorder.stop() : recorder.record()
                                         ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                  onClicked: recording ? root.recorder.stop() : recorder.record()
                                         ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Controls.qml:36:54: Unqualified access [unqualified]
                  onClicked: recording ? recorder.stop() : recorder.record()
                                                           ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                  onClicked: recording ? recorder.stop() : root.recorder.record()
                                                           ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Controls.qml:69:43: Unqualified access [unqualified]
                  onClicked: settingsVisible = !settingsVisible
                                                ^^^^^^^^^^^^^^^
      Info: settingsVisible is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                  onClicked: settingsVisible = !root.settingsVisible
                                                ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Controls.qml:69:43: Unqualified access [unqualified]
                  onClicked: settingsVisible = !settingsVisible
                                                ^^^^^^^^^^^^^^^
      Info: settingsVisible is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                  onClicked: settingsVisible = !root.settingsVisible
                                                ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Controls.qml:78:32: Unqualified access [unqualified]
                  var m = Math.floor(recorder.duration / 60000)
                                     ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                  var m = Math.floor(root.recorder.duration / 60000)
                                     ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Controls.qml:79:23: Unqualified access [unqualified]
                  var ms = (recorder.duration / 1000 - m * 60).toFixed(1)
                            ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                  var ms = (root.recorder.duration / 1000 - m * 60).toFixed(1)
                            ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsMetaData.qml:27:21: Unqualified access [unqualified]
                      if (recorder.metaData.stringValue(key))
                          ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                      if (root.recorder.metaData.stringValue(key))
                          ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsMetaData.qml:29:41: Unqualified access [unqualified]
                                      { text: recorder.metaData.metaDataKeyToString(key)
                                              ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                                      { text: root.recorder.metaData.metaDataKeyToString(key)
                                              ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsMetaData.qml:77:21: Unqualified access [unqualified]
                          recorder.metaDataChanged()
                          ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                          root.recorder.metaDataChanged()
                          ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsMetaData.qml:141:70: Unqualified access [unqualified]
                      onClicked: { root.recorder.metaData.remove(r.value); recorder.metaDataChanged() }
                                                                           ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
                      onClicked: { root.recorder.metaData.remove(r.value); root.recorder.metaDataChanged() }
                                                                           ^^^^^
      Info: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsEncoder.qml:6:1: Unused import [unused-imports]
      import QtQuick.Controls
      ^^^^^^
      Info: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsEncoder.qml:5:1: Unused import [unused-imports]
      import QtQuick.Layouts
      ^^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsEncoder.qml:23:17: Unqualified access [unqualified]
              target: recorder
                      ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              target: root.recorder
                      ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsEncoder.qml:41:31: Unqualified access [unqualified]
              onActivated: (v) => { recorder.quality = v }
                                    ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              onActivated: (v) => { root.recorder.quality = v }
                                    ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsEncoder.qml:48:31: Unqualified access [unqualified]
              onActivated: (v) => { recorder.mediaFormat.audioCodec = v }
                                    ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              onActivated: (v) => { root.recorder.mediaFormat.audioCodec = v }
                                    ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsEncoder.qml:69:31: Unqualified access [unqualified]
              onActivated: (v) => { recorder.mediaFormat.videoCodec = v }
                                    ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              onActivated: (v) => { root.recorder.mediaFormat.videoCodec = v }
                                    ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/SettingsEncoder.qml:88:31: Unqualified access [unqualified]
              onActivated: (v) => { recorder.mediaFormat.fileFormat = v }
                                    ^^^^^^^^
      Info: recorder is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              onActivated: (v) => { root.recorder.mediaFormat.fileFormat = v }
                                    ^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/StyleSlider.qml:21:22: Member "valueWidth" not found on type "Style" [missing-property]
              width: Style.valueWidth
                           ^^^^^^^^^^
      Warning: <QTROOT>/qtmultimedia/examples/multimedia/video/recorder/Playback.qml:47:35: Unqualified access [unqualified]
              opacity: hover.hovered && active ? 1.0 : 0.0
                                        ^^^^^^
      Info: active is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
              opacity: hover.hovered && root.active ? 1.0 : 0.0
                                        ^^^^^
      

        For Gerrit Dashboard: QTBUG-140462
        # Subject Branch Project Status CR V

            skoh-qt Sze Howe Koh
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change