aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp42
1 files changed, 23 insertions, 19 deletions
diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
index 0f8c4be26..86c10a8df 100644
--- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
@@ -1797,25 +1797,29 @@ void QtDocGenerator::writeConstructors(QTextStream& s, const AbstractMetaClass*
IndentorBase<1> indent1;
indent1.indent = INDENT.total();
- for (AbstractMetaFunction *func : qAsConst(lst)) {
- s << indent1;
- if (first) {
- first = false;
- s << sectionTitle;
- indent1.indent += sectionTitle.size();
- }
- s << functionSignature(cppClass, func) << "\n\n";
-
- const auto version = versionOf(func->typeEntry());
- if (!version.isNull())
- s << indent1 << rstVersionAdded(version);
- if (func->attributes().testFlag(AbstractMetaAttributes::Deprecated))
- s << indent1 << rstDeprecationNote("constructor");
-
- const AbstractMetaArgumentList &arguments = func->arguments();
- for (AbstractMetaArgument *arg : arguments) {
- if (!arg_map.contains(arg->name())) {
- arg_map.insert(arg->name(), arg);
+ if (lst.isEmpty()) {
+ s << sectionTitle << cppClass->fullName();
+ } else {
+ for (AbstractMetaFunction *func : qAsConst(lst)) {
+ s << indent1;
+ if (first) {
+ first = false;
+ s << sectionTitle;
+ indent1.indent += sectionTitle.size();
+ }
+ s << functionSignature(cppClass, func) << "\n\n";
+
+ const auto version = versionOf(func->typeEntry());
+ if (!version.isNull())
+ s << indent1 << rstVersionAdded(version);
+ if (func->attributes().testFlag(AbstractMetaAttributes::Deprecated))
+ s << indent1 << rstDeprecationNote("constructor");
+
+ const AbstractMetaArgumentList &arguments = func->arguments();
+ for (AbstractMetaArgument *arg : arguments) {
+ if (!arg_map.contains(arg->name())) {
+ arg_map.insert(arg->name(), arg);
+ }
}
}
}