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

ror: no matching conversion for functional-style cast from 'const char[5]' to 'QStringView'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P0: Blocker
    • 6.7.0 RC, 6.8.0 FF
    • 6.7.0 RC
    • Multimedia
    • None
    • Android
    • 9a7417186 (dev), 77b4d7acd (6.7.0)
    • 2024wk10FOQtforAndroid

    Description

      plugins/multimedia/ffmpeg/qffmpeg.cpp:230:26: error: no matching conversion for functional-style cast from 'const char[5]' to 'QStringView'
              if (codecName == QStringView("3gpp")) return AV_CODEC_ID_H263;
                               ^~~~~~~~~~~~~~~~~~
      /home/qt/work/install/target/include/QtCore/qstringview.h:76:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const char[5]' to 'const QStringView' for 1st argument
      class QStringView
            ^
      /home/qt/work/install/target/include/QtCore/qstringview.h:76:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'const char[5]' to 'QStringView' for 1st argument
      /home/qt/work/install/target/include/QtCore/qstringview.h:126:15: note: candidate constructor not viable: no known conversion from 'const char[5]' to 'std::nullptr_t' for 1st argument
          constexpr QStringView(std::nullptr_t) noexcept
                    ^
      /home/qt/work/install/target/include/QtCore/qstringview.h:153:15: note: candidate template ignored: requirement 'QtPrivate::IsCompatiblePointer<char[5]>::value' was not satisfied [with Pointer = char[5]]
          constexpr QStringView(const Pointer &str) noexcept
                    ^
      /home/qt/work/install/target/include/QtCore/qstringview.h:161:5: note: candidate template ignored: requirement 'std::is_same<char[5], QString>::value' was not satisfied [with String = char[5]]
          QStringView(const String &str) noexcept
          ^
      /home/qt/work/install/target/include/QtCore/qstringview.h:166:31: note: candidate template ignored: requirement 'QtPrivate::IsContainerCompatibleWithQStringView<char[5], void>::value' was not satisfied [with Container = char[5]]
          constexpr Q_ALWAYS_INLINE QStringView(const Container &c) noexcept
                                    ^
      /home/qt/work/install/target/include/QtCore/qstringview.h:125:15: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
          constexpr QStringView() noexcept {}
                    ^
      /home/qt/work/install/target/include/QtCore/qstringview.h:130:15: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
          constexpr QStringView(const Char *str, qsizetype len)
                    ^
      /home/qt/work/install/target/include/QtCore/qstringview.h:141:15: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
          constexpr QStringView(const Char *f, const Char *l)
                    ^
      /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/ffmpeg/qffmpeg.cpp:231:26: error: no matching conversion for functional-style cast from 'const char[4]' to 'QStringView'
              if (codecName == QStringView("avc")) return AV_CODEC_ID_H264;
      

      Build log: https://testresults.qt.io/logs/qt/qtmultimedia/c3892d9852da0cc4225cc6a1ae760f091e5af3f4/LinuxRHEL_8_8x86_64AndroidAndroid_ANYx86GCCqtci-linux-RHEL-8.8-x86_64-50-6ecdd7AndroidTestRun_Sccache_UseConfigure_WarningsAreErrors/f874b1a777aaeb58ef1ab1c8b0ffed7172a994b3/build_1709824604/log.txt.gz

      Details: https://testresults.qt.io/coin/integration/qt/qtmultimedia/tasks/1709824555

      Tested changes (refs/builds/qtci/6.7.0/1709822277):
      https://codereview.qt-project.org/c/qt/qtmultimedia/+/546163/2 Update dependencies on '6.7.0' in qt/qtmultimedia

      Attachments

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

        Activity

          People

            bartlomiejmoskal Bartlomiej Moskal
            janihe Jani Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change