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

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

      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));

        1. test.zip
          1 kB
          Viktar Paklonski
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes