Skip to content

Commit 82b5f6e

Browse files
committed
bug_771452 Warnings show wrong filename when same addtogroup name used in multiple files
Protect against empty `docFile`.
1 parent ec7788e commit 82b5f6e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/definition.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,11 @@ void DefinitionImpl::_setDocumentation(const QCString &d,const QCString &docFile
405405
p->details = std::make_optional<DocInfo>();
406406
}
407407
DocInfo &details = p->details.value();
408-
QCString docPre = " \\ifile \"" + docFile + "\" \\iline " + std::to_string(docLine) + " \\ilinebr ";
408+
QCString docPre;
409+
if (!docFile.isEmpty())
410+
{
411+
docPre = " \\ifile \"" + docFile + "\" \\iline " + std::to_string(docLine) + " \\ilinebr ";
412+
}
409413
if (details.doc.isEmpty()) // fresh detailed description
410414
{
411415
details.doc = docPre + doc;

0 commit comments

Comments
 (0)