summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-06-09 09:49:09 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-06-09 09:49:09 (GMT)
commitd68bac1ad31c449b8ea146e2a2fefd5e47b57fe3 (patch)
treeccc65030f312a51f918fa7e441a9106c283425cb /tools/qdoc3
parent0c62d147c21da6f0b812820944fbb2a63cea1e4a (diff)
parentbcea4e3bcefd5dd95e71b4ed3f272f8bf32e776d (diff)
downloadQt-d68bac1ad31c449b8ea146e2a2fefd5e47b57fe3.zip
Qt-d68bac1ad31c449b8ea146e2a2fefd5e47b57fe3.tar.gz
Qt-d68bac1ad31c449b8ea146e2a2fefd5e47b57fe3.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp5
-rw-r--r--tools/qdoc3/generator.cpp11
2 files changed, 11 insertions, 5 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index b801e1e..c49ff65 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -1199,7 +1199,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 3367301..6c92e54 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -783,10 +783,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)