diff options
author | Martin Smith <msmith@trolltech.com> | 2010-04-09 13:14:56 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-04-09 13:14:56 (GMT) |
commit | 5e5836702662783a4fba5f95a487948e5c6d2a4e (patch) | |
tree | 54422405c91e5bce36d389960d159356e9072f75 /tools/qdoc3/generator.cpp | |
parent | b35ca43b5a091420825254e547e63cc9aa73dded (diff) | |
download | Qt-5e5836702662783a4fba5f95a487948e5c6d2a4e.zip Qt-5e5836702662783a4fba5f95a487948e5c6d2a4e.tar.gz Qt-5e5836702662783a4fba5f95a487948e5c6d2a4e.tar.bz2 |
qdoc: Changed qdoc to output the new doc format.
Very cool.
Diffstat (limited to 'tools/qdoc3/generator.cpp')
-rw-r--r-- | tools/qdoc3/generator.cpp | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 80c6efa..24219a1 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -66,6 +66,10 @@ QStringList Generator::imageFiles; QStringList Generator::imageDirs; QStringList Generator::exampleDirs; QStringList Generator::exampleImgExts; +QStringList Generator::scriptFiles; +QStringList Generator::scriptDirs; +QStringList Generator::styleFiles; +QStringList Generator::styleDirs; QString Generator::outDir; QString Generator::project; @@ -124,12 +128,20 @@ void Generator::initialize(const Config &config) if (!dirInfo.mkdir(outDir + "/images/used-in-examples")) config.lastLocation().fatal(tr("Cannot create output directory '%1'") .arg(outDir + "/images/used-in-examples")); + if (!dirInfo.mkdir(outDir + "/scripts")) + config.lastLocation().fatal(tr("Cannot create output directory '%1'") + .arg(outDir + "/scripts")); + if (!dirInfo.mkdir(outDir + "/style")) + config.lastLocation().fatal(tr("Cannot create output directory '%1'") + .arg(outDir + "/style")); } imageFiles = config.getStringList(CONFIG_IMAGES); - qDebug() << "IMAGE FILES" << imageFiles; imageDirs = config.getStringList(CONFIG_IMAGEDIRS); - qDebug() << "IMAGE DIRS" << imageDirs; + scriptFiles = config.getStringList(CONFIG_SCRIPTS); + scriptDirs = config.getStringList(CONFIG_SCRIPTDIRS); + styleFiles = config.getStringList(CONFIG_STYLES); + styleDirs = config.getStringList(CONFIG_STYLEDIRS); exampleDirs = config.getStringList(CONFIG_EXAMPLEDIRS); exampleImgExts = config.getStringList(CONFIG_EXAMPLES + Config::dot + CONFIG_IMAGEEXTENSIONS); @@ -167,6 +179,47 @@ void Generator::initialize(const Config &config) "/images"); ++e; } + + QStringList noExts; + QStringList scripts = + config.getStringList(CONFIG_SCRIPTS+Config::dot+(*g)->format()); + e = scripts.begin(); + while (e != scripts.end()) { + QString userFriendlyFilePath; + QString filePath = Config::findFile(config.lastLocation(), + scriptFiles, + scriptDirs, + *e, + noExts, + userFriendlyFilePath); + if (!filePath.isEmpty()) + Config::copyFile(config.lastLocation(), + filePath, + userFriendlyFilePath, + (*g)->outputDir() + + "/scripts"); + ++e; + } + + QStringList styles = + config.getStringList(CONFIG_STYLES+Config::dot+(*g)->format()); + e = styles.begin(); + while (e != styles.end()) { + QString userFriendlyFilePath; + QString filePath = Config::findFile(config.lastLocation(), + styleFiles, + styleDirs, + *e, + noExts, + userFriendlyFilePath); + if (!filePath.isEmpty()) + Config::copyFile(config.lastLocation(), + filePath, + userFriendlyFilePath, + (*g)->outputDir() + + "/style"); + ++e; + } } ++g; } |