From 6916b03899f9980b536c5735c8069a15eff4e5ce Mon Sep 17 00:00:00 2001 From: David Hebbeker Date: Sat, 2 Jan 2021 15:51:26 +0100 Subject: Optimize: usedDir can not be parent of dd if they have the same parent. --- src/dotdirdeps.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dotdirdeps.cpp b/src/dotdirdeps.cpp index f049527..db5be2a 100644 --- a/src/dotdirdeps.cpp +++ b/src/dotdirdeps.cpp @@ -81,7 +81,7 @@ void writeDotDirDepGraph(FTextStream &t,const DirDef *dd,bool linkRelations) // draw all directories which have `dd->parent()` as parent and `dd` as dependent const auto newEnd = std::remove_if(usedDirsNotDrawn.begin(), usedDirsNotDrawn.end(), [&](const DirDef *const usedDir) { - if (dd!=usedDir && dd->parent()==usedDir->parent() && !usedDir->isParentOf(dd)) + if (dd!=usedDir && dd->parent()==usedDir->parent()) { drawDirectory(t, usedDir, usedDir->isCluster() && !Config_getBool(DOT_TRANSPARENT), dirsInGraph); return true; @@ -136,8 +136,7 @@ void writeDotDirDepGraph(FTextStream &t,const DirDef *dd,bool linkRelations) // shortName().data(), // !usedDir->isParentOf(this) // ); - if (dir!=usedDir && dir->parent()==usedDir->parent() && - !usedDir->isParentOf(dd)) + if (dir!=usedDir && dir->parent()==usedDir->parent()) // include if both have the same parent (or no parent) { drawDirectory(t, usedDir, usedDir->isCluster() && !Config_getBool(DOT_TRANSPARENT), dirsInGraph); -- cgit v0.12 From 0739b5f6b9080c19a42d9f2900c1b68e12e98837 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 3 Jan 2021 13:35:31 +0100 Subject: Compilation warning in util.cpp When compiling util.cpp we get (on Windows 64-bit) the warning: ``` util.cpp(1075): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data ``` making it conform other calls. --- src/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index 665df8b..0c6d8fd 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1072,7 +1072,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope, void writeExamples(OutputList &ol,const ExampleList &list) { - QCString exampleLine=theTranslator->trWriteList(list.size()); + QCString exampleLine=theTranslator->trWriteList((int)list.size()); //bool latexEnabled = ol.isEnabled(OutputGenerator::Latex); //bool manEnabled = ol.isEnabled(OutputGenerator::Man); -- cgit v0.12 From d557c9cc9aed41c305af5c10524e3dad1a902539 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 5 Jan 2021 12:24:41 +0100 Subject: Incorrect entries on treeview When having e.g. markdown files like: ``` 0.3.1.md 0.3.2.md ``` we get in the treeview twice the item "0" instead of the, more, expected "0.3.1" and "0.3.2". This is due to the fact that the filename is seen as `0` and the extension `.3.1.md` and `.3.2.md` instead of filename `0.3.1` and `0.3.2` and extension in both cases `.md`. The problem was found by Fossies in the Buildbot project. --- src/markdown.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index 340ac99..93d143d 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2734,8 +2734,8 @@ void MarkdownOutlineParser::parseInput(const char *fileName, if (id.startsWith("autotoc_md")) id = ""; int indentLevel=title.isEmpty() ? 0 : -1; markdown.setIndentLevel(indentLevel); - QCString titleFn = QFileInfo(fileName).baseName().utf8(); QCString fn = QFileInfo(fileName).fileName().utf8(); + QCString titleFn = stripExtensionGeneral(fn,getFileNameExtension(fn)); QCString mdfileAsMainPage = Config_getString(USE_MDFILE_AS_MAINPAGE); bool wasEmpty = id.isEmpty(); if (wasEmpty) id = markdownFileNameToId(fileName); -- cgit v0.12