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

QPropertyBindingSourceLocation won't compile bacause of wrong source_location selection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical 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)

      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

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes