![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Intermediate representation for a resolved hyperlink. More...
#include <linkir.h>
Public Types | |
| enum class | State : unsigned char { Resolved , External , Unresolved , Broken } |
| Optional title/tooltip attribute. More... | |
Public Member Functions | |
| QJsonObject | toJson () const |
| Converts the LinkIR to a QJsonObject for template rendering. | |
| bool | isValid () const |
| bool | isResolved () const |
| bool | isExternal () const |
Public Attributes | |
| QString | target |
| QString | text |
| Pre-resolved URL or anchor. | |
| QString | title |
| Display text for the link. | |
| State | state {State::Resolved} |
| QString | originalTarget |
Intermediate representation for a resolved hyperlink.
LinkIR represents a fully-resolved link in QDoc's intermediate representation layer. All target resolution happens during the IR building phase, so templates receive only pre-computed URLs and display text. This eliminates the need for generators to perform database lookups during output generation.
|
strong |
Optional title/tooltip attribute.
Indicates the resolution state of the link target.
\value Resolved Link target was found and resolved. \value External Link points to an external resource. \value Unresolved Target not found (will produce warning). \value Broken Target explicitly marked as broken.
| Enumerator | |
|---|---|
| Resolved | |
| External | |
| Unresolved | |
| Broken | |
|
nodiscard |
Converts the LinkIR to a QJsonObject for template rendering.
The JSON structure uses camelCase field names following the established IR-to-JSON convention. The state is represented as a string for readability in templates: "resolved", "external", "unresolved", or "broken".
Returns a QJsonObject containing all link data suitable for template rendering via InjaBridge.
Definition at line 43 of file linkir.cpp.
| State LinkIR::state {State::Resolved} |