summaryrefslogtreecommitdiffstats
path: root/src/qdoc/quoter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc/quoter.cpp')
-rw-r--r--src/qdoc/quoter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qdoc/quoter.cpp b/src/qdoc/quoter.cpp
index 397caf085..408b1b5b0 100644
--- a/src/qdoc/quoter.cpp
+++ b/src/qdoc/quoter.cpp
@@ -112,7 +112,7 @@ Quoter::Quoter()
/* We're going to hard code these delimiters:
* C++, Qt, Qt Script, Java:
//! [<id>]
- * .pro, .py files:
+ * .pro, .py, CMake files:
#! [<id>]
* .html, .qrc, .ui, .xq, .xml .dita files:
<!-- [<id>] -->
@@ -120,6 +120,7 @@ Quoter::Quoter()
if (!commentHash.size()) {
commentHash["pro"] = "#!";
commentHash["py"] = "#!";
+ commentHash["cmake"] = "#!";
commentHash["html"] = "<!--";
commentHash["qrc"] = "<!--";
commentHash["ui"] = "<!--";
@@ -339,8 +340,10 @@ void Quoter::failedAtEnd( const Location& docLocation, const QString& command )
QString Quoter::commentForCode() const
{
- QString suffix = QFileInfo(codeLocation.fileName()).suffix();
- return commentHash.value(suffix, "//!");
+ QFileInfo fi = QFileInfo(codeLocation.fileName());
+ if (fi.fileName() == "CMakeLists.txt")
+ return "#!";
+ return commentHash.value(fi.suffix(), "//!");
}
QString Quoter::removeSpecialLines(const QString &line, const QString &comment, int unindent)