summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-11-01 15:04:41 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-11-01 15:04:41 (GMT)
commitcc3cb095a035db0037604dca2109c927e3ba7df3 (patch)
treec31578a0605c5e675bd453c4de23bc80704f0005
parent97b6eb5c0d47b3a8c5ceab0052d773b8c281206b (diff)
downloadDoxygen-cc3cb095a035db0037604dca2109c927e3ba7df3.zip
Doxygen-cc3cb095a035db0037604dca2109c927e3ba7df3.tar.gz
Doxygen-cc3cb095a035db0037604dca2109c927e3ba7df3.tar.bz2
issue_6589 anchor after test command in a namespace produces duplicate tests
Not only should be checked whether the item to be inserted is the main item but also if it is not one of the extra items
-rw-r--r--src/reflist.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/reflist.cpp b/src/reflist.cpp
index e551743..dae6801 100644
--- a/src/reflist.cpp
+++ b/src/reflist.cpp
@@ -131,7 +131,15 @@ void RefList::insertIntoList(const char *key,RefItem *item)
{
if (ri!=item)
{
- ri->extraItems.append(item);
+ // We also have to check if the item is not already in the "extra" list
+ QListIterator<RefItem> li(ri->extraItems);
+ RefItem *extraItem;
+ bool doubleItem = false;
+ for (li.toFirst();(extraItem=li.current());++li)
+ {
+ if (item == extraItem) doubleItem = true;
+ }
+ if (!doubleItem) ri->extraItems.append(item);
}
}
}