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

compilation fails on ambiguous conversion to bool

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.0 RC1
    • 5.13.2
    • Multimedia
    • None
    • macOS Catalina
    • iOS/tvOS/watchOS
    • 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

              tpochep Timur Pocheptsov
              jirauser24743 user-678dd (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes