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

MOC documentation claims to support class templates, but actually it doesn't

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.5.0 RC
    • 5.4.0, 5.4.1
    • Documentation
    • None
    • all
    • 578329719374f2c55d60682e51013970f7afe44e(qtdoc)

    Description

      The documentation on http://doc.qt.io/qt-5/moc.html clearly states that moc does not support class templates that have signals or slots. This implies, that as long as my class does not have such things, it should be possible to create class templates that derive from QObject. In reality however, the moc-compiler complains "Template classes not supported by Q_OBJECT". This is a rather different statement.

      The documentation should reflect that template classes are not supported at all, or MOC should support templated Q_OBJECT classes, as long as they do not contain signals and/or slots. Obviously I'd prefer the latter .

      Attachments

        For Gerrit Dashboard: QTBUG-46318
        # Subject Branch Project Status CR V

        Activity

          People

            thiago Thiago Macieira
            jsvanbethlehem J van Bethlehem
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes