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

erroneos moc output for Q_PROPERTY(&) - same as QTBUG-6745, which was kicked off

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 4.6.0
    • Core: Object Model
    • None
    • MSVC 2008 Pro SP1, Win32 (compiled on Vista SP2)

    Description

      See attachment for files to reproduce the issue. (Moc output can be edited manually to fix its errors.)

      Example of the input, output, and fix:

      input: Q_PROPERTY(Prop & prop READ prop WRITE setProp)
      alt: Q_PROPERTY(Prop %AMPERSAND% prop READ prop WRITE setProp)

      output1: reinterpret_cast< Prop&>(_v) = prop();
      alt: %STAR% reinterpret_cast< Prop %AMPERSAND% %STAR%>(_v) = prop();

      fix1: reinterpret_cast< Prop*>(_v) = &prop();
      alt: %STAR% reinterpret_cast< Prop %STAR% %STAR%>(_v) = %AMPERSAND% prop();

      output2: setProp(reinterpret_cast< Prop&>(_v));
      alt: setProp(%STAR% reinterpret_cast< Prop %AMPERSAND% %STAR%>(_v));

      fix2: setProp(*reinterpret_cast< Prop*>(_v));
      alt: setProp(%STAR% %STAR% reinterpret_cast< Prop %STAR% %STAR%>(_v));

      Attachments

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

        Activity

          People

            kenthans Kent Hansen (Inactive)
            v000 Viktar Paklonski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes