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

Improve diagnostics when documenting non-declared function

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.4
    • Build tools: qdoc
    • None

    Description

      When qdoc encounters a documented function definition without a prior declaration in a header

       

      /*!
          Checks if the application has a \e{package identity}
      
          Having a \e{package identity} is required to use many modern
          Windows APIs.
      
          https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/modernize-packaged-apps
      */
      bool qt_win_hasPackageIdentity()
      {
      }
      

      it spits out a warning like:

       

       

      /home/qt/work/qt/qtbase/src/corelib/kernel/qfunctions_win.cpp:35: (qdoc) warning: Cannot tie this documentation to anything [qdoc found a /*! ... */ comment, but there was no topic command (e.g., '\fn', '\page') in the comment and no function definition following the comment.]
      

      The problem here was that the declaration in the header was behind a 
      #if defined(Q_OS_WIN) so qdoc never saw it.
       
      As the "no function definition following the comment" part is clearly wrong, it would be helpful if qdoc could somehow detect and distinguish this case from one where there is in fact no function definition following the comment.
       
       
       

      Attachments

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

        Activity

          People

            docinfrastructure Documentation Infrastructure Team
            vestbo Tor Arne Vestbø
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes