diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-16 09:39:37 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-16 09:39:37 (GMT) |
commit | 307d6f04f6e9a2603d2949f0d1efa5d911144083 (patch) | |
tree | 14d029547cbe671c8ff8bd4d0d166332330acfd1 | |
parent | b4d88c1bb1b21cce7928b3466776ad41c9424cea (diff) | |
parent | bcea4e3bcefd5dd95e71b4ed3f272f8bf32e776d (diff) | |
download | Qt-307d6f04f6e9a2603d2949f0d1efa5d911144083.zip Qt-307d6f04f6e9a2603d2949f0d1efa5d911144083.tar.gz Qt-307d6f04f6e9a2603d2949f0d1efa5d911144083.tar.bz2 |
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team
* '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team:
qdoc: Fixed QTBUG-19338
-rw-r--r-- | tools/qdoc3/ditaxmlgenerator.cpp | 5 | ||||
-rw-r--r-- | tools/qdoc3/generator.cpp | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 342bb90..c45648b 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 f05c030..81aba6b 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) |