Skip to content

Commit f3b238d

Browse files
author
David Boddie
committed
QDoc: Only assign overload numbers to documented functions
Functions were previously assigned numbers whether they were documented or not. This led to links containing overload numbers that did not reflect the number of overloads in the documentation. In the minimal case, a single function with no visible overloads would be assigned a number. The extraction mark is also affected in the minimal case since the [overload1] text is included for primary overloads. Task-number: QTBUG-139262 Pick-to: 6.10 Change-Id: If4678721c4899525ee9971db48f4c41c9513f464 Reviewed-by: Topi Reiniö <[email protected]> Reviewed-by: Paul Wicking <[email protected]>
1 parent 74711c4 commit f3b238d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/qdoc/qdoc/src/qdoc/aggregate.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,13 @@ void Aggregate::normalizeOverloads()
371371
return f1->hasDoc();
372372
return (compare(f1, f2) < 0);
373373
});
374-
// Set overload numbers
374+
// Set overload numbers only if the functions are documented.
375+
// They are not visible if undocumented.
375376
signed short n{0};
376-
for (auto *fn : map_it)
377-
fn->setOverloadNumber(n++);
377+
for (auto *fn : map_it) {
378+
if (fn->hasDoc())
379+
fn->setOverloadNumber(n++);
380+
}
378381
}
379382
}
380383

0 commit comments

Comments
 (0)