qdoc: Update to prepare to run on a directory.
This change sets some default file extensions to accept to generate documentation. It also removes support for the sourceModules qdocconf variable which is not used anymore. It was used just after modularization. Change-Id: Iabdcfb534dc662bd44e0928036fd68ee4e460b07 Reviewed-by: Martin Smith <martin.smith@nokia.com>
This commit is contained in:
parent
0bb95b183b
commit
6694181bb7
@ -171,7 +171,6 @@ private:
|
|||||||
#define CONFIG_SHOWINTERNAL "showinternal"
|
#define CONFIG_SHOWINTERNAL "showinternal"
|
||||||
#define CONFIG_SOURCEDIRS "sourcedirs"
|
#define CONFIG_SOURCEDIRS "sourcedirs"
|
||||||
#define CONFIG_SOURCEENCODING "sourceencoding"
|
#define CONFIG_SOURCEENCODING "sourceencoding"
|
||||||
#define CONFIG_SOURCEMODULES "sourcemodules"
|
|
||||||
#define CONFIG_SOURCES "sources"
|
#define CONFIG_SOURCES "sources"
|
||||||
#define CONFIG_SPURIOUS "spurious"
|
#define CONFIG_SPURIOUS "spurious"
|
||||||
#define CONFIG_STYLEDIRS "styledirs"
|
#define CONFIG_STYLEDIRS "styledirs"
|
||||||
|
@ -76,6 +76,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
/*
|
/*
|
||||||
The default indent for code is 4.
|
The default indent for code is 4.
|
||||||
The default value for false is 0.
|
The default value for false is 0.
|
||||||
|
The default supported file extensions are cpp, h, qdoc and qml.
|
||||||
The default language is c++.
|
The default language is c++.
|
||||||
The default output format is html.
|
The default output format is html.
|
||||||
The default tab size is 8.
|
The default tab size is 8.
|
||||||
@ -87,6 +88,7 @@ static const struct {
|
|||||||
} defaults[] = {
|
} defaults[] = {
|
||||||
{ CONFIG_CODEINDENT, "4" },
|
{ CONFIG_CODEINDENT, "4" },
|
||||||
{ CONFIG_FALSEHOODS, "0" },
|
{ CONFIG_FALSEHOODS, "0" },
|
||||||
|
{ CONFIG_FILEEXTENSIONS, "*.cpp *.h *.qdoc *.qml"},
|
||||||
{ CONFIG_LANGUAGE, "Cpp" },
|
{ CONFIG_LANGUAGE, "Cpp" },
|
||||||
{ CONFIG_OUTPUTFORMATS, "HTML" },
|
{ CONFIG_OUTPUTFORMATS, "HTML" },
|
||||||
{ CONFIG_TABSIZE, "8" },
|
{ CONFIG_TABSIZE, "8" },
|
||||||
@ -173,27 +175,6 @@ static void processQdocconfFile(const QString &fileName)
|
|||||||
Location::initialize(config);
|
Location::initialize(config);
|
||||||
config.load(fileName);
|
config.load(fileName);
|
||||||
|
|
||||||
QStringList sourceModules;
|
|
||||||
sourceModules = config.getStringList(CONFIG_SOURCEMODULES);
|
|
||||||
Location sourceModulesLocation = config.lastLocation();
|
|
||||||
|
|
||||||
if (!sourceModules.isEmpty()) {
|
|
||||||
Location::information(tr("qdoc will generate documentation for the modules found in the sourcemodules variable."));
|
|
||||||
foreach (const QString& sourceModule, sourceModules) {
|
|
||||||
QString qdocconf = sourceModule;
|
|
||||||
if (!qdocconf.endsWith(".qdocconf"))
|
|
||||||
qdocconf += "/doc/config/module.qdocconf";
|
|
||||||
QFile f(qdocconf);
|
|
||||||
if (!f.exists()) {
|
|
||||||
sourceModulesLocation.warning(tr("Can't find module's qdoc config file '%1'").arg(qdocconf));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Location::information(tr(" Including: %1").arg(qdocconf));
|
|
||||||
config.load(qdocconf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Add the defines to the configuration variables.
|
Add the defines to the configuration variables.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user