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

compilation fails on ambiguous conversion to bool

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.13.2
    • Fix Version/s: 5.14.0 RC1
    • Component/s: Multimedia
    • Labels:
      None
    • Environment:
      macOS Catalina
    • Platform/s:
      iOS/tvOS/watchOS
    • Commits:
      b64bdf32ce10b039e8d7b1be18d001e89f315615 (qt/qtmultimedia/5.13)

      Description

      Compiling from source fails for me with:

      In file included from /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfmediaassetwriter.mm:41:
      In file included from /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfmediarecordercontrol_ios.h:43:
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfmediaassetwriter.h:63:42: warning: declaration of instance variables in
            the interface is deprecated [-Wobjc-interface-ivars]
          QT_PREPEND_NAMESPACE(AVFAtomicInt64) m_durationInMs;
                                               ^
      cd lconvert/ && ( test -e Makefile || /Users/foxi/QtFoxi/qt-5.13.2/qtbase/bin/qmake -o Makefile /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qttools/src/linguist/lconvert/lconvert.pro ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile 
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfmediaassetwriter.mm:369:29: warning: null passed to a callee that requires
            a non-null argument [-Wnonnull]
                      [vfDelegate captureOutput:nil didOutputSampleBuffer:sampleBuffer fromConnection:nil];
                                  ^             ~~~
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfmediaassetwriter.mm:369:29: warning: null passed to a callee that requires
            a non-null argument [-Wnonnull]
                      [vfDelegate captureOutput:nil didOutputSampleBuffer:sampleBuffer fromConnection:nil];
                                  ^                                                                   ~~~
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfmediaassetwriter.mm:416:9: error: conversion from
            '::AVFScopedPointer<AVCaptureAudioDataOutput>' to 'bool' is ambiguous
          if (m_audioOutput && [captureSession canAddOutput:m_audioOutput]) {
              ^~~~~~~~~~~~~
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfcamerautility.h:100:5: note: candidate function
          operator T*() const
          ^
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtbase/include/QtCore/../../src/corelib/tools/qscopedpointer.h:132:5: note: candidate function
          operator RestrictedBool() const Q_DECL_NOTHROW
          ^
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfmediaassetwriter.mm:434:5: error: conversion from
            '::AVFScopedPointer<AVAssetWriter>' to 'bool' is ambiguous
          Q_ASSERT(m_assetWriter);
          ^~~~~~~~~~~~~~~~~~~~~~~
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:788:55: note: expanded from macro 'Q_ASSERT'
      #    define Q_ASSERT(cond) static_cast<void>(false && (cond))
                                                            ^~~~~~
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfcamerautility.h:100:5: note: candidate function
          operator T*() const
          ^
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtbase/include/QtCore/../../src/corelib/tools/qscopedpointer.h:132:5: note: candidate function
          operator RestrictedBool() const Q_DECL_NOTHROW
          ^
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfmediaassetwriter.mm:454:9: error: conversion from
            '::AVFScopedPointer<AVCaptureAudioDataOutput>' to 'bool' is ambiguous
          if (m_audioOutput) {
              ^~~~~~~~~~~~~
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfcamerautility.h:100:5: note: candidate function
          operator T*() const
          ^
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtbase/include/QtCore/../../src/corelib/tools/qscopedpointer.h:132:5: note: candidate function
          operator RestrictedBool() const Q_DECL_NOTHROW
          ^
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfmediaassetwriter.mm:482:9: error: conversion from
            '::AVFScopedPointer<AVCaptureAudioDataOutput>' to 'bool' is ambiguous
          if (m_audioOutput) {
              ^~~~~~~~~~~~~
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtmultimedia/src/plugins/avfoundation/camera/avfcamerautility.h:100:5: note: candidate function
          operator T*() const
          ^
      /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qtbase/include/QtCore/../../src/corelib/tools/qscopedpointer.h:132:5: note: candidate function
          operator RestrictedBool() const Q_DECL_NOTHROW
          ^
      make[4]: Nothing to be done for `first'.
      cd lprodump/ && ( test -e Makefile || /Users/foxi/QtFoxi/qt-5.13.2/qtbase/bin/qmake -o Makefile /Users/foxi/QtFoxi/qt-everywhere-src-5.13.2/qttools/src/linguist/lprodump/lprodump.pro ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile 
      3 warnings and 4 errors generated.
      make[5]: *** [.obj/avfmediaassetwriter.o] Error 1
      make[4]: *** [sub-camera-make_first] Error 2
      make[3]: *** [sub-avfoundation-make_first] Error 2
      make[2]: *** [sub-plugins-make_first] Error 2
      make[1]: *** [sub-src-make_first] Error 2
      make: *** [module-qtmultimedia-make_first] Error 2
      make: *** Waiting for unfinished jobs....
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              tpochep Timur Pocheptsov
              Reporter:
              mr.gadgets Frank van Vugt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes