From 941a9b5e5963f8c0798415e3cb69f031da1f4109 Mon Sep 17 00:00:00 2001
From: Venugopal Shivashankar
Date: Wed, 10 May 2023 14:00:16 +0200
Subject: qdoc: Wrap a around the addendum note
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The addendum added to the C++ and QML methods, properties,
and signals, lack the necessary styling. They are added as
a simple HTML para, without the appropriate admonition CSS
class, which is normally used for a \note.
Pick-to: 6.5
Change-Id: I10cb9d51c587fb21024168a57e8661f7da0ad323
Reviewed-by: Topi Reiniƶ
---
src/qdoc/qdoc/generator.cpp | 5 ++++-
.../expected_output/properties/testqdoc-testderived.html | 16 ++++++++--------
.../expected_output/qml-qdoc-test-doctest.html | 12 ++++++------
.../expected_output/qml-qdoc-test-type.html | 12 ++++++------
4 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/src/qdoc/qdoc/generator.cpp b/src/qdoc/qdoc/generator.cpp
index 0381040d9..ad58b7f44 100644
--- a/src/qdoc/qdoc/generator.cpp
+++ b/src/qdoc/qdoc/generator.cpp
@@ -1226,6 +1226,8 @@ void Generator::generateAddendum(const Node *node, Addendum type, CodeMarker *ma
{
Q_ASSERT(node && !node->name().isEmpty());
Text text;
+ text << Atom(Atom::DivLeft,
+ "class=\"admonition %1\""_L1.arg(generateNote ? u"note"_s : u"auto"_s));
text << Atom::ParaLeft;
if (generateNote) {
@@ -1302,7 +1304,8 @@ void Generator::generateAddendum(const Node *node, Addendum type, CodeMarker *ma
return;
}
- text << Atom::ParaRight;
+ text << Atom::ParaRight
+ << Atom::DivRight;
generateText(text, node, marker);
}
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html
index 5a06f1d41..fd85e3d5c 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html
@@ -104,8 +104,8 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)
Property Documentation
[bindable]
bindableProp : QString
-Note: This property supports QProperty bindings.
-Some property.
+Note: This property supports QProperty bindings.
+
Some property.
boolProp : bool
@@ -139,8 +139,8 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)
[bindable read-only]
someProp : QString
-Note: This property supports QProperty bindings.
-Another property.
+Note: This property supports QProperty bindings.
+
Another property.
@@ -148,8 +148,8 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)
[private signal]
void TestDerived::emitSomething()
Emitted when things happen.
-
Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.
-
+
Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.
+
[override virtual]
int TestDerived::id()
Reimplements an access function for property: Test::id.
@@ -157,8 +157,8 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)
[invokable]
void TestDerived::invokeMe() const
Something invokable.
-
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
-
+
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
+
[override virtual]
void TestDerived::virtualFun()
Reimplements: Test::virtualFun().
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-doctest.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-doctest.html
index 49c8b2730..2608efb1e 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-doctest.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-doctest.html
@@ -84,8 +84,8 @@
completed() |
-Note: The corresponding handler is onCompleted
.
-
+Note: The corresponding handler is onCompleted
.
+
@@ -95,8 +95,8 @@
foo(var bar)
Signal with parameter bar.
-
Note: The corresponding handler is onFoo
.
-
+Note: The corresponding handler is onFoo
.
+
@@ -106,8 +106,8 @@
itsHappening(bool really)
Signals that something is really happening.
-
Note: The corresponding handler is onItsHappening
.
-
+Note: The corresponding handler is onItsHappening
.
+
Method Documentation
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html
index d928fbf18..364d3505d 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html
@@ -141,8 +141,8 @@
completed(int status)
This signal is emitted when the operation completed with status.
-
Note: The corresponding handler is onCompleted
.
-
+Note: The corresponding handler is onCompleted
.
+
@@ -152,8 +152,8 @@
group.created()
This signal is prefixed with group.
-
Note: The corresponding handler is group.onCreated
.
-
+Note: The corresponding handler is group.onCreated
.
+
Attached Signal Documentation
@@ -164,8 +164,8 @@
configured()
This attached signal is emitted when the type was configured.
-
Note: The corresponding handler is onConfigured
.
-
+Note: The corresponding handler is onConfigured
.
+
Method Documentation
--
cgit v1.2.1