Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.6
-
None
-
abe5e193c (6.6), 491525012 (dev)
Description
From internal discussion:
*See also* setActiveWindow(), QWidget::setFocus(), QWidget::hasFocus(), and focusWidget().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
/*! 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.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!
\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 ...