![]() |
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 <link.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 Link 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.
Link 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 |
|
inlinenodiscard |
|
inlinenodiscard |
|
nodiscard |
Converts the Link 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 45 of file link.cpp.
References state.
| State IR::Link::state {State::Resolved} |
Definition at line 27 of file link.h.
Referenced by isExternal(), isResolved(), and toJson().