summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/node.h
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2013-08-19 11:54:26 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-22 16:11:29 +0200
commitd9b5cead974d486e015872e73f918f0e68dda96e (patch)
treee44a382b2915e88ef6e6b905adea67f2e7647267 /src/tools/qdoc/node.h
parent5b4c0d4b0b3367bc47225d6c026465c3323f99ca (diff)
qdoc: Make example file names unique
To avoid duplicate files for examples, the files are named this way. Suppose you have an example called mandelbrot. The example is in a subdirectory named mandelbrot, and there is a \example command somewhere like this: \example mandelbrot In this case, the mandelbrot example is in the QtCore module. Then the name of the example page will be: "qtcore-mandelbrot-example" ...and the names of the example files will be: "qtcore-mandelbrot-main-cpp.html" "qtcore-mandelbrot-mandelbrot-pro.html" "qtcore-mandelbrot-mandelbrotwidget-cpp.html" "qtcore-mandelbrot-mandelbrotwidget-h.html" "qtcore-mandelbrot-renderthread-cpp.html" "qtcore-mandelbrot-renderthread-h.html" Task-number: QTBUG-32580 Change-Id: Ic4445fd65b679523d6d94a8b0c19289d049ef0b0 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/node.h')
-rw-r--r--src/tools/qdoc/node.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h
index 9c8950d185..8364fac82f 100644
--- a/src/tools/qdoc/node.h
+++ b/src/tools/qdoc/node.h
@@ -193,6 +193,8 @@ public:
void markNotSeen() { seen_ = false; }
virtual bool isInnerNode() const = 0;
+ virtual bool isExample() const { return false; }
+ virtual bool isExampleFile() const { return false; }
virtual bool isLeaf() const { return false; }
virtual bool isReimp() const { return false; }
virtual bool isFunction() const { return false; }
@@ -510,6 +512,8 @@ public:
virtual QString nameForLists() const { return title(); }
virtual void setImageFileName(const QString& ) { }
virtual bool isGroup() const { return (subType() == Node::Group); }
+ virtual bool isExample() const { return (subType() == Node::Example); }
+ virtual bool isExampleFile() const { return (parent() && parent()->isExample()); }
protected:
SubType nodeSubtype_;