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

QTCreator failed to build due to error C2665: 'QSettings::value': no overloaded function could convert all the argument types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • Qt Creator 12.0.0-beta1
    • Building Qt Creator
    • None
    • Windows 10 and VS2022,
      The GitHub commit we used d223136.
    • Windows

    Description

      Qt Creator failed to build due to error C2665: 'QSettings::value': no overloaded function could convert all the argument types on MSVC on Windows, could you please help look at this issue or provide some workarounds? Thanks in advance.

      Repro Steps:

      1. Download the Download attachment: aspects.i

      2. Open x64 Native Tools Command Prompt for VS 2022

      3. cl.exe /TP /EHsc /O2 /Ob2 std:c++17 -permissive -c aspects.i

      Error Message:

      [Please see the attached log for detailed log]

      F:\gitP\qt-creator\qt-creator\src\libs\utils\aspects.cpp(624): error C2665: 'QSettings::value': no overloaded function could convert all the argument types
      F:\tools\qt6\qt\6.3.2\msvc2019_64\include\QtCore\qsettings.h(167): note: could be 'QVariant QSettings::value(const QString &) const'
      F:\gitP\qt-creator\qt-creator\src\libs\utils\aspects.cpp(624): note: 'QVariant QSettings::value(const QString &) const': cannot convert argument 1 from 'Utils::Key' to 'const QString &'
      F:\gitP\qt-creator\qt-creator\src\libs\utils\aspects.cpp(624): note: Reason: cannot convert from 'Utils::Key' to 'const QString'
      F:\gitP\qt-creator\qt-creator\src\libs\utils\aspects.cpp(624): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
      F:\gitP\qt-creator\qt-creator\src\libs\utils\aspects.cpp(624): note: while trying to match the argument list '(Utils::Key)'

      Attachments

        1. aspects.i
          7.75 MB
        2. build.log
          1.11 MB
        3. buildlog.txt
          1.54 MB
        4. newbuild.log
          4.58 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            con Eike Ziller
            eva-an Eva An
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes