summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-02-13 18:05:01 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-02-20 19:17:51 (GMT)
commit1d993b03fb172021213fd65c5c0f061c8d42bfb5 (patch)
treefaf6414c8ea4074c4ea4fb52861dc34482ea17ec
parentf640dced8976048f997026927a45a9c06672d02b (diff)
downloadDoxygen-1d993b03fb172021213fd65c5c0f061c8d42bfb5.zip
Doxygen-1d993b03fb172021213fd65c5c0f061c8d42bfb5.tar.gz
Doxygen-1d993b03fb172021213fd65c5c0f061c8d42bfb5.tar.bz2
Refactoring: replace QRegExp by std::regex in htmlhelp.cpp
-rw-r--r--src/htmlhelp.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index af511bb..1d7f888 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -16,10 +16,10 @@
*/
#include <algorithm>
+#include <regex>
#include <stdio.h>
#include <stdlib.h>
-#include <qregexp.h>
#include <qfile.h>
#include <qfileinfo.h>
@@ -154,13 +154,15 @@ void HtmlHelpIndex::addItem(const char *level1,const char *level2,
const char *url,const char *anchor,bool hasLink,
bool reversed)
{
- QCString key = level1;
- if (level2) key+= (QCString)"?" + level2;
- if (key.find(QRegExp("@[0-9]+"))!=-1) // skip anonymous stuff
+ static std::regex re("@[[:digit:]]+");
+ std::string key = level1;
+ if (level2) key+= std::string("?") + level2;
+ if (std::regex_match(key,re)) // skip anonymous stuff
{
return;
}
- m_map.add(key+anchor,key,url,anchor,hasLink,reversed);
+ std::string key_anchor = key+anchor;
+ m_map.add(key_anchor.c_str(),key.c_str(),url,anchor,hasLink,reversed);
}
static QCString field2URL(const IndexField *f,bool checkReversed)