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

QPropertyBindingSourceLocation won't compile bacause of wrong source_location selection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.1.1, 6.2.0 Alpha
    • 6.1
    • Core: Other
    • None
    • gcc 11
    • 675a4b0cc77a81d92cea6e044200349676f3b117 (qt/qtbase/dev) 9433614df262be8aadfc764c855d4dd8fc0fb612 (qt/qtbase/6.1)

    Description

      gcc 11 has header <source_location>, but Qt sources isnt ready for that
      qtbase/src/corelib/kernel/qproperty.h

      ...
      #if __has_include(<source_location>) && __cplusplus >= 202002L && !defined(Q_CLANG_QDOC)
      #include <experimental/source_location> //<---------- wrong header included
      #define QT_PROPERTY_COLLECT_BINDING_LOCATION
      #define QT_PROPERTY_DEFAULT_BINDING_LOCATION QPropertyBindingSourceLocation(std::source_location::current())
      
      ...
      
      #ifdef QT_PROPERTY_COLLECT_BINDING_LOCATION
          QPropertyBindingSourceLocation(const std::experimental::source_location &cppLocation) //<-------------- wrong class used
          {
              fileName = cppLocation.file_name();
              functionName = cppLocation.function_name();
              line = cppLocation.line();
              column = cppLocation.column();
          }
      #endif
      

      So, Qt itself and user code that includes qproperty.h - wont compile

      Attachments

        Issue Links

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

          Activity

            People

              fabiankosmale Fabian Kosmale
              vopl vopl
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes