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

QDoc automatically adds links to deprecated methods in the see also section of docs

    XMLWordPrintable

Details

    • abe5e193c (6.6), 491525012 (dev)

    Description

      From internal discussion:

      Is there any 'magic' in qdoc that extends the list of 'see also' targets for a function?I'm looking at https://doc-snapshots.qt.io/qt6-6.6/qapplication.html#activeWindow . It says

      *See also* setActiveWindow(), QWidget::setFocus(), QWidget::hasFocus(), and focusWidget().

      Now setActiveWindow() is deprecated, and I think we shouldn't link to it. So I was checking the sources ... and it's not listed there!

      /*!     Returns the application top-level window that has the keyboard input focus,     or \nullptr if no application window has the focus. There might be an     activeWindow() even if there is no focusWidget(), for example if no widget     in that window accepts key events.
          \sa QWidget::setFocus(), QWidget::hasFocus(), focusWidget() */
      QWidget *QApplication::activeWindow() {​​​​​​​​​​​


      So can it be that qdoc adds 'setActiveWindow() automatically?


       

      Yes, explained here https://doc.qt.io/qt-6/08-qdoc-commands-creatinglinks.html#sa-command

      hmm ... but activeWindow isn't declared as a property, so the only way it's getting that is by looking for setActiveWindow and finding it.  Can we teach it to ignore matches such as this if they're deprecated? After all, the QDoc doc for \sa says it only does this for properties ...

       

      Attachments

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

        Activity

          People

            paulwicking Paul Wicking
            paulwicking Paul Wicking
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes