summaryrefslogtreecommitdiff
path: root/src/definition.cpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:50:10 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 10:50:10 +0900
commit738086af77ab085837d0044a33a5d954a3edc6f5 (patch)
tree3b965243967bdf1aab50ec3dfe74ebdaf75b6942 /src/definition.cpp
parent835421dad74e8989002b592f703a23d87f211df0 (diff)
downloaddoxygen-738086af77ab085837d0044a33a5d954a3edc6f5.tar.gz
doxygen-738086af77ab085837d0044a33a5d954a3edc6f5.tar.bz2
doxygen-738086af77ab085837d0044a33a5d954a3edc6f5.zip
Imported Upstream version 1.8.6upstream/1.8.6
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index b259088..46147fc 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -959,7 +959,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
{
ol.disable(OutputGenerator::Latex);
}
- // write line link (HTML, LaTeX optionally)
+ // write file link (HTML, LaTeX optionally)
ol.writeObjectLink(0,fn,0,m_impl->body->fileDef->name());
ol.enableAll();
ol.disable(OutputGenerator::Html);
@@ -1050,6 +1050,13 @@ void Definition::setBodyDef(FileDef *fd)
m_impl->body->fileDef=fd;
}
+bool Definition::hasSources() const
+{
+ return m_impl->body && m_impl->body->startLine!=-1 &&
+ m_impl->body->endLine>=m_impl->body->startLine &&
+ m_impl->body->fileDef;
+}
+
/*! Write code of this definition into the documentation */
void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
{
@@ -1057,9 +1064,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
ol.pushGeneratorState();
//printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
// m_startBodyLine,m_endBodyLine,m_bodyDef);
- if (inlineSources &&
- m_impl->body && m_impl->body->startLine!=-1 &&
- m_impl->body->endLine>=m_impl->body->startLine && m_impl->body->fileDef)
+ if (inlineSources && hasSources())
{
QCString codeFragment;
int actualStart=m_impl->body->startLine,actualEnd=m_impl->body->endLine;
@@ -1815,7 +1820,7 @@ int Definition::getEndBodyLine() const
return m_impl->body ? m_impl->body->endLine : -1;
}
-FileDef *Definition::getBodyDef()
+FileDef *Definition::getBodyDef() const
{
return m_impl->body ? m_impl->body->fileDef : 0;
}
@@ -1876,4 +1881,10 @@ void Definition::_setSymbolName(const QCString &name)
m_symbolName=name;
}
+bool Definition::hasBriefDescription() const
+{
+ static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC");
+ return !briefDescription().isEmpty() && briefMemberDesc;
+}
+