Skip to content

Commit 9d8f87f

Browse files
committed
pull_request doxygen#11332 Renamed option to UML_MAX_EDGE_LABELS
Some minor code simplications
1 parent a9ee34c commit 9d8f87f

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/config.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3924,15 +3924,13 @@ where `loc1` and `loc2` can be relative or absolute paths or URLs.
39243924
]]>
39253925
</docs>
39263926
</option>
3927-
<option type='int' id='UML_LIMIT_EDGE_FIELDS' defval='10' minval='0' maxval='100' depends='UML_LOOK'>
3927+
<option type='int' id='UML_MAX_EDGE_LABELS' defval='10' minval='0' maxval='100' depends='UML_LOOK'>
39283928
<docs>
39293929
<![CDATA[
3930-
If the \ref cfg_uml_look "UML_LOOK" tag is enabled, fields are shown along
3931-
the edge between 2 clas nodes.
3932-
If there are many fields and many nodes the
3933-
graph may become too big to be useful. The \c UML_LIMIT_EDGE_FIELDS
3934-
threshold limits the number of items to make the size more
3935-
manageable. Set this to 0 for no limit.
3930+
If the \ref cfg_uml_look "UML_LOOK" tag is enabled, field labels are shown along
3931+
the edge between two class nodes. If there are many fields and many nodes the
3932+
graph may become too cluttered. The \c UML_MAX_EDGE_LABELS threshold limits
3933+
the number of items to make the size more manageable. Set this to 0 for no limit.
39363934
]]>
39373935
</docs>
39383936
</option>

src/dotclassgraph.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,17 +231,20 @@ static QCString joinLabels(const StringSet &ss)
231231
{
232232
QCString label;
233233
int count=1;
234-
int maxLabels = Config_getInt(UML_LIMIT_EDGE_FIELDS);
234+
int maxLabels = Config_getInt(UML_MAX_EDGE_LABELS);
235235
auto it = std::begin(ss), e = std::end(ss);
236236
if (it!=e) // set not empty
237237
{
238-
label += (*it++).c_str();
239-
for (; it!=e && (maxLabels == 0 || count < maxLabels) ; ++it,++count)
238+
label = *it++;
239+
for (; it!=e && (maxLabels==0 || count<maxLabels) ; ++it,++count)
240240
{
241241
label += '\n';
242-
label += (*it).c_str();
242+
label += *it;
243+
}
244+
if (maxLabels!=0 && count==maxLabels)
245+
{
246+
label+="\n...";
243247
}
244-
if (maxLabels != 0 && count==maxLabels) label+="\n...";
245248
}
246249
return label;
247250
}

0 commit comments

Comments
 (0)