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

Q_DECLARE_METATYPE_TEMPLATE_1ARG does not work as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 5.2.0 Beta1
    • None

    Description

      Q_DECLARE_METATYPE_TEMPLATE_1ARG does not work in Qt5.2.0 Beta1 as it should. It definitely works different as in Qt5.1.1.

      AFAIK I learned the following code should compile (actually it does using 5.1.1) but it does not using 5.2.0:

      template <class T> class Container
      {
      };
       
      Q_DECLARE_METATYPE_TEMPLATE_1ARG(Container)
       
      inline void Test()
      {
         QVariant x = QVariant::fromValue(Container<int>());
      }
      

      Source is this forum discussion: https://qt-project.org/forums/viewthread/34806/

      Attachments

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

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            silicomancer Bernhard Lindner
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes