From a5f2a0816b6906053a295b14a5eebcc2dce4704c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 16 Nov 2012 14:47:45 +0100 Subject: qdoc: Handle extra imahes exactly like styles The values of the extraimages variable in the qdocconf file must now be paths that are relative to the location of the qdocconf file, just like for styles. They can be absolute paths, of course, but if they are relative, they must be relative to the qdocconf file containing the extraimages variable. The extraimages variable is for including images used in the HTML heard and footer that are not referred to in the documentation. Task-number: QTBUG-27878 Change-Id: If5e0d1dee7ba231a9c1a73f02a1bbaeb7bfe52c8 Reviewed-by: Jerome Pasion --- src/tools/qdoc/generator.cpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp index 882af2a2f3..2854aedbbe 100644 --- a/src/tools/qdoc/generator.cpp +++ b/src/tools/qdoc/generator.cpp @@ -1528,21 +1528,14 @@ void Generator::initialize(const Config &config) if (outputFormats.contains((*g)->format())) { currentGenerator_ = (*g); (*g)->initializeGenerator(config); - QStringList extraImages = - config.getCleanPathList(CONFIG_EXTRAIMAGES+Config::dot+(*g)->format()); + QStringList extraImages = config.getCleanPathList((*g)->format() + + Config::dot + + CONFIG_EXTRAIMAGES); QStringList::ConstIterator e = extraImages.constBegin(); while (e != extraImages.constEnd()) { - QString userFriendlyFilePath; - QString filePath = Config::findFile(config.lastLocation(), - imageFiles, - imageDirs, - *e, - imgFileExts[(*g)->format()], - userFriendlyFilePath); + QString filePath = *e; if (!filePath.isEmpty()) - Config::copyFile(config.lastLocation(), - filePath, - userFriendlyFilePath, + Config::copyFile(config.lastLocation(), filePath, filePath, (*g)->outputDir() + "/images"); ++e; } @@ -1553,9 +1546,7 @@ void Generator::initialize(const Config &config) while (e != scripts.constEnd()) { QString filePath = *e; if (!filePath.isEmpty()) - Config::copyFile(config.lastLocation(), - filePath, - filePath, + Config::copyFile(config.lastLocation(), filePath, filePath, (*g)->outputDir() + "/scripts"); ++e; } @@ -1565,9 +1556,7 @@ void Generator::initialize(const Config &config) while (e != styles.constEnd()) { QString filePath = *e; if (!filePath.isEmpty()) - Config::copyFile(config.lastLocation(), - filePath, - filePath, + Config::copyFile(config.lastLocation(), filePath, filePath, (*g)->outputDir() + "/style"); ++e; } -- cgit v1.2.3