From 67cd1a3bf4981fd755ada6eeb85622b46638a749 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 7 Jun 2019 16:34:52 +0200 Subject: Bug 632754 - The \copydoc Command Requires The Use of C++ Syntax in C# Code Replace the scope separators to the default scope separators (::) of doxygen. --- src/docparser.cpp | 3 ++- src/util.cpp | 5 +++++ src/util.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/docparser.cpp b/src/docparser.cpp index 90ace3f..597d304 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -662,6 +662,8 @@ static bool findDocsForMemberOrCompound(const char *commandName, *pBrief=""; *pDef=0; QCString cmdArg=substitute(commandName,"#","::"); + cmdArg = replaceScopeSeparator(cmdArg); + int l=cmdArg.length(); if (l==0) return FALSE; @@ -687,7 +689,6 @@ static bool findDocsForMemberOrCompound(const char *commandName, QCString name=removeRedundantWhiteSpace(cmdArg.left(funcStart)); QCString args=cmdArg.right(l-funcStart); - // try if the link is to a member const MemberDef *md=0; const ClassDef *cd=0; diff --git a/src/util.cpp b/src/util.cpp index a6ae004..d458877 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -8454,6 +8454,11 @@ QCString getLanguageSpecificSeparator(SrcLangExt lang,bool classScope) return "::"; } } +QCString replaceScopeSeparator(QCString str) +{ + // we don't know about the language so we have to go for the worse + return substitute(substitute(str,"\\","::"),".","::"); // PHP and Java, CSharp, VHDL, Python +} /** Checks whether the given url starts with a supported protocol */ bool isURL(const QCString &url) { diff --git a/src/util.h b/src/util.h index 1cd7c9d..9873350 100644 --- a/src/util.h +++ b/src/util.h @@ -119,6 +119,7 @@ class LetterToIndexMap : public SIntDict QCString langToString(SrcLangExt lang); QCString getLanguageSpecificSeparator(SrcLangExt lang,bool classScope=FALSE); +QCString replaceScopeSeparator(QCString str); //-------------------------------------------------------------------- -- cgit v0.12