summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/config.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2012-11-09 15:33:02 +0100
committerMartin Smith <martin.smith@digia.com>2012-11-14 13:29:17 +0100
commit6326746d226fa55175a83d6b197630d75cd6a9cb (patch)
tree9e0653b5e1a455dfad9cc1c99047fdba6d44394b /src/tools/qdoc/config.cpp
parent80f91f4e1bf2473ff3d9c9a76f2b01aa2273d804 (diff)
qdoc: better copying of .css files
This fix searches for the css files specified in the stylesheets variable. It searches for them in the directory specified as the templatedir. It copies them into the style subdirectory of the outputdir. It also tests QT_INSTALL_DOCS before setting it to the library info. If it was set on the command line, it is not set from the library info. This change also includes some debug code, which will be removed after testing. Task-number: QTBUG-27878 Change-Id: I7a9469b840e13b966aca44b99aebba102e5d4f0c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/config.cpp')
-rw-r--r--src/tools/qdoc/config.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/tools/qdoc/config.cpp b/src/tools/qdoc/config.cpp
index 1ecfb6ddaf..89d4f1afe9 100644
--- a/src/tools/qdoc/config.cpp
+++ b/src/tools/qdoc/config.cpp
@@ -50,6 +50,7 @@
#include <qtextstream.h>
#include <qdebug.h>
#include "config.h"
+#include "generator.h"
#include <stdlib.h>
QT_BEGIN_NAMESPACE
@@ -148,6 +149,7 @@ QStringList MetaStack::getExpanded(const Location& location)
}
QT_STATIC_CONST_IMPL QString Config::dot = QLatin1String(".");
+bool Config::debug = false;
bool Config::generateExamples = true;
QString Config::overrideOutputDir;
QString Config::installDir;
@@ -548,6 +550,10 @@ QString Config::findFile(const Location& location,
const QString& fileName,
QString& userFriendlyFilePath)
{
+ if (debug)
+ qDebug() << "FILES:" << files
+ << "DIRS:" << dirs
+ << "FILENAME:" << fileName;
if (fileName.isEmpty() || fileName.startsWith(QLatin1Char('/'))) {
userFriendlyFilePath = fileName;
return fileName;
@@ -572,6 +578,8 @@ QString Config::findFile(const Location& location,
if (fileInfo.fileName().isEmpty()) {
QStringList::ConstIterator d = dirs.constBegin();
while (d != dirs.constEnd()) {
+ if (debug)
+ qDebug() << "TEST:" << QDir(*d).absolutePath() << firstComponent;
fileInfo.setFile(QDir(*d), firstComponent);
if (fileInfo.exists()) {
break;
@@ -853,9 +861,7 @@ void Config::load(Location location, const QString& fileName)
/*
Here is the recursive call.
*/
- load(location,
- QFileInfo(QFileInfo(fileName).dir(), includeFile)
- .filePath());
+ load(location, QFileInfo(QFileInfo(fileName).dir(), includeFile).filePath());
}
else {
/*