qdoc: Validate index file paths

Check for existence of the paths added by 'indexes'
documentation configuration command, and generate
warnings accordingly. Also, ensure that the strings
added with 'depends' command contain no duplicates.

Change-Id: I66a3d1b25907567bb5bfc72b78a8009d7bd8e067
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
Topi Reinio 2014-06-24 12:05:35 +02:00 committed by Topi Reiniö
parent d15309edee
commit fe099b6383

View File

@ -95,9 +95,18 @@ static void loadIndexFiles(Config& config)
/* /*
Read some XML indexes containing definitions from other documentation sets. Read some XML indexes containing definitions from other documentation sets.
*/ */
QStringList indexFiles = config.getStringList(CONFIG_INDEXES); QStringList indexFiles;
QStringList configIndexes = config.getStringList(CONFIG_INDEXES);
foreach (const QString &index, configIndexes) {
QFileInfo fi(index);
if (fi.exists() && fi.isFile())
indexFiles << index;
else if (Generator::runGenerateOnly())
qDebug() << "warning: Index file not found:" << index;
}
dependModules += config.getStringList(CONFIG_DEPENDS); dependModules += config.getStringList(CONFIG_DEPENDS);
dependModules.removeDuplicates();
bool noOutputSubdirs = false; bool noOutputSubdirs = false;
QString singleOutputSubdir; QString singleOutputSubdir;