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 <jerome.pasion@digia.com>
This commit is contained in:
Martin Smith 2012-11-16 14:47:45 +01:00 committed by Jerome Pasion
parent b75980d7f5
commit a5f2a0816b

View File

@ -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;
}