Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-26765

error for manual building

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • Qt Creator 6.0.0
    • Building Qt Creator
    • None
    • Qt/5.15.2/gcc_64/bin usr/local/cuda-10.0/bin Other_Lib/LLVM-Clang/libclang/bin
    • Linux/X11

    Description

      Ubuntu 20.04, Qt 5.15.2

      source code QtCreator: https://github.com/qt-creator/qt-creator/tree/6.0

      FAILED: src/plugins/qmldesigner/CMakeFiles/QmlDesigner.dir/components/navigator/choosefrompropertylistdialog.cpp.o

      ...

      ../src/plugins/qmldesigner/components/navigator/choosefrompropertylistdialog.cpp:39:107: error: no matching function for call to 'QByteArray::replace(std::__cxx11::string, const char [1])'
      TypeName nodePackage = insertInfo.typeName().replace(insertInfo.simplifiedTypeName().toStdString(), "");

      ...

      ninja: build stopped: subcommand failed

      ====================================================

      The essence of the problem is in the file qt-creator_6.0/src/plugins/qmldesigner/components/navigator/choosefrompropertylistdialog.cpp, strings

      [39] TypeName nodePackage = insertInfo.typeName().replace(insertInfo.simplifiedTypeName().toStdString(), "");
      [40] TypeName targetPackage = parentInfo.typeName().replace(parentInfo.simplifiedTypeName().toStdString(), "");

      error description:

      choosefrompropertylistdialog.cpp:39:50: error: no matching member function for call to 'replace'
      qbytearray.h:734:32: note: candidate function not viable: no known conversion from 'std::string' (aka 'basic_string<char>') to 'char' for 1st argument
      qbytearray.h:736:32: note: candidate function not viable: no known conversion from 'std::string' (aka 'basic_string<char>') to 'const QByteArray' for 1st argument
      qbytearray.h:738:32: note: candidate function not viable: no known conversion from 'std::string' (aka 'basic_string<char>') to 'const char *' for 1st argument
      qbytearray.h:322:17: note: candidate function not viable: no known conversion from 'std::string' (aka 'basic_string<char>') to 'char' for 1st argument
      qbytearray.h:325:17: note: candidate function not viable: no known conversion from 'std::string' (aka 'basic_string<char>') to 'const QByteArray' for 1st argument
      qbytearray.h:327:17: note: candidate function not viable: no known conversion from 'std::string' (aka 'basic_string<char>') to 'const char *' for 1st argument
      qbytearray.h:328:17: note: candidate function not viable: no known conversion from 'std::string' (aka 'basic_string<char>') to 'char' for 1st argument
      ...
      qbytearray.h:320:17: note: candidate function not viable: requires 3 arguments, but 2 were provided
      qbytearray.h:319:17: note: candidate function not viable: requires 4 arguments, but 2 were provided
      qbytearray.h:324:17: note: candidate function not viable: requires 4 arguments, but 2 were provided

      the solution to the problem is to change the lines as follows:

      [39] TypeName nodePackage = insertInfo.typeName().replace(insertInfo.simplifiedTypeName().toStdString().c_str(), "");
      [40] TypeName targetPackage = parentInfo.typeName().replace(parentInfo.simplifiedTypeName().toStdString().c_str(), "");

       

       

       

       

       

      Attachments

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

        Activity

          People

            con Eike Ziller
            ballwin Vladimir Bolvin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes