aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/documentation.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-12-09 16:47:23 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-12-09 23:15:24 +0100
commit2d726d1be178070d1004fd56822dfad2395c0380 (patch)
tree18573254d82cd5f4dc8938b3deef655132082f87 /sources/shiboken6/ApiExtractor/documentation.cpp
parent5cd44e96cee2e8fc105372b5234b0682a7bcc012 (diff)
shiboken6/Documentation: Fix abuse of the TypeSystem::Language enum in DocModification
DocModification only used 2 values from TypeSystem::Language (native/target), which match the native/target values of enum Documentation::Format. Move the enumerations from class Documentation to a global header and use them in DocModification for consistency. Pick-to: 6.8 Change-Id: I154f2208b4d834fed569555ef4c0579502bb32f7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/documentation.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/documentation.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/sources/shiboken6/ApiExtractor/documentation.cpp b/sources/shiboken6/ApiExtractor/documentation.cpp
index 0f1bb389b..7d9054af7 100644
--- a/sources/shiboken6/ApiExtractor/documentation.cpp
+++ b/sources/shiboken6/ApiExtractor/documentation.cpp
@@ -8,7 +8,7 @@
Documentation::Documentation(const QString &detailed,
const QString &brief,
const QString &sourceFile,
- Format fmt) :
+ DocumentationFormat fmt) :
m_detailed(detailed.trimmed()),
m_brief(brief.trimmed()),
m_sourceFile(sourceFile),
@@ -21,20 +21,20 @@ bool Documentation::isEmpty() const
return m_detailed.isEmpty() && m_brief.isEmpty();
}
-Documentation::Format Documentation::format() const
+DocumentationFormat Documentation::format() const
{
return m_format;
}
-void Documentation::setValue(const QString &value, Documentation::Type t)
+void Documentation::setValue(const QString &value, DocumentationType t)
{
- if (t == Brief)
+ if (t == DocumentationType::Brief)
setBrief(value);
else
setDetailed(value);
}
-void Documentation::setFormat(Documentation::Format f)
+void Documentation::setFormat(DocumentationFormat f)
{
m_format = f;
}
@@ -57,7 +57,7 @@ QDebug operator<<(QDebug debug, const Documentation &d)
debug.nospace();
debug << "Documentation(";
if (!d.isEmpty()) {
- debug << "format=" << d.format();
+ debug << "format=" << (d.format() == DocumentationFormat::Native ? "native" : "target");
if (d.hasSourceFile())
debug << ", file=\"" << d.sourceFile() << '"';
if (!d.brief().isEmpty())