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

Build issue with visual studio and QT_NAMESPACE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.0
    • 6.5.0 RC
    • Core: Other
    • None
    • Visual studio 2019
      Enable QT_NAMESPACE
    • Windows

    Description

      Following build issue during the build with visual studio:

       

      qvariant.h(54): error C2888: 'const bool qIsRelocatable<QT_AME_NAMESPACE::QVariant>': symbol cannot be defined within namespace 'QT_AME_NAMESPACE' 

       

      The problem isn't the code of qvariant.h, it's visual studio compiler issue as explain here.

      The workaround is to change:

      template<> constexpr inline bool QtPrivate::qIsRelocatable<QVariant> = true;

      by:

      namespace QtPrivate 
      {
          template<> constexpr inline bool qIsRelocatable<QVariant> = true;
      } 

      Patch attached.

      Attachments

        Issue Links

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

          Activity

            People

              manordheim Mårten Nordheim
              alexiseichst Alexis Eichstadt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes