diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-10-28 20:56:03 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-10-29 21:54:21 (GMT) |
commit | d38df57916d5902abc9dbaf5891c14898ce675da (patch) | |
tree | e546dc1ab7076ec0726259ebed973130af9e83ec /src/docgroup.cpp | |
parent | 94e8899c8013cf99a6f90d1c8f0a7815ccc3e1c3 (diff) | |
download | Doxygen-d38df57916d5902abc9dbaf5891c14898ce675da.zip Doxygen-d38df57916d5902abc9dbaf5891c14898ce675da.tar.gz Doxygen-d38df57916d5902abc9dbaf5891c14898ce675da.tar.bz2 |
Replaced QList<Grouping> with std::vector<Grouping>
Diffstat (limited to 'src/docgroup.cpp')
-rw-r--r-- | src/docgroup.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/docgroup.cpp b/src/docgroup.cpp index ecaa1af..fbdb842 100644 --- a/src/docgroup.cpp +++ b/src/docgroup.cpp @@ -23,7 +23,6 @@ void DocGroup::enterFile(const char *fileName,int) { m_openCount = 0; - m_autoGroupStack.setAutoDelete(TRUE); m_autoGroupStack.clear(); m_memberGroupId = DOX_NOGROUP; m_memberGroupDocs.resize(0); @@ -40,7 +39,7 @@ void DocGroup::leaveFile(const char *fileName,int line) m_memberGroupId=DOX_NOGROUP; m_memberGroupRelates.resize(0); m_memberGroupDocs.resize(0); - if (!m_autoGroupStack.isEmpty()) + if (!m_autoGroupStack.empty()) { warn(fileName,line,"end of file while inside a group"); } @@ -109,10 +108,10 @@ void DocGroup::open(Entry *e,const char *,int, bool implicit) { if (!implicit) m_openCount++; //printf("==> openGroup(name=%s,sec=%x) m_autoGroupStack=%d\n", - // e->name.data(),e->section,m_autoGroupStack.count()); + // e->name.data(),e->section,m_autoGroupStack.size()); if (e->section==Entry::GROUPDOC_SEC) // auto group { - m_autoGroupStack.push(new Grouping(e->name,e->groupingPri())); + m_autoGroupStack.push_back(Grouping(e->name,e->groupingPri())); } else // start of a member group { @@ -148,7 +147,7 @@ void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,boo } } //printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) m_autoGroupStack=%d\n", - // e->name.data(),e->section,fileName,line,m_autoGroupStack.count()); + // e->name.data(),e->section,fileName,line,m_autoGroupStack.size()); if (m_memberGroupId!=DOX_NOGROUP) // end of member group { MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(m_memberGroupId); @@ -164,13 +163,13 @@ void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,boo if (!foundInline) e->mGrpId=DOX_NOGROUP; //printf("new group id=%d\n",m_memberGroupId); } - else if (!m_autoGroupStack.isEmpty()) // end of auto group + else if (!m_autoGroupStack.empty()) // end of auto group { - Grouping *grp = m_autoGroupStack.pop(); + Grouping grp = m_autoGroupStack.back(); + m_autoGroupStack.pop_back(); // see bug577005: we should not remove the last group for e - if (!foundInline) e->groups->removeLast(); + if (!foundInline && !e->groups.empty()) e->groups.pop_back(); //printf("Removing %s e=%p\n",grp->groupname.data(),e); - delete grp; if (!foundInline) initGroupInfo(e); } } @@ -181,12 +180,12 @@ void DocGroup::initGroupInfo(Entry *e) // m_memberGroupRelates.data(),e); e->mGrpId = m_memberGroupId; e->relates = m_memberGroupRelates; - if (!m_autoGroupStack.isEmpty()) + if (!m_autoGroupStack.empty()) { //printf("Appending group %s to %s: count=%d entry=%p\n", // m_autoGroupStack.top()->groupname.data(), // e->name.data(),e->groups->count(),e); - e->groups->append(new Grouping(*m_autoGroupStack.top())); + e->groups.push_back(Grouping(m_autoGroupStack.back())); } } |