summaryrefslogtreecommitdiffstats
path: root/src/htags.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-03-14 14:47:59 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-03-18 20:57:40 (GMT)
commitfa1897b1889f7bf74de68f1ac99cf3be343a7551 (patch)
treeea14c45937cb6fef237c0fcafbd5b0923abd8f0a /src/htags.cpp
parent0d05e79d67b5b808918541f429b06805207e8bdb (diff)
downloadDoxygen-fa1897b1889f7bf74de68f1ac99cf3be343a7551.zip
Doxygen-fa1897b1889f7bf74de68f1ac99cf3be343a7551.tar.gz
Doxygen-fa1897b1889f7bf74de68f1ac99cf3be343a7551.tar.bz2
Refactoring: replace QFile/FTextStream with fstream/stringstream
Diffstat (limited to 'src/htags.cpp')
-rw-r--r--src/htags.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/htags.cpp b/src/htags.cpp
index fdde0f3..e59e7c8 100644
--- a/src/htags.cpp
+++ b/src/htags.cpp
@@ -24,7 +24,6 @@
#include "config.h"
#include "portable.h"
#include "fileinfo.h"
-#include "qdir.h"
bool Htags::useHtags = FALSE;
@@ -123,16 +122,13 @@ bool Htags::loadFilemap(const QCString &htmlDir)
*/
if (fi.exists() && fi.isReadable())
{
- QFile f(fileMapName);
- const int maxlen = 8192;
- QCString line(maxlen+1);
- line.at(maxlen)='\0';
- if (f.open(IO_ReadOnly))
+ std::ifstream f(fileMapName.str(),std::ifstream::in);
+ if (f.is_open())
{
- int len;
- while ((len=f.readLine(line.rawData(),maxlen))>0)
+ std::string lineStr;
+ while (getline(f,lineStr))
{
- line.at(len)='\0';
+ QCString line = lineStr;
//printf("Read line: %s",line.data());
int sep = line.find('\t');
if (sep!=-1)
@@ -145,14 +141,14 @@ bool Htags::loadFilemap(const QCString &htmlDir)
//printf("Key/Value=(%s,%s)\n",key.data(),value.data());
}
}
- return TRUE;
+ return true;
}
else
{
err("file %s cannot be opened\n",fileMapName.data());
}
}
- return FALSE;
+ return false;
}
/*! convert path name into the url in the hypertext generated by htags.