summaryrefslogtreecommitdiffstats
path: root/src/dotdirdeps.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-04-11 19:22:59 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-04-22 17:34:13 (GMT)
commit592aaa4f17d73ec8c475df0f44efaea8cc4d575c (patch)
tree3cfd68cec756661045ee25c906a8d8f4bddf7a6a /src/dotdirdeps.cpp
parent98c67549bc3cd855873e0ef5eeab7c6410699d78 (diff)
downloadDoxygen-592aaa4f17d73ec8c475df0f44efaea8cc4d575c.zip
Doxygen-592aaa4f17d73ec8c475df0f44efaea8cc4d575c.tar.gz
Doxygen-592aaa4f17d73ec8c475df0f44efaea8cc4d575c.tar.bz2
Refactoring: remove implicit conversion from QCString to const char *
This commit changes the following in relation to string use - The implicit convert from 'QCString' to 'const char *' is removed - Strings parameters use 'const QCString &' as much as possible in favor over 'const char *' - 'if (s)' where s is a QCString has been replaced by 'if(!s.isEmpty())' - data() now always returns a valid C-string and not a 0-pointer. - when passing a string 's' to printf and related functions 'qPrint(s)' is used instead of 's.data()' - for empty string arguments 'QCString()' is used instead of '0' - The copy() operation has been removed - Where possible 'qstrcmp(a,b)==0' has been replaces by 'a==b' and 'qstrcmp(a,b)<0' has been replaced by 'a<b' - Parameters of string type that were default initialized with '= 0' are no initialized with '= QCString()'
Diffstat (limited to 'src/dotdirdeps.cpp')
-rw-r--r--src/dotdirdeps.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dotdirdeps.cpp b/src/dotdirdeps.cpp
index 8367df9..12236a0 100644
--- a/src/dotdirdeps.cpp
+++ b/src/dotdirdeps.cpp
@@ -124,7 +124,7 @@ void writeDotDirDepGraph(TextStream &t,const DirDef *dd,bool linkRelations)
// add nodes for other used directories
{
- //printf("*** For dir %s\n",shortName().data());
+ //printf("*** For dir %s\n",qPrint(shortName()));
for (const auto &usedDir : usedDirsNotDrawn)
// for each used dir (=directly used or a parent of a directly used dir)
{
@@ -132,10 +132,10 @@ void writeDotDirDepGraph(TextStream &t,const DirDef *dd,bool linkRelations)
while (dir)
{
//printf("*** check relation %s->%s same_parent=%d !%s->isParentOf(%s)=%d\n",
- // dir->shortName().data(),usedDir->shortName().data(),
+ // qPrint(dir->shortName()),qPrint(usedDir->shortName()),
// dir->parent()==usedDir->parent(),
- // usedDir->shortName().data(),
- // shortName().data(),
+ // qPrint(usedDir->shortName()),
+ // qPrint(shortName()),
// !usedDir->isParentOf(this)
// );
if (dir!=usedDir && dir->parent()==usedDir->parent())
@@ -217,9 +217,9 @@ QCString DotDirDeps::getImgAltText() const
QCString DotDirDeps::writeGraph(TextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool generateImageMap,
int graphId,
bool linkRelations)