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

QDoc: Decouple Node from ALL the things

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Build tools: qdoc

    Description

      As a developer, I want to break up the Node class so that each part has one clear purpose. This will make the code easier to maintain, test, and extend.

      Background

      The different functions of the Node class indicate that it's responsible for a myriad of things, e.g., metadata handling, link management, formatting, tree navigation, etc. The multitude of responsibilities cause Node's implementation details to leak into a lot of unrelated parts of QDoc, which makes it harder than necessary to make clean changes to the software.

      Proposal

      Extract helper components, for example:

      • NodeMetadata to manage properties like name, file name, and URL.
      • NodePresentation to generate signatures and titles.
      • NodeOrdering to hold all ordering functions.
      • NodeLinkManager to handle link creation and lookup.

      Separate Tree Navigation

      • Move tree navigation and parent/child logic into a separate class or module.

      Tests

      • Write unit tests for each new component to verify that they work as intended.
      • Ensure that our existing integration tests pass with the new structure without changes to output.

      Documentation

      • Update code comments to reflect the changes.
      • Add documentation for the new components, as well as for any extracted code if it's missing.
      • Assume the existence of the coveted "QDoc Developer Manual".

      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:

              Gerrit Reviews

                There are no open Gerrit changes