diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2018-11-24 17:55:02 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2018-11-24 17:55:02 (GMT) |
commit | 4ed08b969b575d6dc1a49bca936a43eb43d337e2 (patch) | |
tree | d1cacf0e234913f1396774ce7a7a2e9994c19983 /src/reflist.cpp | |
parent | 03404b069fb6ccbe02dcb23eb051a327afd9449c (diff) | |
download | Doxygen-4ed08b969b575d6dc1a49bca936a43eb43d337e2.zip Doxygen-4ed08b969b575d6dc1a49bca936a43eb43d337e2.tar.gz Doxygen-4ed08b969b575d6dc1a49bca936a43eb43d337e2.tar.bz2 |
Refactored code a bit
Diffstat (limited to 'src/reflist.cpp')
-rw-r--r-- | src/reflist.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/reflist.cpp b/src/reflist.cpp index 59f7ad4..6f2a763 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -169,29 +169,19 @@ void RefList::generatePage() doc += item->prefix; doc += " \\_internalref "; doc += item->name; - doc += " \""; // escape \'s in title, see issue #5901 - // prevent Obj-C names in e.g. todo list are seen as emoji - if (item->scope) - { - switch(item->scope->definitionType()) - { - case Definition::TypeClass: - case Definition::TypeNamespace: - case Definition::TypeMember: - case Definition::TypePackage: - doc += substitute(substitute(item->title,"\\","\\\\"),":","∷"); - break; - default: - doc += substitute(item->title,"\\","\\\\"); - break; - } - } - else + QCString escapedTitle = substitute(item->title,"\\","\\\\"); + if (item->scope && + (item->scope->definitionType()==Definition::TypeClass || + item->scope->definitionType()==Definition::TypeNamespace || + item->scope->definitionType()==Definition::TypeMember || + item->scope->definitionType()==Definition::TypePackage) + ) { - doc += substitute(item->title,"\\","\\\\"); + // prevent Obj-C names in e.g. todo list are seen as emoji + escapedTitle = substitute(escapedTitle,":","∷"); } - doc += "\" "; + doc += " \""+escapedTitle+"\" "; // write declaration in case a function with arguments if (!item->args.isEmpty()) { |