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

QML Camera ImageCapture Parameter not declared

    XMLWordPrintable

Details

    • Android, iOS/tvOS/watchOS
    • dd3701e6c (dev), 53eafd93b (6.7), a77f55831 (6.6), 48bf56477 (tqtc/lts-6.5)
    • 2023wk48FOQtforAndroid, 2023wk50FOQtforAndroid, 2023wk52FOQtforAndroid, 2024wk02FOQtforAndroid

    Description

      QML Camera: ImageCapture: imageSaved(requestId, path) doesn’t work. path is not known.

      So I compared the QML Camera doc with QCamera: QImageCapture: imageSaved(id, fileName).

      fileName is working on QML Camera: ImageCapture:

      onImageSaved: {
        console.log("requestId: ",requestId," fileName: ", fileName)
        lastSavedImageFileName = fileName
        photoPreview.source = "file://"+fileName
      } 

      But now there’s a warning in the logs:

      W qt.qml.context: : qrc:/qml/photo/CapturePhotoPage.qml:163:13 Parameter "fileName" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead. 

      there seems to be a mismatch between the docs and implementation

      same happens with 

      onErrorOccured: {}

      where message doesn't work - you must use errorString. errorString works, but there's same warning as for fileName.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              bartlomiejmoskal Bartlomiej Moskal
              ekkescorner Ekkehard
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes