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

QDoc: Decouple Node from ALL the things

XMLWordPrintable

    • Icon: User Story User Story
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • None
    • Build tools: qdoc
    • DaVinci 117, DaVinci 118, DaVinci 119, DaVinci 120, DaVinci 121
    • a89fe6038 (dev), 32f726fbc (dev), e14356449 (dev), 3d1e94b84 (dev)

      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".

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

            docinfrastructure Documentation Infrastructure Team
            paulwicking Paul Wicking
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change