Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-14932

proper std::to_chars float fallback

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • None
    • QDS 4.8
    • Project Storage
    • None

    Description

          template<typename Type, typename std::enable_if_t<std::is_arithmetic_v<Type>, bool> = true>
          void append(Type number)
          {
      #if !(defined(__cpp_lib_to_chars) && (__cpp_lib_to_chars >= 201611L))
              if constexpr (std::is_floating_point_v<Type>) {
                  QLocale locale{QLocale::Language::C};
                  append(locale.toString(number).toStdString());
                  return;
              }
      #endif
              // 2 bytes for the sign and because digits10 returns the floor
              char buffer[std::numeric_limits<Type>::digits10 + 2];
              auto result = std::to_chars(buffer, buffer + sizeof(buffer), number);
              auto endOfConversionString = result.ptr;
      
              append({buffer, endOfConversionString});
          }
      

      linux gcc10:

      FAILED: src/plugins/qmldesigner/libs/designercore/CMakeFiles/QmlDesignerCore.dir/projectstorage/projectstorage.cpp.o 
      /opt/rh/gcc-toolset-10/root/usr/bin/c++ -DENABLE_PROJECT_STORAGE_TRACING -DENABLE_QMLDESIGNER_TRACING -DNANOTRACE_ENABLED -DQDS_BUILD_QMLPARSER -DQDS_USE_PROJECTSTORAGE -DQMLDESIGNERCORE_LIBRARY -DQMLDESIGNERSETTINGS_LIBRARY -DQMLDESIGNERUTILS_LIBRARY -DQMLPUPPETCOMMUNICATION_LIBRARY -DQT_CONCURRENT_LIB -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_CREATOR -DQT_DISABLE_DEPRECATED_UP_TO=0x050900 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_OPENGL_LIB -DQT_QMLCOMPILER_LIB -DQT_QMLDOM_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMETA_LIB -DQT_QMLMODELS_LIB -DQT_QMLTOOLINGSETTINGS_LIB -DQT_QMLWORKERSCRIPT_LIB -DQT_QML_LIB -DQT_QUICK_LIB -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x060400 -DQT_WIDGETS_LIB -DQmlDesignerCore_EXPORTS -DRELATIVE_DATA_PATH=\"../share/qtcreator\" -DRELATIVE_DOC_PATH=\"../share/doc/qtcreator\" -DRELATIVE_LIBEXEC_PATH=\"../libexec/qtcreator\" -DRELATIVE_PLUGIN_PATH=\"../lib/qtcreator/plugins\" -DSHARE_QML_PATH=\"/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/../../../../../share/qtcreator/qmldesigner\" -DTEXTEDITORSUPPORT_LIBRARY -I/home/qt/work/build/qt-creator_build/build/src/plugins/qmldesigner/libs/designercore -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore -I/home/qt/work/build/qt-creator_build/build/src/plugins/qmldesigner/libs/designercore/QmlDesignerCore_autogen/include -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/designercoreutils -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/exceptions -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/filemanager -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/imagecache -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/tracing -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/metainfo -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/model -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/rewriter -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/pluginmanager -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/sourcepathstorage -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage -I/home/qt/work/build/qt-creator/src/libs -I/home/qt/work/build/qt-creator/src/libs/utils/mimetypes2 -I/home/qt/work/build/qt-creator/src/libs/3rdparty -I/home/qt/work/build/qt-creator/src/plugins -I/home/qt/work/build/qt-creator/src/plugins/qmldesignerbase/settings -I/home/qt/work/build/qt-creator/src/libs/qmlpuppetcommunication/types -I/home/qt/work/build/qt-creator/src/libs/qmlpuppetcommunication/interfaces -I/home/qt/work/build/qt-creator/src/libs/qmlpuppetcommunication/container -I/home/qt/work/build/qt-creator/src/libs/qmlpuppetcommunication/commands -I/home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/qmldesignerutils -I/home/qt/work/build/qt-creator/src/libs/sqlite -isystem /home/qt/work/build/qt_install_dir/include/QtConcurrent -isystem /home/qt/work/build/qt_install_dir/include -isystem /home/qt/work/build/qt_install_dir/include/QtCore -isystem /home/qt/work/build/qt_install_dir/mkspecs/linux-g++ -isystem /home/qt/work/build/qt_install_dir/include/QtNetwork -isystem /home/qt/work/build/qt_install_dir/include/QtGui -isystem /home/qt/work/build/qt_install_dir/include/QtWidgets -isystem /home/qt/work/build/qt_install_dir/include/QtCore5Compat -isystem /home/qt/work/build/qt_install_dir/include/QtQml -isystem /home/qt/work/build/qt_install_dir/include/QtQmlIntegration -isystem /home/qt/work/build/qt_install_dir/include/QtQml/6.8.2 -isystem /home/qt/work/build/qt_install_dir/include/QtQml/6.8.2/QtQml -isystem /home/qt/work/build/qt_install_dir/include/QtCore/6.8.2 -isystem /home/qt/work/build/qt_install_dir/include/QtCore/6.8.2/QtCore -isystem /home/qt/work/build/qt_install_dir/include/QtQuick -isystem /home/qt/work/build/qt_install_dir/include/QtQmlMeta -isystem /home/qt/work/build/qt_install_dir/include/QtQmlModels -isystem /home/qt/work/build/qt_install_dir/include/QtQmlWorkerScript -isystem /home/qt/work/build/qt_install_dir/include/QtOpenGL -isystem /home/qt/work/build/qt_install_dir/include/QtQmlDom -isystem /home/qt/work/build/qt_install_dir/include/QtQmlDom/6.8.2 -isystem /home/qt/work/build/qt_install_dir/include/QtQmlDom/6.8.2/QtQmlDom -isystem /home/qt/work/build/qt_install_dir/include/QtQmlCompiler/6.8.2 -isystem /home/qt/work/build/qt_install_dir/include/QtQmlCompiler/6.8.2/QtQmlCompiler -isystem /home/qt/work/build/qt_install_dir/include/QtQmlToolingSettings -isystem /home/qt/work/build/qt_install_dir/include/QtQmlToolingSettings/6.8.2 -isystem /home/qt/work/build/qt_install_dir/include/QtQmlToolingSettings/6.8.2/QtQmlToolingSettings -isystem /home/qt/work/build/qt_install_dir/include/QtQmlCompiler -O2 -g -DNDEBUG -std=c++2a -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fconcepts-diagnostics-depth=8 -pthread -fPIC -MD -MT src/plugins/qmldesigner/libs/designercore/CMakeFiles/QmlDesignerCore.dir/projectstorage/projectstorage.cpp.o -MF src/plugins/qmldesigner/libs/designercore/CMakeFiles/QmlDesignerCore.dir/projectstorage/projectstorage.cpp.o.d -o src/plugins/qmldesigner/libs/designercore/CMakeFiles/QmlDesignerCore.dir/projectstorage/projectstorage.cpp.o -c /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.cpp
      In file included from /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:8,
                       from /home/qt/work/build/qt-creator/src/libs/sqlite/sqliteids.h:9,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include/sourcepathids.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include/projectstorageids.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/filestatus.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstoragetypes.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/commontypecache.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.cpp:4:
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h: In instantiation of ‘void NanotraceHR::StaticString<Capacity>::append(Type) [with Type = double; typename std::enable_if<is_arithmetic_v<Type>, bool>::type <anonymous> = true; long unsigned int Capacity = 3700]’:
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:163:18:   required from ‘void NanotraceHR::convertToString(String&, Number) [with String = NanotraceHR::StaticString<3700>; Number = double; typename std::enable_if<is_arithmetic_v<Number>, bool>::type <anonymous> = true]’
      /home/qt/work/build/qt-creator/src/libs/sqlite/sqlitevalue.h:426:24:   required from ‘void Sqlite::convertToString(String&, const Sqlite::Value&) [with String = NanotraceHR::StaticString<3700>]’
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:222:20:   required from ‘void NanotraceHR::convertDictonaryEntryToString(String&, const std::tuple<_T1, _T2>&) [with String = NanotraceHR::StaticString<3700>; Key = const char (&)[6]; Value = const Sqlite::Value&]’
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:230:35:   required from ‘void NanotraceHR::convertDictonaryToString(String&, const NanotraceHR::IsDictonary&, Entries& ...) [with String = NanotraceHR::StaticString<3700>; Entries = {const std::tuple<const char (&)[5], const Utils::BasicSmallString<31>&>, const std::tuple<const char (&)[5], const Utils::BasicSmallString<31>&>, const std::tuple<const char (&)[6], const Sqlite::Value&>}]’
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:239:65:   required from ‘NanotraceHR::convertToString<NanotraceHR::StaticString<3700>, {std::tuple<const char (&)[5], const Utils::BasicSmallString<31>&>, std::tuple<const char (&)[5], const Utils::BasicSmallString<31>&>, std::tuple<const char (&)[6], const Sqlite::Value&>}>::<lambda(auto:65&& ...)> [with auto:65 = {const NanotraceHR::IsDictonary&, const std::tuple<const char (&)[5], const Utils::BasicSmallString<31>&>&, const std::tuple<const char (&)[5], const Utils::BasicSmallString<31>&>&, const std::tuple<const char (&)[6], const Sqlite::Value&>&}]’
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/type_traits:2506:26:   [ skipping 23 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
      /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorageinfotypes.h:444:24:   required from ‘void QmlDesigner::Storage::Info::convertToString(String&, const QmlDesigner::Storage::Info::ItemLibraryEntry&) [with String = NanotraceHR::StaticString<3700>]’
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:264:24:   required from ‘void NanotraceHR::convertToString(String&, const Container&) [with String = NanotraceHR::StaticString<3700>; Container = QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1>; typename std::enable_if<NanotraceHR::is_container<Container>::value, bool>::type <anonymous> = true]’
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:222:20:   required from ‘void NanotraceHR::convertDictonaryEntryToString(String&, const std::tuple<_T1, _T2>&) [with String = NanotraceHR::StaticString<3700>; Key = const char (&)[21]; Value = QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1>&]’
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:317:35:   required from ‘void NanotraceHR::Internal::toArguments(String&, Arguments&& ...) [with String = NanotraceHR::StaticString<3700>; Arguments = {std::tuple<const char (&)[21], QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1>&>}]’
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:355:26:   required from ‘void NanotraceHR::Internal::setArguments(String&, Arguments&& ...) [with String = NanotraceHR::StaticString<3700>; Arguments = {std::tuple<const char (&)[21], QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1>&>}]’
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:1552:60:   required from ‘void NanotraceHR::Tracer<Category, std::integral_constant<bool, true> >::sendEndTrace(Arguments&& ...) [with Arguments = {std::tuple<const char (&)[21], QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1>&>}; Category = NanotraceHR::Category<NanotraceHR::TraceEvent<std::basic_string_view<char>, NanotraceHR::StaticString<3700> >, NanotraceHR::Tracing::IsEnabled>]’
      /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:1516:21:   required from ‘void NanotraceHR::Tracer<Category, std::integral_constant<bool, true> >::end(Arguments&& ...) [with Arguments = {std::tuple<const char (&)[21], QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1>&>}; Category = NanotraceHR::Category<NanotraceHR::TraceEvent<std::basic_string_view<char>, NanotraceHR::StaticString<3700> >, NanotraceHR::Tracing::IsEnabled>]’
      /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.cpp:1807:57:   required from here
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:70:36: error: call of overloaded ‘to_chars(char [17], char*, double&)’ is ambiguous
         70 |         auto result = std::to_chars(buffer, buffer + sizeof(buffer), number);
            |                       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:13,
                       from /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:8,
                       from /home/qt/work/build/qt-creator/src/libs/sqlite/sqliteids.h:9,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include/sourcepathids.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include/projectstorageids.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/filestatus.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstoragetypes.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/commontypecache.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.cpp:4:
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:366:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, char, int)’
        366 | _GLIBCXX_TO_CHARS(char)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:367:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, signed char, int)’
        367 | _GLIBCXX_TO_CHARS(signed char)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:368:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, unsigned char, int)’
        368 | _GLIBCXX_TO_CHARS(unsigned char)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:369:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, short int, int)’
        369 | _GLIBCXX_TO_CHARS(signed short)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:370:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, short unsigned int, int)’
        370 | _GLIBCXX_TO_CHARS(unsigned short)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:371:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, int, int)’
        371 | _GLIBCXX_TO_CHARS(signed int)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:372:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, unsigned int, int)’
        372 | _GLIBCXX_TO_CHARS(unsigned int)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:373:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, long int, int)’
        373 | _GLIBCXX_TO_CHARS(signed long)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:374:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, long unsigned int, int)’
        374 | _GLIBCXX_TO_CHARS(unsigned long)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:375:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, long long int, int)’
        375 | _GLIBCXX_TO_CHARS(signed long long)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:376:1: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, long long unsigned int, int)’
        376 | _GLIBCXX_TO_CHARS(unsigned long long)
            | ^~~~~~~~~~~~~~~~~
      /opt/rh/gcc-toolset-10/root/usr/include/c++/10/charconv:397:19: note: candidate: ‘std::to_chars_result std::to_chars(char*, char*, bool, int)’ (deleted)
        397 |   to_chars_result to_chars(char*, char*, bool, int = 10) = delete;
            |                   ^~~~~~~~
      In file included from /home/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:8,
                       from /home/qt/work/build/qt-creator/src/libs/sqlite/sqliteids.h:9,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include/sourcepathids.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include/projectstorageids.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/filestatus.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstoragetypes.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/commontypecache.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.h:6,
                       from /home/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.cpp:4:
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:73:15: error: no matching function for call to ‘NanotraceHR::StaticString<3700>::append(<brace-enclosed initializer list>)’
         73 |         append({buffer, endOfConversionString});
            |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:30:10: note: candidate: ‘void NanotraceHR::StaticString<Capacity>::append(Utils::SmallStringView) [with long unsigned int Capacity = 3700]’
         30 |     void append(Utils::SmallStringView string) noexcept
            |          ^~~~~~
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:30:40: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘Utils::SmallStringView’
         30 |     void append(Utils::SmallStringView string) noexcept
            |                 ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:44:10: note: candidate: ‘void NanotraceHR::StaticString<Capacity>::append(char) [with long unsigned int Capacity = 3700]’
         44 |     void append(char character) noexcept
            |          ^~~~~~
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:44:22: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘char’
         44 |     void append(char character) noexcept
            |                 ~~~~~^~~~~~~~~
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:59:10: note: candidate: ‘template<class Type, typename std::enable_if<is_arithmetic_v<Type>, bool>::type <anonymous> > void NanotraceHR::StaticString<Capacity>::append(Type) [with Type = Type; typename std::enable_if<is_arithmetic_v<Type>, bool>::type <anonymous> = <anonymous>; long unsigned int Capacity = 3700]’
         59 |     void append(Type number)
            |          ^~~~~~
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:59:10: note:   template argument deduction/substitution failed:
      /home/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:73:15: note:   couldn’t deduce template parameter ‘Type’
         73 |         append({buffer, endOfConversionString});
            |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      

      macOS:

      FAILED: src/plugins/qmldesigner/libs/designercore/CMakeFiles/QmlDesignerCore.dir/projectstorage/projectstorage.cpp.o 
      /Applications/Xcode15.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DENABLE_PROJECT_STORAGE_TRACING -DENABLE_QMLDESIGNER_TRACING -DNANOTRACE_ENABLED -DQDS_BUILD_QMLPARSER -DQDS_USE_PROJECTSTORAGE -DQMLDESIGNERCORE_LIBRARY -DQMLDESIGNERSETTINGS_LIBRARY -DQMLDESIGNERUTILS_LIBRARY -DQMLPUPPETCOMMUNICATION_LIBRARY -DQT_CONCURRENT_LIB -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_CREATOR -DQT_DISABLE_DEPRECATED_UP_TO=0x050900 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_OPENGL_LIB -DQT_QMLCOMPILER_LIB -DQT_QMLDOM_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMETA_LIB -DQT_QMLMODELS_LIB -DQT_QMLTOOLINGSETTINGS_LIB -DQT_QMLWORKERSCRIPT_LIB -DQT_QML_LIB -DQT_QUICK_LIB -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x060400 -DQT_WIDGETS_LIB -DQmlDesignerCore_EXPORTS -DRELATIVE_DATA_PATH=\"../Resources\" -DRELATIVE_DOC_PATH=\"../Resources/doc\" -DRELATIVE_LIBEXEC_PATH=\"../Resources/libexec\" -DRELATIVE_PLUGIN_PATH=\"../PlugIns/qtcreator\" -DSHARE_QML_PATH=\"/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/../../../../../share/qtcreator/qmldesigner\" -DTEXTEDITORSUPPORT_LIBRARY -I/Users/qt/work/build/qt-creator_build/build/src/plugins/qmldesigner/libs/designercore -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore -I/Users/qt/work/build/qt-creator_build/build/src/plugins/qmldesigner/libs/designercore/QmlDesignerCore_autogen/include -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/designercoreutils -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/exceptions -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/filemanager -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/imagecache -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/tracing -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/metainfo -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/model -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/rewriter -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/pluginmanager -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/sourcepathstorage -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage -I/Users/qt/work/build/qt-creator/src/libs -I/Users/qt/work/build/qt-creator/src/libs/utils/mimetypes2 -I/Users/qt/work/build/qt-creator/src/libs/3rdparty -I/Users/qt/work/build/qt-creator/src/plugins -I/Users/qt/work/build/qt-creator/src/plugins/qmldesignerbase/settings -I/Users/qt/work/build/qt-creator/src/libs/qmlpuppetcommunication/types -I/Users/qt/work/build/qt-creator/src/libs/qmlpuppetcommunication/interfaces -I/Users/qt/work/build/qt-creator/src/libs/qmlpuppetcommunication/container -I/Users/qt/work/build/qt-creator/src/libs/qmlpuppetcommunication/commands -I/Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/qmldesignerutils -I/Users/qt/work/build/qt-creator/src/libs/sqlite -isystem /Users/qt/work/build/qt_install_dir/lib/QtConcurrent.framework/Headers -iframework /Users/qt/work/build/qt_install_dir/lib -isystem /Users/qt/work/build/qt_install_dir/lib/QtCore.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/mkspecs/macx-clang -isystem /Users/qt/work/build/qt_install_dir/include -isystem /Users/qt/work/build/qt_install_dir/lib/QtNetwork.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/lib/QtGui.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/lib/QtWidgets.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/lib/QtCore5Compat.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/lib/QtQml.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/include/QtQmlIntegration -isystem /Users/qt/work/build/qt_install_dir/lib/QtQml.framework/Versions/A/Headers/6.8.2 -isystem /Users/qt/work/build/qt_install_dir/lib/QtQml.framework/Versions/A/Headers/6.8.2/QtQml -isystem /Users/qt/work/build/qt_install_dir/lib/QtCore.framework/Versions/A/Headers/6.8.2 -isystem /Users/qt/work/build/qt_install_dir/lib/QtCore.framework/Versions/A/Headers/6.8.2/QtCore -isystem /Users/qt/work/build/qt_install_dir/lib/QtQuick.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/lib/QtQmlMeta.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/lib/QtQmlModels.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/lib/QtQmlWorkerScript.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/lib/QtOpenGL.framework/Headers -isystem /Users/qt/work/build/qt_install_dir/include/QtQmlDom -isystem /Users/qt/work/build/qt_install_dir/include/QtQmlDom/6.8.2 -isystem /Users/qt/work/build/qt_install_dir/include/QtQmlDom/6.8.2/QtQmlDom -isystem /Users/qt/work/build/qt_install_dir/lib/QtQmlCompiler.framework/Versions/A/Headers/6.8.2 -isystem /Users/qt/work/build/qt_install_dir/lib/QtQmlCompiler.framework/Versions/A/Headers/6.8.2/QtQmlCompiler -isystem /Users/qt/work/build/qt_install_dir/include/QtQmlToolingSettings -isystem /Users/qt/work/build/qt_install_dir/include/QtQmlToolingSettings/6.8.2 -isystem /Users/qt/work/build/qt_install_dir/include/QtQmlToolingSettings/6.8.2/QtQmlToolingSettings -isystem /Users/qt/work/build/qt_install_dir/lib/QtQmlCompiler.framework/Headers -O2 -g -DNDEBUG -std=c++20 -arch x86_64 -arch arm64 -isysroot /Applications/Xcode15.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -mmacosx-version-min=12.0 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -MD -MT src/plugins/qmldesigner/libs/designercore/CMakeFiles/QmlDesignerCore.dir/projectstorage/projectstorage.cpp.o -MF src/plugins/qmldesigner/libs/designercore/CMakeFiles/QmlDesignerCore.dir/projectstorage/projectstorage.cpp.o.d -o src/plugins/qmldesigner/libs/designercore/CMakeFiles/QmlDesignerCore.dir/projectstorage/projectstorage.cpp.o -c /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.cpp
      In file included from /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.cpp:4:
      In file included from /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.h:6:
      In file included from /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/commontypecache.h:6:
      In file included from /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstoragetypes.h:6:
      In file included from /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/filestatus.h:6:
      In file included from /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include/projectstorageids.h:6:
      In file included from /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/include/sourcepathids.h:6:
      In file included from /Users/qt/work/build/qt-creator/src/libs/sqlite/sqliteids.h:9:
      In file included from /Users/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:8:
      /Users/qt/work/build/qt-creator/src/libs/nanotrace/staticstring.h:70:28: error: 'to_chars' is unavailable: introduced in macOS 13.3
              auto result = std::to_chars(buffer, buffer + sizeof(buffer), number);
                                 ^
      /Users/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:163:12: note: in instantiation of function template specialization 'NanotraceHR::StaticString<3700>::append<double, true>' requested here
          string.append(number);
                 ^
      /Users/qt/work/build/qt-creator/src/libs/sqlite/sqlitevalue.h:426:9: note: in instantiation of function template specialization 'NanotraceHR::convertToString<NanotraceHR::StaticString<3700>, double, true>' requested here
              convertToString(string, value.toFloat());
              ^
      /Users/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:222:5: note: in instantiation of function template specialization 'Sqlite::convertToString<NanotraceHR::StaticString<3700>>' requested here
          convertToString(string, value);
          ^
      /Users/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:230:6: note: in instantiation of function template specialization 'NanotraceHR::convertDictonaryEntryToString<NanotraceHR::StaticString<3700>, const char (&)[6], const Sqlite::Value &>' requested here
          (convertDictonaryEntryToString(string, entries), ...);
           ^
      /Users/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:239:41: note: in instantiation of function template specialization 'NanotraceHR::convertDictonaryToString<NanotraceHR::StaticString<3700>, const std::tuple<const char (&)[5], const Utils::BasicSmallString<31> &>, const std::tuple<const char (&)[5], const Utils::BasicSmallString<31> &>, const std::tuple<const char (&)[6], const Sqlite::Value &>>' requested here
          std::apply([&](auto &&...entries) { convertDictonaryToString(string, entries...); }, dictonary);
                                              ^
      /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorageinfotypes.h:366:9: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
              convertToString(string, dict);
              ^
      /Users/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:317:6: note: in instantiation of function template specialization 'NanotraceHR::convertDictonaryEntryToString<NanotraceHR::StaticString<3700>, const char (&)[21], QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1> &>' requested here
          (convertDictonaryEntryToString(text, arguments), ...);
           ^
      /Users/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:355:15: note: in instantiation of function template specialization 'NanotraceHR::Internal::toArguments<NanotraceHR::StaticString<3700>, std::tuple<const char (&)[21], QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1> &>>' requested here
          Internal::toArguments(eventArguments, std::forward<Arguments>(arguments)...);
                    ^
      /Users/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:1552:27: note: in instantiation of function template specialization 'NanotraceHR::Internal::setArguments<NanotraceHR::StaticString<3700>, std::tuple<const char (&)[21], QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1> &>>' requested here
                      Internal::setArguments<ArgumentsStringType>(traceEvent.arguments,
                                ^
      /Users/qt/work/build/qt-creator/src/libs/nanotrace/nanotracehr.h:1516:9: note: in instantiation of function template specialization 'NanotraceHR::Tracer<NanotraceHR::Category<NanotraceHR::TraceEvent<std::string_view, NanotraceHR::StaticString<3700>>, NanotraceHR::Tracing::IsEnabled>, std::integral_constant<bool, true>>::sendEndTrace<std::tuple<const char (&)[21], QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1> &>>' requested here
              sendEndTrace(std::forward<Arguments>(arguments)...);
              ^
      /Users/qt/work/build/qt-creator/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.cpp:1807:12: note: in instantiation of function template specialization 'NanotraceHR::Tracer<NanotraceHR::Category<NanotraceHR::TraceEvent<std::string_view, NanotraceHR::StaticString<3700>>, NanotraceHR::Tracing::IsEnabled>, std::integral_constant<bool, true>>::end<std::tuple<const char (&)[21], QVarLengthArray<QmlDesigner::Storage::Info::ItemLibraryEntry, 1> &>>' requested here
          tracer.end(keyValue("item library entries", entries));
                 ^
      /Applications/Xcode15.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__charconv/to_chars_floating_point.h:30:1: note: 'to_chars' has been explicitly marked unavailable here
      to_chars(char* __first, char* __last, double __value);
      ^
      1 error generated.
      

      Attachments

        For Gerrit Dashboard: QDS-14932
        # Subject Branch Project Status CR V

        Activity

          People

            tjenssen Tim Jenssen
            tjenssen Tim Jenssen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes