summaryrefslogtreecommitdiffstats
path: root/src/marshal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/marshal.cpp')
-rw-r--r--src/marshal.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/marshal.cpp b/src/marshal.cpp
index 57ff44b..1c7d54e 100644
--- a/src/marshal.cpp
+++ b/src/marshal.cpp
@@ -10,6 +10,7 @@
#include "groupdef.h"
#include "example.h"
#include "arguments.h"
+#include "doxygen.h"
#define HEADER ('D'<<24)+('O'<<16)+('X'<<8)+'!'
@@ -141,7 +142,9 @@ void marshalSectionInfoList(StorageIntf *s, QList<SectionInfo> *anchors)
marshalQCString(s,si->fileName);
marshalInt(s,si->lineNr);
marshalInt(s,si->level);
+ delete Doxygen::sectionDict->take(si->label); // this dict owns the anchor objects
}
+ anchors->clear();
}
}
@@ -550,11 +553,10 @@ QList<SectionInfo> *unmarshalSectionInfoList(StorageIntf *s)
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0; // null list
- QList<SectionInfo> *result = new QList<SectionInfo>;
- result->setAutoDelete(TRUE);
+ QList<SectionInfo> *anchors = new QList<SectionInfo>;
assert(count<1000000);
for (i=0;i<count;i++)
- {
+ {
QCString label = unmarshalQCString(s);
QCString title = unmarshalQCString(s);
QCString ref = unmarshalQCString(s);
@@ -562,9 +564,14 @@ QList<SectionInfo> *unmarshalSectionInfoList(StorageIntf *s)
QCString fileName = unmarshalQCString(s);
int lineNr = unmarshalInt(s);
int level = unmarshalInt(s);
- result->append(new SectionInfo(fileName,lineNr,label,title,type,level,ref));
+ if (Doxygen::sectionDict->find(label)==0)
+ {
+ SectionInfo *si = new SectionInfo(fileName,lineNr,label,title,type,level,ref);
+ anchors->append(si);
+ Doxygen::sectionDict->append(label,si); // this dict owns the anchor objects
+ }
}
- return result;
+ return anchors;
}
QList<ListItemInfo> *unmarshalItemInfoList(StorageIntf *s)