![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Bundles output configuration without static variables. More...
#include <outputcontext.h>
Public Member Functions | |
| QString | outputPrefix (const QString &nodeType) const |
| Returns the output prefix for the given nodeType. | |
| QString | outputSuffix (const QString &nodeType) const |
| Returns the output suffix for the given nodeType. | |
Static Public Member Functions | |
| static OutputContext | fromConfig (const Config &config, const QString &format) |
| Creates an OutputContext from the given config for the specified output format. | |
Public Attributes | |
| OutputDirectory | outputDir |
| QString | project |
| QString | subdir |
| QString | fileExtension |
| QHash< QString, QString > | outputPrefixes |
| QHash< QString, QString > | outputSuffixes |
| bool | useSubdirs {true} |
| bool | noLinkErrors {false} |
| bool | autolinkErrors {false} |
Bundles output configuration without static variables.
OutputContext captures all the configuration state that generators need for output, replacing Generator's 19 static variables with explicit, injectable state.
This enables: \list
| OutputContext field | Generator static |
|---|---|
| outputDir | s_outDir |
| project | s_project |
| subdir | s_outSubdir |
| outputPrefixes | s_outputPrefixes |
| outputSuffixes | s_outputSuffixes |
| useSubdirs | s_useOutputSubdirs |
Definition at line 16 of file outputcontext.h.
|
staticnodiscard |
Creates an OutputContext from the given config for the specified output format.
This method extracts all relevant configuration values that generators need, centralizing the logic that was previously scattered across Generator's static initialization.
Definition at line 53 of file outputcontext.cpp.
References Location::Location().
Returns the output prefix for the given nodeType.
Common values: "QML" -> "qml-", "CPP" -> "cpp-".
Definition at line 108 of file outputcontext.cpp.
Returns the output suffix for the given nodeType.
Definition at line 116 of file outputcontext.cpp.
| bool OutputContext::autolinkErrors {false} |
Definition at line 26 of file outputcontext.h.
| QString OutputContext::fileExtension |
Definition at line 21 of file outputcontext.h.
| bool OutputContext::noLinkErrors {false} |
Definition at line 25 of file outputcontext.h.
| OutputDirectory OutputContext::outputDir |
Definition at line 18 of file outputcontext.h.
Definition at line 22 of file outputcontext.h.
Definition at line 23 of file outputcontext.h.
| QString OutputContext::project |
Definition at line 19 of file outputcontext.h.
| QString OutputContext::subdir |
Definition at line 20 of file outputcontext.h.
| bool OutputContext::useSubdirs {true} |
Definition at line 24 of file outputcontext.h.