diff options
author | albert-github <albert.tests@gmail.com> | 2020-09-29 11:08:00 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-09-29 11:08:00 (GMT) |
commit | 9b59748f682e5d5cec5faea91a57b8b7291c7105 (patch) | |
tree | a47f3287aba3dbc13451af8a3d4efba241b51294 /src | |
parent | b3720aec2c0251d246544c2b30d15b092c9c7c25 (diff) | |
download | Doxygen-9b59748f682e5d5cec5faea91a57b8b7291c7105.zip Doxygen-9b59748f682e5d5cec5faea91a57b8b7291c7105.tar.gz Doxygen-9b59748f682e5d5cec5faea91a57b8b7291c7105.tar.bz2 |
Incorrect sorting of reflist items
When having an example like:
```
/// \file
/** \xrefitem my_errors "err2" "ERR1" ERROR 101*/
#define MY_ERR_CANNOT_OPEN_FILE 101
/** \xrefitem my_errors "err2" "ERR2" ERROR 102*/
#define MY_ERR_CANNOT_CLOSE_FILE 102
/** \xrefitem my_errors "err2" "ERR1a" ERROR 101a*/
#define MY_ERR_CANNOT_OPEN_FILE3 103
/** \xrefitem my_errors "err2" "ERR2a" ERROR 102a*/
#define MY_ERR_CANNOT_CLOSE_FILE4 104
```
the sorting should be done on the part `MY_ERR_CANNOT_...` but no sorting is done (since 1.8.18) as:
- call to `qstricmp` contains twice the same value
- a boolean value should be the result of the compare but in fact an integer value was returned
This problem is most likely a regression due to
```
Commit: aca13723a9373a1080ca7f108e7be0905b9ae793 [aca1372]
Date: Thursday, February 27, 2020 10:38:22 PM
Restructure the way RefLists are handled
```
Diffstat (limited to 'src')
-rw-r--r-- | src/reflist.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflist.cpp b/src/reflist.cpp index 0aaa75f..ed26818 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -60,7 +60,7 @@ void RefList::generatePage() std::sort(m_entries.begin(),m_entries.end(), [](std::unique_ptr<RefItem> &left,std::unique_ptr<RefItem> &right) - { return qstricmp(left->title(),left->title()); }); + { return qstricmp(left->title(),right->title()) < 0; }); //RefItem *item; QCString doc; int cnt = 0; |