diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-06-24 14:14:43 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-25 10:13:57 +0000 |
commit | 179a026e13baa056641b06a44cb29f165f938cd2 (patch) | |
tree | ecd8d7f54733358ceecfaba9aeb6a4b52f9ec570 /sources/shiboken6/generator/qtdoc/qtxmltosphinxinterface.h | |
parent | ecff7d18b62d8168082dbf59498e4bf01233eb95 (diff) |
shiboken6/doc generator: Extract method to resolve links to QtXmlToSphinxDocGeneratorInterface
Extract the private struct LinkContext to a public struct
QtXmlToSphinxLink with debug operator and add a resolve method to
QtXmlToSphinxDocGeneratorInterface.
Task-number: PYSIDE-1112
Change-Id: I91b3bc45ebc530394a3e77c56b05dd5b740e8985
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 991cfb9376275e1ab259f0a9b95302bc56ba7127)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/generator/qtdoc/qtxmltosphinxinterface.h')
-rw-r--r-- | sources/shiboken6/generator/qtdoc/qtxmltosphinxinterface.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sources/shiboken6/generator/qtdoc/qtxmltosphinxinterface.h b/sources/shiboken6/generator/qtdoc/qtxmltosphinxinterface.h index c4bdedd21..d4e792d76 100644 --- a/sources/shiboken6/generator/qtdoc/qtxmltosphinxinterface.h +++ b/sources/shiboken6/generator/qtdoc/qtxmltosphinxinterface.h @@ -43,6 +43,26 @@ struct QtXmlToSphinxParameters bool snippetComparison = false; }; +struct QtXmlToSphinxLink +{ + enum Type + { + Method = 0x1, Function = 0x2, + FunctionMask = Method | Function, + Class = 0x4, Attribute = 0x8, Module = 0x10, + Reference = 0x20, External= 0x40 + }; + + enum Flags { InsideBold = 0x1, InsideItalic = 0x2 }; + + explicit QtXmlToSphinxLink(const QString &ref) : linkRef(ref) {} + + QString linkRef; + QString linkText; + Type type = Reference; + int flags = 0; +}; + class QtXmlToSphinxDocGeneratorInterface { public: @@ -54,6 +74,8 @@ public: virtual const QLoggingCategory &loggingCategory() const = 0; + virtual QtXmlToSphinxLink resolveLink(const QtXmlToSphinxLink &) const = 0; + virtual ~QtXmlToSphinxDocGeneratorInterface() = default; }; |