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

erroneous moc output

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.1
    • 4.5.2
    • Core: Object Model
    • None

    Description

      Steps to reproduce / test case:

      • For full projects reproducing the issue and 1 ugly solution, see attachment.

      Short description:

      • you are required to declare objects C1 nd C2 within N namespace ("blahblah")
      • you have object N::C1 derived from QObject, and objects N::C2 and C3 (not N::C2) derived from N::C1
      • object C3 has Q_PROPERTY(N::C2 * c2 READ c2)
      • on bulding the code, moc issues 2 errors:
        1. error C2039: 'staticMetaObject' : is not a member of 'blahblah'
        2. error C2065: 'staticMetaObject' : undeclared identifier
        because it defined <static const QMetaObject *qt_meta_extradata_C3[]>
        as {&N::staticMetaObject, 0}

        instead of

        {&C3::staticMetaObject, 0}

        (can be fixed manually).

      Ugly solution:

      • write <using namespace N;> above C3 definition

      Attachments

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

        Activity

          People

            kenthans Kent Hansen (Inactive)
            sthomass Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes