equal
deleted
inserted
replaced
1 /****************************************************************************** |
1 /****************************************************************************** |
2 * |
2 * |
3 * |
3 * |
4 * |
4 * |
5 * |
5 * |
6 * Copyright (C) 1997-2008 by Dimitri van Heesch. |
6 * Copyright (C) 1997-2010 by Dimitri van Heesch. |
7 * |
7 * |
8 * Permission to use, copy, modify, and distribute this software and its |
8 * Permission to use, copy, modify, and distribute this software and its |
9 * documentation under the terms of the GNU General Public License is hereby |
9 * documentation under the terms of the GNU General Public License is hereby |
10 * granted. No representations are made about the suitability of this software |
10 * granted. No representations are made about the suitability of this software |
11 * for any purpose. It is provided "as is" without express or implied warranty. |
11 * for any purpose. It is provided "as is" without express or implied warranty. |
533 { |
533 { |
534 g_memberDef->setHasDocumentedReturnType(TRUE); |
534 g_memberDef->setHasDocumentedReturnType(TRUE); |
535 } |
535 } |
536 else if ( // see if return needs to documented |
536 else if ( // see if return needs to documented |
537 g_memberDef->hasDocumentedReturnType() || |
537 g_memberDef->hasDocumentedReturnType() || |
538 returnType.isEmpty() || // empty return type |
538 returnType.isEmpty() || // empty return type |
539 returnType.find("void")!=-1 || // void return type |
539 returnType.find("void")!=-1 || // void return type |
540 !g_memberDef->isConstructor() || // a constructor |
540 g_memberDef->isConstructor() || // a constructor |
541 !g_memberDef->isDestructor() // or destructor |
541 g_memberDef->isDestructor() // or destructor |
542 ) |
542 ) |
543 { |
543 { |
544 g_memberDef->setHasDocumentedReturnType(TRUE); |
544 g_memberDef->setHasDocumentedReturnType(TRUE); |
545 } |
545 } |
546 |
546 |
668 QString cmdArg=substitute(commandName,"#","::"); |
668 QString cmdArg=substitute(commandName,"#","::"); |
669 int l=cmdArg.length(); |
669 int l=cmdArg.length(); |
670 if (l==0) return FALSE; |
670 if (l==0) return FALSE; |
671 |
671 |
672 int funcStart=cmdArg.find('('); |
672 int funcStart=cmdArg.find('('); |
673 if (funcStart==-1) funcStart=l; |
673 if (funcStart==-1) |
|
674 { |
|
675 funcStart=l; |
|
676 } |
|
677 else |
|
678 { |
|
679 // Check for the case of operator() and the like. |
|
680 // beware of scenarios like operator()((foo)bar) |
|
681 int secondParen = cmdArg.find('(', funcStart+1); |
|
682 int leftParen = cmdArg.find(')', funcStart+1); |
|
683 if (leftParen!=-1 && secondParen!=-1) |
|
684 { |
|
685 if (leftParen<secondParen) |
|
686 { |
|
687 funcStart=secondParen; |
|
688 } |
|
689 } |
|
690 } |
674 |
691 |
675 QString name=removeRedundantWhiteSpace(cmdArg.left(funcStart).latin1()); |
692 QString name=removeRedundantWhiteSpace(cmdArg.left(funcStart).latin1()); |
676 QString args=cmdArg.right(l-funcStart); |
693 QString args=cmdArg.right(l-funcStart); |
677 |
694 |
678 // try if the link is to a member |
695 // try if the link is to a member |
1886 m_file = "@"; // can't cross reference anonymous enum |
1903 m_file = "@"; // can't cross reference anonymous enum |
1887 m_anchor = "@"; |
1904 m_anchor = "@"; |
1888 } |
1905 } |
1889 else |
1906 else |
1890 { |
1907 { |
1891 m_file = refList->listName(); |
1908 m_file = convertNameToFile(refList->listName()); |
1892 m_anchor = item->listAnchor; |
1909 m_anchor = item->listAnchor; |
1893 } |
1910 } |
1894 m_title = refList->sectionTitle(); |
1911 m_title = refList->sectionTitle(); |
1895 //printf("DocXRefItem: file=%s anchor=%s title=%s\n", |
1912 //printf("DocXRefItem: file=%s anchor=%s title=%s\n", |
1896 // m_file.data(),m_anchor.data(),m_title.data()); |
1913 // m_file.data(),m_anchor.data(),m_title.data()); |
4930 int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tagHtmlAttribs) |
4947 int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tagHtmlAttribs) |
4931 { |
4948 { |
4932 DBG(("handleHtmlStartTag(%s,%d)\n",tagName.data(),tagHtmlAttribs.count())); |
4949 DBG(("handleHtmlStartTag(%s,%d)\n",tagName.data(),tagHtmlAttribs.count())); |
4933 int retval=RetVal_OK; |
4950 int retval=RetVal_OK; |
4934 int tagId = Mappers::htmlTagMapper->map(tagName); |
4951 int tagId = Mappers::htmlTagMapper->map(tagName); |
4935 if (g_token->emptyTag && !(tagId&XML_CmdMask) && tagId!=HTML_UNKNOWN) |
4952 if (g_token->emptyTag && !(tagId&XML_CmdMask) && |
|
4953 tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR) |
|
4954 { |
4936 warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: HTML tags may not use the 'empty tag' XHTML syntax."); |
4955 warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: HTML tags may not use the 'empty tag' XHTML syntax."); |
|
4956 } |
4937 switch (tagId) |
4957 switch (tagId) |
4938 { |
4958 { |
4939 case HTML_UL: |
4959 case HTML_UL: |
4940 { |
4960 { |
4941 DocHtmlList *list = new DocHtmlList(this,tagHtmlAttribs,DocHtmlList::Unordered); |
4961 DocHtmlList *list = new DocHtmlList(this,tagHtmlAttribs,DocHtmlList::Unordered); |