summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2011-08-23 20:45:26 (GMT)
committerSergio Ahumada <sergio.ahumada@nokia.com>2011-08-23 20:45:26 (GMT)
commitd54407928be05781ede2358baba2f2f91749cc80 (patch)
tree0a7f387c9542f750236783eb39b9cd26c9693328 /tools/qdoc3
parent4e40c388aef3cb16a1492764c37ae8ba929e8aef (diff)
parent6c0c437962a2638cca162277b14a30dae4fed57b (diff)
downloadQt-d54407928be05781ede2358baba2f2f91749cc80.zip
Qt-d54407928be05781ede2358baba2f2f91749cc80.tar.gz
Qt-d54407928be05781ede2358baba2f2f91749cc80.tar.bz2
Merge branch 4.7 into qt-4.8-from-4.7
Conflicts: doc/src/index.qdoc
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp5
-rw-r--r--tools/qdoc3/generator.cpp11
-rw-r--r--tools/qdoc3/node.cpp3
3 files changed, 13 insertions, 6 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index ae7385e..64f12d6 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -1180,7 +1180,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
Just output the href as if the image is in
the images directory...
*/
- fileName = QLatin1String("images/") + protectEnc(atom->string());
+ if (atom->string()[0] == '/')
+ fileName = QLatin1String("images") + atom->string();
+ else
+ fileName = QLatin1String("images/") + atom->string();
}
if (currentTag() != DT_xref)
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index c20d2b4..355c9b2 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -814,10 +814,13 @@ QString Generator::imageFileName(const Node *relative, const QString& fileBase)
if (filePath.isEmpty())
return QString();
- return QLatin1String("images/")
- + Config::copyFile(relative->doc().location(),
- filePath, userFriendlyFilePath,
- outputDir() + QLatin1String("/images"));
+ QString path = Config::copyFile(relative->doc().location(),
+ filePath,
+ userFriendlyFilePath,
+ outputDir() + QLatin1String("/images"));
+ if (path[0] != '/')
+ return QLatin1String("images/") + path;
+ return QLatin1String("images") + path;
}
void Generator::setImageFileExtensions(const QStringList& extensions)
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 87bbd93..189c28f 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -555,7 +555,8 @@ void InnerNode::removeFromRelated()
*/
void InnerNode::deleteChildren()
{
- qDeleteAll(children);
+ NodeList childrenCopy = children; // `children` will be changed in ~Node()
+ qDeleteAll(childrenCopy);
}
/*!