summaryrefslogtreecommitdiffstats
path: root/src/plantuml.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/plantuml.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/plantuml.cpp')
-rw-r--r--src/plantuml.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plantuml.cpp b/src/plantuml.cpp
index f8623ef..da26ba7 100644
--- a/src/plantuml.cpp
+++ b/src/plantuml.cpp
@@ -229,12 +229,12 @@ static void runPlantumlContent(const PlantumlManager::FilesMap &plantumlFiles,
pumlArguments+=puFileName;
pumlArguments+="\" ";
- QFile file(puFileName);
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(puFileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
err("Could not open file %s for writing\n",puFileName.data());
}
- file.writeBlock( nb.content, nb.content.length() );
+ file.write( nb.content.data(), nb.content.length() );
file.close();
Debug::print(Debug::Plantuml,0,"*** %s Running Plantuml arguments:%s\n","PlantumlManager::runPlantumlContent",qPrint(pumlArguments));
@@ -247,7 +247,7 @@ static void runPlantumlContent(const PlantumlManager::FilesMap &plantumlFiles,
else if (Config_getBool(DOT_CLEANUP))
{
Debug::print(Debug::Plantuml,0,"*** %s Remove %s file\n","PlantumlManager::runPlantumlContent",qPrint(puFileName));
- file.remove();
+ Dir().remove(puFileName.str());
}
Portable::sysTimerStop();
@@ -284,12 +284,12 @@ void PlantumlManager::run()
runPlantumlContent(m_svgPlantumlFiles, m_svgPlantumlContent, PUML_SVG);
runPlantumlContent(m_epsPlantumlFiles, m_epsPlantumlContent, PUML_EPS);
QCString outputFilename = Config_getString(OUTPUT_DIRECTORY) + "/" + CACHE_FILENAME;
- QFile file(outputFilename);
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(outputFilename.str(),std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
err("Could not open file %s for writing\n",CACHE_FILENAME);
}
- file.writeBlock( m_currentPlantumlAllContent, m_currentPlantumlAllContent.length() );
+ file.write( m_currentPlantumlAllContent.data(), m_currentPlantumlAllContent.length() );
file.close();
}