QDoc: Fix relative URL generation for cross-linking.
authorCasper van Donderen <casper.vandonderen@nokia.com>
Thu, 5 Jul 2012 12:49:10 +0000 (14:49 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 6 Jul 2012 01:54:38 +0000 (03:54 +0200)
Previously the URL relative to the installdir was used, now we use a
relative URL to the index file.

Change-Id: Ia2485aa49da8240901d0db1f102eb48da689ef2a
Reviewed-by: Martin Smith <martin.smith@nokia.com>
src/tools/qdoc/tree.cpp

index 1bf3618..9de182f 100644 (file)
@@ -948,7 +948,7 @@ void Tree::readIndexFile(const QString& path)
         else {
             // Use a fake directory, since we will copy the output to a sub directory of
             // installDir when using "make install". This is just for a proper relative path.
-            QDir installDir(Config::installDir + "/outputdir");
+            QDir installDir(path.section('/', 0, -3) + "/outputdir");
             indexUrl = installDir.relativeFilePath(path).section('/', 0, -2);
         }