diff options
author | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2020-03-16 15:08:20 +0100 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2020-03-20 09:57:26 +0100 |
commit | 02265f9bbc213d219afc345594307affb900e07e (patch) | |
tree | 882a41d2bba43c256a4ae565a65c89e07d29ce79 /src/qdoc/node.h | |
parent | cc92cb9329e1fc17758ef432cfa5e2c938a18da0 (diff) |
qdoc: Extend \example command to consider CMake projects
QDoc looks for project file(s) in the example directories
before generating docs for the example. Now that we are
moving towards CMake, it's ideal that qdoc is aware of this
new project file type.
Refactor the code that looks for project files - add a new
function to Config for this purpose, and store the project
file name into ExampleNode. This allows removal of
duplicated logic when generating the example-manifest.xml
file.
Add a unit test for Config::getExampleProjectFile(), and
modify the generatedoutput test to cover output for a
CMake-based example.
[ChangeLog][qdoc] Added support for CMake-based example projects.
Fixes: QTBUG-82908
Change-Id: If9f061c613fee94b35df277043c2f4df93da7ec0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qdoc/node.h')
-rw-r--r-- | src/qdoc/node.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qdoc/node.h b/src/qdoc/node.h index 9f78cc824..b7293f408 100644 --- a/src/qdoc/node.h +++ b/src/qdoc/node.h @@ -705,13 +705,19 @@ public: void setImageFileName(const QString &ifn) override { imageFileName_ = ifn; } const QStringList &files() const { return files_; } const QStringList &images() const { return images_; } - void setFiles(const QStringList files) { files_ = files; } + const QString &projectFile() const { return projectFile_; } + void setFiles(const QStringList files, const QString &projectFile) + { + files_ = files; + projectFile_ = projectFile; + } void setImages(const QStringList images) { images_ = images; } void appendFile(QString &file) { files_.append(file); } void appendImage(QString &image) { images_.append(image); } private: QString imageFileName_; + QString projectFile_; QStringList files_; QStringList images_; }; |