用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/qt/qtqa --skill skill-qdoc-output命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | skill-qdoc-output |
| description | Reference for QDoc HTML output filename generation patterns by node type |
| metadata | {"version":"1.0"} |
How QDoc generates HTML filenames for different documentation node types.
Primary implementation: qttools/src/qdoc/qdoc/src/qdoc/generator.cpp
| Function | Lines | Purpose |
|---|---|---|
Generator::fileBase() | 308-376 | Generates base filename without extension |
Generator::fileName() | 418-438 | Adds file extension to base |
Generator::outputPrefix() | 2103-2117 | Returns prefix by genus (e.g., "qml-") |
Generator::outputSuffix() | 2119-2132 | Returns suffix by node type |
Supporting code:
Utilities::asAsciiPrintable() - utilities.cpp:157-197 - Canonicalizes to lowercase ASCII| Node Type | Pattern | Example |
|---|---|---|
| C++ class | {classname}.html | qwidget.html |
| C++ class (namespaced) | {namespace}-{class}.html | qt-alignment.html |
| QML type | qml-{module}-{type}.html | qml-qtquick-rectangle.html |
| QML value type | qml-{type}.html | qml-color.html |
| C++ module | {module}-module.html | qtcore-module.html |
| QML module | {module}-qmlmodule.html | qtquick-qmlmodule.html |
| Group | {groupname}.html | animation.html |
| Example | {project}-{name}-example.html | qtbase-calculator-example.html |
| Page (overviews) | per \page command in source | getting-started.html |
Important: For \page documents, the HTML filename is explicitly specified in the source file's \page command. Always read the source to verify. For all other types (class, QML type, module, group, example), QDoc generates the filename automatically - verify via index files.
1. If CollectionNode:
- If QmlModule: append "-qmlmodule"
- Else if Module: append "-module"
- Else (Group): no suffix
- Append outputSuffix()
2. If TextPageNode:
- If Example: prepend "{project}-", append "-example"
3. If QmlType:
- If has logicalModuleName and not QmlBasicType:
- Prepend "{logicalModuleName}{outputSuffix}-"
- Prepend outputPrefix() (default: "qml-")
4. If ProxyNode:
- Append "-{moduleName}-proxy"
5. Else (C++ class/namespace):
- Build from parent chain with hyphens
- For undocumented-here namespaces: append "-sub-{moduleName}"
- Append outputSuffix()
6. Prepend outputPrefix()
7. Canonicalize with asAsciiPrintable()
The asAsciiPrintable() function:
HTML filenames can be verified in QDoc index files:
# Find class
grep 'class name="QWidget"' */doc/*/*.index
# Output: <class name="QWidget" href="qwidget.html" ...>
# Find QML type
grep 'qmlclass name="Rectangle"' */doc/*/*.index
# Output: <qmlclass name="Rectangle" href="qml-qtquick-rectangle.html" ...>
# Find group
grep '<group name="animation"' */doc/*/*.index
# Output: <group name="animation" href="animation.html" ...>
# Find module
grep '<module name="QtCore"' */doc/*/*.index
# Output: <module name="QtCore" href="qtcore-module.html" ...>
Prefixes and suffixes are configurable in qdocconf:
outputPrefixes = QML
outputPrefixes.QML = qml-
outputSuffixes = QML
outputSuffixes.QML =
Defaults:
Input: \qmltype Rectangle
\inqmlmodule QtQuick
Output: qml-qtquick-rectangle.html
Algorithm:
Input: \class Qt::Alignment
Output: qt-alignment.html
Algorithm:
Input: \group animation
\title Animation Framework
Output: animation.html
Algorithm: