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

Extract the logic for resolving files

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • None
    • None
    • Build tools: qdoc
    • None
    • Da Vinci sprint 49, Da Vinci sprint 50, DaVinci sprint 51, DaVinci sprint 52, DaVinci sprint 53, DaVinci sprint 54, DaVinci 55, DaVinci 56, DaVinci 57

    Description

      QDoc has the need to find files during the processing of a documentation set based on its current configuration.

      For example, when looking for a file to quote from.

      Currently, QDoc exposes the logic for this as part of the Config class, which use is later centralized into the Doc which is depended upon by other parts of the system, such as DocParser or WebXMLGenerator.

      Logically, QDoc performs a simple linear search over a series of config-defined directories and config-defined known-files.

      This simple logic should be extracted from Config, moved into its own system with no dependencies on other parts of QDoc and then used instead of the centralized Doc dependency.

      Some dead code was identified in the parts relevant to this processing, such as the use of the userFriendlyFilePath argument that permeates the searches for files. That code should be removed in the process.

      Similarly, some footguns were indentified in the way in which QDoc processes files, such that the result of a search may be silently changed, in very specific cases, when adding to the list of known directories, even if the search is not related to the configuration change itself.

      Furthermore, repeated safety-checks or possibly missing safety checks were identified in the same code, such that the new system should provide a simple interface that guarantees where and how checks are performed.

      The extracted system should be tested in full and then inserted back into the codebase, subsidizing each use of file searching in the code base.

      Attachments

        Issue Links

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

          Activity

            People

              diseraluca Luca Di Sera
              diseraluca Luca Di Sera
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews