@@ -977,42 +977,28 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
977
977
}
978
978
}
979
979
}
980
- if (!found && (cd || (cd=getClass (matchWord))))
981
- {
982
- // printf("Found class %s\n",qPrint(cd->name()));
983
- // add link to the result
980
+ auto writeCompoundName = [&](const auto *cd) {
984
981
if (external ? cd->isLinkable () : cd->isLinkableInProject ())
985
982
{
986
- if (cd!=self)
983
+ if (cd-> qualifiedName () !=self-> qualifiedName () )
987
984
{
988
985
out.writeLink (cd->getReference (),cd->getOutputFileBase (),cd->anchor (),word.c_str ());
989
986
found=TRUE ;
990
987
}
991
988
}
989
+ };
990
+ if (!found && (cd || (cd=getClass (matchWord))))
991
+ {
992
+ // printf("Found class %s\n",qPrint(cd->name()));
993
+ writeCompoundName (cd);
992
994
}
993
995
else if ((cd=getClass (matchWord+" -p" ))) // search for Obj-C protocols as well
994
996
{
995
- // add link to the result
996
- if (external ? cd->isLinkable () : cd->isLinkableInProject ())
997
- {
998
- if (cd!=self)
999
- {
1000
- out.writeLink (cd->getReference (),cd->getOutputFileBase (),cd->anchor (),word.c_str ());
1001
- found=TRUE ;
1002
- }
1003
- }
997
+ writeCompoundName (cd);
1004
998
}
1005
- else if ((cnd=getConcept (matchWord)))
999
+ else if ((cnd=getConcept (matchWord))) // search for concepts
1006
1000
{
1007
- // add link to the result
1008
- if (external ? cnd->isLinkable () : cnd->isLinkableInProject ())
1009
- {
1010
- if (cnd!=self)
1011
- {
1012
- out.writeLink (cnd->getReference (),cnd->getOutputFileBase (),cnd->anchor (),word.c_str ());
1013
- found=TRUE ;
1014
- }
1015
- }
1001
+ writeCompoundName (cnd);
1016
1002
}
1017
1003
else
1018
1004
{
0 commit comments