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

Compile error when using virtual QObject inheritance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.8.0
    • Build tools: moc
    • None
    • gcc (SUSE Linux) 4.6.0 20110523 [gcc-4_6-branch revision 174058]
      openSUSE 11.4, 32 bit

      With Qt from 4.8 branch at 408a522f several KDE modules (kdeaccessibility, kdenetwork, kdesdk) fail to compile because of a change in moc. The error message is:

      moc_test.cpp:47:50: error: cannot convert from base 'QObject' to derived type 'MyObject' via virtual base 'QObject'

      Attached is a minimal testcase that reproduces the compilation error.

        1. test.tar.gz
          0.3 kB
          Christoph Feck
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            cfeck Christoph Feck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes