Permalink
Browse files

Bug 753500 - $file when using @name is wrong

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Sep 14, 2015
1 parent 9a4a4db commit 790887ea3f63c051954a4cd49f044fa4f536867d
Showing with 23 additions and 13 deletions.
  1. +9 −7 src/commentscan.l
  2. +2 −1 src/membergroup.cpp
  3. +7 −2 src/membergroup.h
  4. +1 −1 src/memberlist.cpp
  5. +4 −2 src/util.cpp
View
@@ -374,7 +374,7 @@ class GuardedSection
void openGroup(Entry *e,const char *file,int line);
void closeGroup(Entry *e,const char *file,int line,bool foundInline=FALSE);
void initGroupInfo(Entry *e);
static void groupAddDocs(Entry *e,const char *fileName);
static void groupAddDocs(Entry *e);
/* -----------------------------------------------------------------
*
@@ -2996,7 +2996,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
checkFormula();
prot = protection;
groupAddDocs(curEntry,fileName);
groupAddDocs(curEntry);
newEntryNeeded = needNewEntry;
@@ -3125,17 +3125,18 @@ void openGroup(Entry *e,const char *,int)
}
}
void closeGroup(Entry *e,const char *fileName,int,bool foundInline)
void closeGroup(Entry *e,const char *fileName,int line,bool foundInline)
{
//printf("==> closeGroup(name=%s,sec=%x) g_autoGroupStack=%d\n",
// e->name.data(),e->section,g_autoGroupStack.count());
//printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) g_autoGroupStack=%d\n",
// e->name.data(),e->section,fileName,line,g_autoGroupStack.count());
if (g_memberGroupId!=DOX_NOGROUP) // end of member group
{
MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(g_memberGroupId);
if (info) // known group
{
info->doc = g_memberGroupDocs;
info->docFile = fileName;
info->docLine = line;
}
g_memberGroupId=DOX_NOGROUP;
g_memberGroupRelates.resize(0);
@@ -3169,7 +3170,7 @@ void initGroupInfo(Entry *e)
}
}
static void groupAddDocs(Entry *e,const char *fileName)
static void groupAddDocs(Entry *e)
{
if (e->section==Entry::MEMBERGRP_SEC)
{
@@ -3184,7 +3185,8 @@ static void groupAddDocs(Entry *e,const char *fileName)
if (info)
{
info->doc = g_memberGroupDocs;
info->docFile = fileName;
info->docFile = e->docFile;
info->docLine = e->docLine;
info->setRefItems(e->sli);
}
e->doc.resize(0);
View
@@ -42,7 +42,7 @@ MemberGroup::MemberGroup()
}
MemberGroup::MemberGroup(Definition *parent,
int id,const char *hdr,const char *d,const char *docFile)
int id,const char *hdr,const char *d,const char *docFile,int docLine)
{
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
memberList = new MemberList(MemberListType_memberGroup);
@@ -56,6 +56,7 @@ MemberGroup::MemberGroup(Definition *parent,
m_numDocMembers = -1;
m_parent = parent;
m_docFile = docFile;
m_docLine = docLine;
m_xrefListItems = 0;
//printf("Member group docs=`%s'\n",doc.data());
}
View
@@ -42,7 +42,7 @@ class MemberGroup
public:
MemberGroup();
MemberGroup(Definition *parent,int id,const char *header,
const char *docs,const char *docFile);
const char *docs,const char *docFile,int docLine);
~MemberGroup();
QCString header() const { return grpHeader; }
int groupId() const { return grpId; }
@@ -89,6 +89,9 @@ class MemberGroup
Definition *parent() const { return m_parent; }
QCString anchor() const;
QCString docFile() const { return m_docFile; }
int docLine() const { return m_docLine; }
void marshal(StorageIntf *s);
void unmarshal(StorageIntf *s);
@@ -105,6 +108,7 @@ class MemberGroup
int m_numDocMembers;
Definition *m_parent;
QCString m_docFile;
int m_docLine;
QList<ListItemInfo> *m_xrefListItems;
};
@@ -137,12 +141,13 @@ class MemberGroupSDict : public SIntDict<MemberGroup>
/** Data collected for a member group */
struct MemberGroupInfo
{
MemberGroupInfo() : m_sli(0) {}
MemberGroupInfo() : m_sli(0), docLine(-1) {}
~MemberGroupInfo() { delete m_sli; m_sli=0; }
void setRefItems(const QList<ListItemInfo> *sli);
QCString header;
QCString doc;
QCString docFile;
int docLine;
QCString compoundName;
QList<ListItemInfo> *m_sli;
};
View
@@ -627,7 +627,7 @@ void MemberList::writeDeclarations(OutputList &ol,
{
//printf("Member group has docs!\n");
ol.startMemberGroupDocs();
ol.generateDoc("[generated]",-1,ctx,0,mg->documentation()+"\n",FALSE,FALSE);
ol.generateDoc(mg->docFile(),mg->docLine(),ctx,0,mg->documentation()+"\n",FALSE,FALSE);
ol.endMemberGroupDocs();
}
ol.startMemberGroup();
View
@@ -5901,7 +5901,8 @@ void addMembersToMemberGroup(MemberList *ml,
groupId,
info->header,
info->doc,
info->docFile
info->docFile,
info->docLine
);
(*ppMemberGroupSDict)->append(groupId,mg);
}
@@ -5933,7 +5934,8 @@ void addMembersToMemberGroup(MemberList *ml,
groupId,
info->header,
info->doc,
info->docFile
info->docFile,
info->docLine
);
(*ppMemberGroupSDict)->append(groupId,mg);
}

0 comments on commit 790887e

Please sign in to comment.