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

The Q_OBJECT macro documentation mentions obsolete requirements

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • 6.5.7, 6.7.2, 6.8.0 FF
    • 6.5, 6.6, 6.7, 6.8
    • Documentation
    • None
    • ce26eaf1b (dev), f036e6f1a (6.7), c7dc10d0f (tqtc/lts-6.5)

      https://doc.qt.io/qt-6.5/qobject.html#Q_OBJECT

      The main paragraph emphasizes that the access modifier should be private. This is an old requirement. Starting with 6.5, adding Q_OBJECT adds the private access modifier by itself. Users no longer need to add the macro to a private: section. So, the main paragraph is not completely valid anymore.

      The same is valid for Q_GADGET and other similar macros.

      The Meta-Object System topic also mentions obsolete requirements.

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

            lexcaz Alexei Cazacov
            lexcaz Alexei Cazacov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes