qdoc: Handle scripts exactly like styles
The values of the scripts 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 scripts variable. Task-number: QTBUG-27878 Change-Id: Iec12d1937ca9db540a2aa5e378fadc60de0a2d8c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
parent
0f4a1d4421
commit
b75980d7f5
@ -1548,26 +1548,14 @@ void Generator::initialize(const Config &config)
|
||||
}
|
||||
|
||||
// Documentation template handling
|
||||
QStringList searchDirs;
|
||||
QString templateDir = config.getPath((*g)->format() + Config::dot + CONFIG_TEMPLATEDIR);
|
||||
if (templateDir.isEmpty())
|
||||
templateDir = ".";
|
||||
searchDirs.append(templateDir);
|
||||
QStringList noExts;
|
||||
QStringList scripts = config.getCleanPathList((*g)->format()+Config::dot+CONFIG_SCRIPTS);
|
||||
QStringList scripts = config.getPathList((*g)->format()+Config::dot+CONFIG_SCRIPTS);
|
||||
e = scripts.constBegin();
|
||||
while (e != scripts.constEnd()) {
|
||||
QString userFriendlyFilePath;
|
||||
QString filePath = Config::findFile(config.lastLocation(),
|
||||
scriptFiles,
|
||||
searchDirs,
|
||||
*e,
|
||||
noExts,
|
||||
userFriendlyFilePath);
|
||||
QString filePath = *e;
|
||||
if (!filePath.isEmpty())
|
||||
Config::copyFile(config.lastLocation(),
|
||||
filePath,
|
||||
userFriendlyFilePath,
|
||||
filePath,
|
||||
(*g)->outputDir() + "/scripts");
|
||||
++e;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user